Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The order of inputs in generated Verilog is unpredictable #121

Closed
atomb opened this issue May 11, 2021 · 0 comments · Fixed by GaloisInc/saw-script#1294
Closed

The order of inputs in generated Verilog is unpredictable #121

atomb opened this issue May 11, 2021 · 0 comments · Fixed by GaloisInc/saw-script#1294
Assignees

Comments

@atomb
Copy link

atomb commented May 11, 2021

When generating Verilog from What4, the order of inputs in the generated Verilog file is determined by which inputs are discovered first during traversal of the term. This doesn't affect satisfiability, but it does affect the mapping of counter-example or model values back to logical variables.

This affects the SAW w4_abc_verilog command, as can be demonstrated here:

sawscript> sat w4_abc_verilog {{ \(x:[8]) -> \(y:[8]) -> x == 5 /\ y == 2}}
[19:39:41.827] Sat: [x = 5, y = 2]
sawscript> sat w4_abc_verilog {{ \(x:[8]) -> \(y:[8]) -> y == 5 /\ x == 2}}
[19:39:44.436] Sat: [x = 5, y = 2]
sawscript> sat w4_abc_verilog {{ \(x:[8]) -> \(y:[32]) -> y == 0x81050fff /\ x == 2}}
[19:39:51.359] Sat: [x = 255, y = 42009871]
sawscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant