-
Notifications
You must be signed in to change notification settings - Fork 33
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
hasVar() for level 1 #94
Comments
Thanks for the report. Could you see if #95 fixes this issue on your side? |
I checked it out, but the fix doesn't change the outcome. |
This is strange. This fixes the problem for me on your example. Do you have a full program. Texpr1VarNode x = new Texpr1VarNode("x");
Environment environment = new Environment(new String[]{"x"},new String[]{});
System.out.println(x.hasVar("x"));
Texpr0Node xZero = x.toTexpr0Node(environment);
System.out.println(xZero.hasDim(environment.dimOfVar("x"))); returns |
Mhm wierd. Same code gives me false true. |
Sorry, it will be difficult for me to fix the issue if I cannot reproduce it... Any additional information would be welcome. |
Okay, sorry, sure. I try to give as much information as I can. I included the Apron library into JavaSMT (https://github.com/sosy-lab/java-smt/tree/314-adding-the-abstract-numeric-domains-of-the-apron-library-as-smt-solver). The bug occurred firstly in the class https://github.com/sosy-lab/java-smt/blob/314-adding-the-abstract-numeric-domains-of-the-apron-library-as-smt-solver/src/org/sosy_lab/java_smt/solvers/apron/ApronModel.java line 246 ff.
So I wrote some Tests (https://github.com/sosy-lab/java-smt/blob/314-adding-the-abstract-numeric-domains-of-the-apron-library-as-smt-solver/src/org/sosy_lab/java_smt/solvers/apron/ApronNativeApiTest.java) line 109 ff.
After your proposed fix I changed the branch of the Apron library but the tests still don't work. I hope this can help you. |
Hello,
I noticed a potential bug with the hasVar() method for level 1 nodes. Here is a code snipped where hasVar() on level 1 returns false but if I transform the same node to a level 0 node and check if it contains the same variable it returns true:
Texpr1VarNode x = new Texpr1VarNode("x");
Environment environment = new Environment(new String[]{"x"},new String[]{});
Preconditions.checkArgument(!x.hasVar("x")); \\ I would expect true for x.hasVar("x")
Texpr0Node xZero = x.toTexpr0Node(environment);
Preconditions.checkArgument(xZero.hasDim(environment.dimOfVar("x")));
Thanks!
The text was updated successfully, but these errors were encountered: