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

Emit error from k frontend when kore-exec fails #2862

Merged
merged 7 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
end ( bar1 ( V0 ) )
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
end ( bar1 ( V0 ) )
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
<k>
doneLemma ( keccak ( _Gen0 ) ) ~> _DotVar1 ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DEF=verif
EXT=verif
TESTDIR=.
KOMPILE_BACKEND=haskell

include ../../../include/kframework/ktest.mak

KPROVE_OR_LEGACY=$(KPROVE)
CONSIDER_PROVER_ERRORS=2>&1 | sed 's/\(kore-exec: \)\[[0-9]\+\]/\1/g'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2019 K Team. All Rights Reserved.

module CRASH-SPEC
imports VERIF

claim <k> doIt(foo) => doIt(0) ... </k>
claim <k> crash(foo) => doIt(0) ... </k>

endmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kore-exec: Error (ErrorException):
Error: missing hook
Symbol
Lblcrash'LParUndsRParUnds'VERIF-SYNTAX'Unds'Pgm'Unds'Int{}
declared with attribute
hook{}("KREFLECTION.printKORE")
We don't recognize that hook and it was not given any rules.
Please open a feature request at
https://github.com/runtimeverification/haskell-backend/issues
and include the text of this message.
Workaround: Give rules for Lblcrash'LParUndsRParUnds'VERIF-SYNTAX'Unds'Pgm'Unds'Int{}
CallStack (from HasCallStack):
error, called at src/Kore/Rewrite/Function/Evaluator.hs:274:6 in kore-0.60.0.0-C6NIGnCldg2CHYuzj5V8fi:Kore.Rewrite.Function.Evaluator
Created bug report: kore-exec.tar.gz
[Error] Critical: Haskell Backend execution failed with code 1 and produced no output.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module VERIFICATION
imports VERIF
endmodule

module STUCK-CLAIM-SPEC
import VERIFICATION

claim <k> addCounter(N:Int) => 1 ...</k>
<counter> C:Int => ?_ </counter>
<sum> S:Int => ?S:Int </sum>
requires
N >=Int 0
ensures
?S ==Int S +Int N *Int C +Int (N -Int 1) *Int N /Int 2
endmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
kore-exec: Warning (WarnStuckClaimState):
(InfoReachability) while checking the implication:
The configuration's term doesn't unify with the destination's term and the configuration cannot be rewritten further. Location: stuck-claim-spec.k:8:10-14:61
kore-exec: Warning (WarnUnexploredBranches):
5 branches were still unexplored when the action failed.
#Not ( #Exists _DotVar2 . #Exists I . {
_DotVar1
#Equals
doIt ( I ) ~> _DotVar2 ~> .
}
#And
{
true
#Equals
I >Int 0
} )
#And
#Not ( #Exists _DotVar2 . #Exists N . {
_DotVar1
#Equals
addCounter ( N ) ~> _DotVar2 ~> .
}
#And
{
true
#Equals
N >=Int 0
} )
#And
#Not ( #Exists _DotVar2 . #Exists Times . {
_DotVar1
#Equals
addCounter ( Times ) ~> _DotVar2 ~> .
}
#And
{
true
#Equals
Times >Int 0
} )
#And
#Not ( #Exists _DotVar2 . {
_DotVar1
#Equals
addCounter ( 0 ) ~> _DotVar2 ~> .
} )
#And
<generatedTop>
<k>
_DotVar1
</k>
<counter>
C
</counter>
<sum>
S
</sum>
</generatedTop>
#And
{
N
#Equals
0
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
28 changes: 28 additions & 0 deletions k-distribution/tests/regression-new/kprove-error-status/verif.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) 2019 K Team. All Rights Reserved.

module VERIF-SYNTAX
imports INT

syntax Int ::= "foo" [macro]
rule foo => 3

syntax Pgm ::= doIt ( Int )
syntax Pgm ::= addCounter ( Int )
syntax Pgm ::= crash ( Int ) [function,hook(KREFLECTION.printKORE)]
endmodule

module VERIF
imports VERIF-SYNTAX
imports BYTES

configuration <k> $PGM:Pgm </k> <counter> 1 </counter> <sum> 0 </sum>

rule <k> addCounter(0) => . ... </k>
rule <k> addCounter(Times:Int => Times -Int 1) ...</k>
<counter> C:Int => C +Int 1 </counter>
<sum> S:Int => S +Int C </sum>
requires Times >Int 0

rule <k> doIt(I => I -Int 1) ... </k> requires I >Int 0

endmodule
Empty file.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
assignmentResult ( x |-> 3 ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Y:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
1 |-> 4
X:MyId |-> 3 ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
assignmentResult ( X:MyId |-> 3 ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
assignmentResult ( ( X:MyId |-> 3 ) [ x <- 5 ]
y |-> 4 ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
#Equals
Y:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
#Equals
foo ( Y ) in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
#Equals
foo ( Y ) in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
#Equals
Y:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
#Equals
Y:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
Y:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Z:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
#Equals
X:MyId in_keys ( MAP )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
inkeysResult ( false ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
inkeysResult ( true ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
inkeysResult ( Y:MyId in_keys ( M [ X:MyId <- 0 ] ) ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
inkeysResult ( true ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<k>
inkeysResult ( Y:MyId in_keys ( M [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) ~> .
</k>
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
#Equals
X:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#Equals
X:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
#Equals
Z:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
#Equals
Z:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
#Equals
Y:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
#Equals
Z:MyId in_keys ( M )
}
[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details.
Loading