Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
92eb6f5d
Commit
92eb6f5d
authored
Sep 26, 2014
by
Martin Clochard
Browse files
(wip) mini-compiler: fix a ghost + new execution example
parent
c1abf46d
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/in_progress/mini-compiler/compiler.mlw
View file @
92eb6f5d
...
...
@@ -196,6 +196,9 @@ module Compile_com
let code = Cseq (Cassign x (Anum 1)) lp in
compile_program code
let test2 () : code =
compile_program (Cwhile Btrue Cskip)
end
...
...
examples/in_progress/mini-compiler/logic.mlw
View file @
92eb6f5d
...
...
@@ -93,7 +93,7 @@ module Compiler_logic
(* Code combinator for sequence, with wp. *)
let (%) (s:wp 'a) (exn:pre 'a) : wp 'a
let (%) (s:wp 'a) (
ghost
exn:pre 'a) : wp 'a
requires { wp_correctness s }
ensures { result.wp = fork_wp s.wp exn }
ensures { result.wcode.length = s.wcode.length /\ wp_correctness result }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment