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

Make smarter choices about decompilation of AndOr and OrElse expressions which can't be differentiated #37

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Quotations involving && or || operators are captured as IfThenElse expressions. 
DerivedPatterns includes two patterns, AndAlso and OrElse which attempt to 
reverse engineer this form. But there are occasions when it doesn't get it 
right and specifically when a given expression matches both patterns.  For 
example

  1. false || false and false && true
  2. true || false and true && true

But we can make smarter decompilation choices based on short-circuiting 
knowledge. 

In the first case, we know "false || false" would be a better choice since 
"<expr> && true" is equivalent to just "<expr>" so "<expr> && true" with the 
literal "true" on the right hand side is an unlikely actual expression.

Similarly, in the second case, we know "true && true" is a better choice than 
"true || false".

Original issue reported on code.google.com by stephen....@gmail.com on 4 Jul 2011 at 2:09

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 4 Jul 2011 at 2:15

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 7 Jul 2011 at 3:38

  • Added labels: Milestone-Release2.0.0

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