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

Discrepancy in symbolics between interpreter and native simulator #35

Open
nickgian opened this issue Oct 29, 2019 · 3 comments
Open

Discrepancy in symbolics between interpreter and native simulator #35

nickgian opened this issue Oct 29, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nickgian
Copy link
Collaborator

The native simulator ignores values provided for symbolic variables, which causes a different behavior compared to the interpreted simulator. It would be nice to match the two at some point.

@nickgian nickgian added enhancement New feature or request good first issue Good for newcomers labels Oct 29, 2019
@nickgian nickgian self-assigned this Oct 29, 2019
@alberdingk-thijm
Copy link
Collaborator

Just ran into this issue when running a file through SMT which had the following line:

symbolic dest : tnode = 9n

nv -m -v file.nv returns that dest:0u32.

@nickgian
Copy link
Collaborator Author

nickgian commented Nov 5, 2019

That's actually a different issue, it's more of a design choice.
In the SMT solver we ignore the rhs value of a symbolic, because the SMT solver can reason about symbolic variables. If the value is supposed to be a constant even for the SMT then use a let declaration instead.

If you really want to keep this as a symbolic, add a requires clause that says dest = 9n.

@alberdingk-thijm
Copy link
Collaborator

Gotcha. I changed my code but it would probably be good to mention this in the wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants