Skip to content

Conversation

@kroening
Copy link
Collaborator

This adds constructors for the two kinds of AIG nodes, preventing uninitialized nodes.

@kroening kroening force-pushed the aig_nodet-constructor branch 3 times, most recently from 99fb8fa to 94cf1d3 Compare December 15, 2025 04:52
@kroening kroening marked this pull request as ready for review December 15, 2025 04:52
@kroening kroening force-pushed the aig_nodet-constructor branch from 94cf1d3 to 9229fa2 Compare December 15, 2025 04:55
Comment on lines 25 to 28
explicit aig_nodet(literalt::var_not var_no)
{
a.set(literalt::unused_var_no(), false);
b.set(var_no, false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
explicit aig_nodet(literalt::var_not var_no)
{
a.set(literalt::unused_var_no(), false);
b.set(var_no, false);
explicit aig_nodet(literalt::var_not var_no)
: a(literalt::unused_var_no(), false), b(var_no, false)
{

To avoid unnecessary default-construction of a, b (before .set is called)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed as proposed

This adds constructors for the two kinds of AIG nodes, preventing
uninitialized nodes.
@kroening kroening force-pushed the aig_nodet-constructor branch from 9229fa2 to e66ccaa Compare December 15, 2025 14:58
@kroening kroening merged commit 68e5768 into main Dec 15, 2025
11 checks passed
@kroening kroening deleted the aig_nodet-constructor branch December 15, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants