Closed lucaspena closed 7 years ago
Also @daejunpark
@msaxena2 and I figured out the root cause of the issue. Basically, matchImplies
in the file ConstrainedTerm.java
is trying to prove that the current term implies the target term. In doing this, it calculates the rightOnlyVariables
, i.e. the variables present in the target term but not the current term. However, in this example, the current term no longer has the variable Y
in scope as it is lost during execution. However, Y
is not a right only variable, as it certainly appears in the initial term.
I am trying to verify some simple programs in our semantics for Plutus Core (github.com/kframework/plutus-core-semantics). I am running into an issue using
krun --prove
where it appears as though incorrect or incomplete proof obligations are being generated.Specifically, we were given a function
const
defined in a different file aslam x (lam y x)
and I'm trying to prove thatconst X Y = X
. This works great and as expected, but when trying to proveconst X Y = Y
, the prover also outputs true. In fact, when run in debug mode, the right hand side of the proof obligation is justtrue
.However, if I add any side condition mentioning
Y
, even something trivial likeY == 0 orBool Y =/= 0
, the prover cannot prove it (the desired behavior). Now, the right hand side of the proof obligation is something equivalent toX == Y
which is expected. I've copied the spec file below. All code is located at the github link mentioned above, under theverification-env
branch.The obligation generated by the prover for this looks like
This proof fails as expected. If the last conjunct in the side condition is removed (
Y ==Int 0 orBool Y =/=Int 0
), the obligation generated iswhich can be proved. @andreistefanescu, @msaxena2: Any ideas what could be causing this/ideas for how to fix it? Thanks, any help is appreciated.