-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
During a Michelson proof execution, I end up with 12 branches, 2 of which are reported by our script as failures, but these are spurious, because they are unsatisfiable. Note that Michelson currently uses krun with --search-final and not kprove as its symbolic execution driver and we manually inspect final states using a script to decide if they are solved --- i.e. <k> empty or <assumeFailed> contains true.
Version Info
== KMich Version
8497e1b
== K Version
RV-K version 1.0-SNAPSHOT
Git revision: 06e5157
Git branch: master
Build date: Fri Aug 21 10:14:15 CDT 2020
== Kore Version
Kore version 0.27.0.0
Git:
revision: 7fe8fa29de30386f69d97b5a0220fe22521153fb
branch: HEAD
last commit: 2020 Aug 18 13:49:39 -0500
Build date: 2020 Aug 21 10:17:09 -0500
== Z3 Version
Z3 version 4.8.8 - 64 bit
Reproduce
git clone https://github.com/runtimeverification/michelson-semantics.git
cd michelson-semantics
git checkout 8497e1b
make deps-k
make build-symbolic
# run script to pretty print output
./kmich symbtest ./tests/symbolic/vote-simple.tzt
# raw run command without post-processing
krun -d ./.build/defn/symbolic --search-final ./tests/symbolic/vote-simple
Also see linked dump: https://drive.google.com/file/d/1kl_zBYApQdkx9En_merMW0NKkr9tEDEq/view?usp=sharing
Unsatisfiable Fragment and #Bottom Derivation
(1) { V3 [ #SemanticCastToInt ( V5 ) ] #Equals #SemanticCastToInt ( V6 ) }
(2) { V1 ==Int V5 #Equals false }
(3) { V3 [ #SemanticCastToInt ( V1 ) <- V4 +Int 1 ] [ #SemanticCastToInt ( V5 ) ] #Equals #SemanticCastToInt ( V7 ) }
(4) { V6 ==Int V7 #Equals false }
Then we derive:
(5) by 2 + 3 obtain { V3 [ #SemanticCastToInt ( V5 ) ] #Equals #SemanticCastToInt ( V7 ) }
(6) by 5 + 1 obtain { #SemanticCastToInt ( V7 ) #Equals #SemanticCastToInt ( V6 ) }
(7) by 4 + 6 obtain #Bottom
(1) { V1 ==Int V5 #Equals true }
(2) { V3 [ #SemanticCastToInt ( V1 ) ] #Equals #SemanticCastToInt ( V4 ) }
(3) { V3 [ #SemanticCastToInt ( V5 ) ] #Equals #SemanticCastToInt ( V6 ) }
(4) { V3 [ #SemanticCastToInt ( V1 ) <- V4 +Int 1 ] [ #SemanticCastToInt ( V5 ) ] #Equals #SemanticCastToInt ( V7 ) }
(5) { V6 +Int 1 ==Int V7 #Equals false }
Then we derive:
(6) by 1 + 2 + 3 obtain { #SemanticCastToInt ( V4 ) #Equals #SemanticCastToInt ( V6 ) }
(7) by 1 + 4 obtain { V4 +Int 1 #Equals #SemanticCastToInt ( V7 ) }
(8) by 6 + 7 obtain { V6 +Int 1 #Equals #SemanticCastToInt ( V7 ) }
(9) by 5 + 8 obtain #Bottom
NOTE
this is a modified version of the original proof, which uses Int -> Int maps instead of String -> Int maps. In that version, V1 and V5 are both strings, and we replace ==Int between with ==String, etc...
Metadata
Metadata
Assignees
Labels
No labels