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

Handling of Rewrite Steps #5

Open
viper-admin opened this issue Feb 27, 2019 · 4 comments
Open

Handling of Rewrite Steps #5

viper-admin opened this issue Feb 27, 2019 · 4 comments
Labels
bug Something isn't working major

Comments

@viper-admin
Copy link
Member

Created by bitbucket user nilsbecker_ on 2019-02-27 19:51
Last updated on 2019-09-30 15:50

For simple loops as shown in the attached file where we have some term f(x) and add 1 to x each time around the loop the integer arithmetic solver (or any other solver in different examples) may rewrite some terms. In the attached example we bind x to a then a+1 then a+2 etc. In order to correctly generalize these terms we would need to have a+1+1 as the third term.

Note that we end up with something looking very similar to what we would want the generalization to be due to the generalization going wrong in just the right way: we first anti-unify the terms shown above to obtain T then essentially ignore the first term (a) for the results since it was not produced by any instantiation in the loop. Anti-unifying a+1, a+2, etc. then gives us a+Int() (it is even possible to obtain T+Int() in other examples), however, the identifier of the Int constant is prefixed with a "g" indicating that the constant changes in each iteration of the loop.


Attachments:

@viper-admin
Copy link
Member Author

Bitbucket user nilsbecker_ on 2019-02-27 19:52:

  • edited the description

@viper-admin
Copy link
Member Author

Bitbucket user nilsbecker_ commented on 2019-09-30 15:45

Updated log file to one generated with a newer version of z3

@viper-admin
Copy link
Member Author

Bitbucket user nilsbecker_ on 2019-09-30 15:45:

  • changed attachment from (none) to z3.log.zip

@viper-admin
Copy link
Member Author

Bitbucket user nilsbecker_ commented on 2019-09-30 15:50

Since we introduced handling of term rewritings done by z3 this mostly works now:

We get f(+(1, T)) in the generalized yield term. However, we do not seem to generate the correct bindings to start the next iteration. We still get T' = +(Int(), a()) there.

@viper-admin viper-admin added major bug Something isn't working labels Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant