Closed hjorthjort closed 3 years ago
I found the offending Java file and managed to produce the following stack trace before the error get thrown further up.
Got exception of type class java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException: 4
at org.kframework.backend.java.symbolic.FastRuleMatcher$2.transform(FastRuleMatcher.java:694)
at org.kframework.backend.java.symbolic.FastRuleMatcher$2.transform(FastRuleMatcher.java:676)
at org.kframework.backend.java.kil.KItem.accept(KItem.java:869)
at org.kframework.backend.java.symbolic.FastRuleMatcher.getRightHandSide(FastRuleMatcher.java:676)
at org.kframework.backend.java.symbolic.FastRuleMatcher.addUnification(FastRuleMatcher.java:628)
at org.kframework.backend.java.symbolic.FastRuleMatcher.match(FastRuleMatcher.java:335)
at org.kframework.backend.java.symbolic.FastRuleMatcher.matchAndLog(FastRuleMatcher.java:288)
at org.kframework.backend.java.symbolic.FastRuleMatcher.match(FastRuleMatcher.java:429)
at org.kframework.backend.java.symbolic.FastRuleMatcher.matchAndLog(FastRuleMatcher.java:288)
at org.kframework.backend.java.symbolic.FastRuleMatcher.match(FastRuleMatcher.java:429)
at org.kframework.backend.java.symbolic.FastRuleMatcher.matchAndLog(FastRuleMatcher.java:288)
at org.kframework.backend.java.symbolic.FastRuleMatcher.matchWithAutomaton(FastRuleMatcher.java:203)
at org.kframework.backend.java.symbolic.FastRuleMatcher.matchRulePattern(FastRuleMatcher.java:130)
at org.kframework.backend.java.symbolic.SymbolicRewriter.fastComputeRewriteStep(SymbolicRewriter.java:181)
at org.kframework.backend.java.symbolic.SymbolicRewriter.proveRule(SymbolicRewriter.java:739)
at org.kframework.backend.java.symbolic.InitializeRewriter$SymbolicRewriterGlue.lambda$prove$1(InitializeRewriter.java:252)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at org.kframework.backend.java.symbolic.InitializeRewriter$SymbolicRewriterGlue.prove(InitializeRewriter.java:255)
at org.kframework.kprove.KProve.run(KProve.java:60)
at org.kframework.kprove.KProveFrontEnd.run(KProveFrontEnd.java:92)
at org.kframework.main.FrontEnd.main(FrontEnd.java:59)
at org.kframework.main.Main.runApplication(Main.java:119)
at org.kframework.main.Main.runApplication(Main.java:108)
at org.kframework.main.Main.main(Main.java:54)
Got KEMException
Adding the flag --boundary-cells k
makes the issue go away, unclear why, but good enough for me for now.
Closing this because --boundary-cells
fixes the issue. If it's reproducable on teh Haskell backend, please open a new bug report with reproduction steps targeting that backend.
Trying to prove a fairly simple spec, the prover runs into to some issue. Output:
Here's a minimal example. Kompile the following module with the java backend (
kompile --backend java kwasm-lemmas.k
) and try to prove the following spec (kprove memory-spec.k
)Module:
Spec: