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

rewrite rule generator can choose "impossible" values #162

Open
rdaly525 opened this issue Jun 7, 2020 · 1 comment
Open

rewrite rule generator can choose "impossible" values #162

rdaly525 opened this issue Jun 7, 2020 · 1 comment

Comments

@rdaly525
Copy link
Collaborator

rdaly525 commented Jun 7, 2020

For example in

def test_automapper():

It finds a rewrite rule for 'Sub', but the enum it chooses for Inst.OpCode is '0' which is not from the set of possible OpCodes. This results from the fact that we are writing the sim.py functions using the if/elif/else pattern to emulate a case statement for Enum types

I suspect there is a similar issue for Sum types, but I do not have a particular example.

Possible Solutions:

  1. Change simulation functions to use an elif on the last case of the Enum types.
  2. Add in extra constraints in the rewrite rule generator to only work for valid Enum values. Downside is that this will increase the size/complexity of the SMT formula
@rdaly525
Copy link
Collaborator Author

rdaly525 commented Jun 7, 2020

@cdonovick thoughts?

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

No branches or pull requests

1 participant