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

Intelligent Expression rewriting in TotalRewriter #25

Open
GoogleCodeExporter opened this issue May 8, 2015 · 2 comments
Open

Intelligent Expression rewriting in TotalRewriter #25

GoogleCodeExporter opened this issue May 8, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Currently, TotalRewriter relies on the expressions depth first replacement 
logic to determine which sub-expressions should be checked next for rewriting. 
However, there are cases where it make sense to rewrite nested sub-expressions 
before there parents. An e.g. of this is in R_set_diff when handling 
expressions of this form:

S1 is { Alpha | C }_I and S2 is { Alpha' | C' }_I

it does:

C''<- R_formula_simplification(
       C and for all I' : C' => Alpha != Alpha')
       with cont. variables extended by I 

in this case it ends up being more efficient to simplify the 'for all' 
expression first because if the 'for all' expression is left in the conjunction 
it will be simplified multiple times under different contexts via the 
ConjunctsHoldTrueForEachOther rewriter. By simplifying it beforehand once under 
the intended conjunction you only perform the calculation once and get the 
correct simplification of the 'for all' expression in the overall conjunction 
that can be used to simplify other conjuncts later on in the 
ConjunctsHoldTrueForEachOther logic. 

Likely it would help if the rewriters indicated at a minimum if they did or did 
not look at sub-expressions as part of their simplification logic.


Original issue reported on code.google.com by [email protected] on 17 May 2013 at 11:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant