-
Notifications
You must be signed in to change notification settings - Fork 13
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
Wrong Evaluation of Constraint Expressions using Expansion #241
Comments
I may be getting confused with Boolean/loobean values but shouldn't (defconstraint constraint-1 () (is-not-zero! (if (is-zero 1) 1 1))) Always evaluate to |
@OlivierBBB , you are absolutely right, I got the values mixed up! I update the issue from "[...] should always fail [...]" to something like "[...] shows the same behavior [...]". Moreover, it seems that in this case |
Hey Christoph, Yes, there is a problem with the handling of |
This adds the test cases from #241.
Ok, I believe that is fixed now. Let me know if any more failing tests surface. |
I am sorry to report that this issue is not resolved yet: test-1.lisp (module module-0)
(defcolumns in0 ST)
(defconstraint constraint-0 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)))))
(defconstraint constraint-1 () (if-not-zero ST (vanishes! (if (is-zero (~or! (if (is-zero 1) 0 0) (if (is-zero 1) 0 0))) (if (is-zero in0) in0 0) (~and! 1 1)))))
(defconstraint constraint-2 () (if-not-zero ST (vanishes! (is-not-zero! (is-not-zero! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)))))))
(defconstraint constraint-3 () (if-not-zero ST (vanishes! (~or! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)) 1))))
(defconstraint constraint-4 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) 1))))
(defconstraint constraint-5 () (if-not-zero ST (vanishes! (~and! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)) (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1))))))
(module module-1)
(defcolumns in0 ST)
(defconstraint constraint-0 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)))))
(defconstraint constraint-1 () (if-not-zero ST (vanishes! (if (is-zero (~or! (if (is-zero 1) 0 0) (if (is-zero 1) 0 0))) (if (is-zero in0) in0 0) (~and! 1 1)))))
(defconstraint constraint-2 () (if-not-zero ST (vanishes! (is-not-zero! (is-not-zero! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)))))))
(defconstraint constraint-3 () (if-not-zero ST (vanishes! (~or! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)) 1))))
(defconstraint constraint-4 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) 1))))
(defconstraint constraint-5 () (if-not-zero ST (vanishes! (~and! (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)) (if (is-zero (if (is-zero 1) 0 0)) (if (is-zero in0) in0 0) (~and! 1 1)))))) trace.json {
"module-0": {
"in0": [
0
],
"ST": [
1
]
},
"module-1": {
"in0": [
1
],
"ST": [
1
]
}
} These constraints together with the provided trace pass for I also picked out one of those instances and experimented with it and found following behavior (given the same trace): (module module-0)
(defcolumns in0 ST)
;; fails for the flags "-Ne" but not "-N"
(defconstraint constraint-0 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) in0 (~and! 1 1)))))
;; does not fail anymore
(defconstraint constraint-1 () (if-not-zero ST (vanishes! (if (is-zero 0 ) in0 (~and! 1 1)))))
;; does not fail anymore
(defconstraint constraint-1 () (if-not-zero ST (vanishes! in0 ))
(module module-1)
(defcolumns in0 ST)
;; fails for the flags "-N" and "-Ne"
(defconstraint constraint-0 () (if-not-zero ST (vanishes! (if (is-zero (if (is-zero 1) 0 0)) in0 (~and! 1 1)))))
;; fails for the flags "-N" and "-Ne"
(defconstraint constraint-1 () (if-not-zero ST (vanishes! (if (is-zero 0 ) in0 (~and! 1 1)))))
;; fails for the flags "-N" and "-Ne"
(defconstraint constraint-1 () (if-not-zero ST (vanishes! in0 )) It seems that for all the provided instances I also found this interesting behavior (which might be unrelated):
|
Ok, so the related issue is in the same file as the original problem, but a different method. However, overall, this particular file has caused considerable problems thus far. Therefore, I am going to rework it from scratch. |
I have found vanishing constraint instances that show a different behavior depending on providing the expansion flag
-e
or not.Following instances behave the same regardless of the trace:
test.lisp
but currently the output differs depending on the
-e
flagI also have two examples where the trace makes a difference:
test.lisp
trace1.json
trace2.json
The last examples are slightly different than the first, as the present rather than the absence of
-e
triggers the constraints.They all seem related to
if
,is-zero
andif-not-zero
.I am using corset version
corset 9.7.13 b573a83
.The text was updated successfully, but these errors were encountered: