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

'whatever' constant being introduced in contexts with contextual constraint equal "false" #10

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

Comments

@GoogleCodeExporter
Copy link

The test

expressionString = "{(on X in {1,2,3}) p(X) | false}";
expected = parse("{ }");
evaluationTest();

in

testIntensionalSetEnumerationSingleRewriting()

started failing after I introduced contextual updating to the 
Expression.replace method.

This happens because this makes the contextual constraint equal to "false" and 
AbstractRewriter rewrites whatever expression under that context by "whatever". 
Because that particular test involves a single rewriting (RewriteOnce), the 
test stops and fails.

What strikes me as odd here is why AbstractRewriter has to rewrite the 
expression under "false". At first this seems unnecessary and confusing. In 
this particular example, the rewriter ScopedVariables is the one doing the 
replacement, which is especially odd since this is just a module that should 
not ever replace expressions.

I am creating this JIRA item to be a reference to place next to the commented 
out test, and so that we can remember discussing this.

Original issue reported on code.google.com by [email protected] on 11 Apr 2013 at 12:21

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