Skip to content

Commit 34b7921

Browse files
authored
Merge pull request #1600 from diffblue/varmap-checks
add preconditions for AIG node numbers
2 parents aaedb6c + 971a253 commit 34b7921

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/trans-netlist/aig.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class aigt {
7878
}
7979

8080
literalt new_and_node(literalt a, literalt b) {
81+
PRECONDITION(a.var_no() < number_of_nodes());
82+
PRECONDITION(b.var_no() < number_of_nodes());
8183
nodes.emplace_back(a, b);
8284
return {narrow_cast<literalt::var_not>(nodes.size() - 1), false};
8385
}

0 commit comments

Comments
 (0)