heap_lang.ref 1.88 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  E : coPset
  ============================
  --------------------------------------∗
  WP let: "x" := ref #1 in "x" <- ! "x" + #1;; ! "x" @ E {{ v, ⌜v = #2⌝ }}
  
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  E : coPset
  l : loc
  ============================
  _ : l ↦ #1
  --------------------------------------∗
  WP #l <- #1 + #1;; ! #l @ E {{ v, ⌜v = #2⌝ }}
  
21
22
23
24
25
26
27
28
29
30
31
32
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  fun1, fun2, fun3 : expr
  ============================
  --------------------------------------∗
  WP let: "val1" := fun1 #() in
     let: "val2" := fun2 "val1" in
     let: "val3" := fun3 "val2" in if: "val1" = "val2" then "val" else "val3"
  {{ _, True }}
  
Ralf Jung's avatar
Ralf Jung committed
33
34
35
36
37
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  fun1, fun2, fun3 : expr
38
  Φ : language.val heap_lang → iPropI Σ
Ralf Jung's avatar
Ralf Jung committed
39
40
41
42
43
44
45
46
47
48
49
50
  ============================
  --------------------------------------∗
  WP let: "val1" := fun1 #() in
     let: "val2" := fun2 "val1" in
     let: "v" := fun3 "v" in if: "v" = "v" then "v" else "v" 
  {{ v, Φ v }}
  
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  fun1, fun2, fun3 : expr
51
  Φ : language.val heap_lang → iPropI Σ
Ralf Jung's avatar
Ralf Jung committed
52
53
54
55
56
57
58
59
  E : coPset
  ============================
  --------------------------------------∗
  WP let: "val1" := fun1 #() in
     let: "val2" := fun2 "val1" in
     let: "v" := fun3 "v" in if: "v" = "v" then "v" else "v" 
  @ E {{ v, Φ v }}
  
Ralf Jung's avatar
Ralf Jung committed
60
61
62
63
64
65
66
67
68
69
70
1 subgoal
  
  Σ : gFunctors
  H : heapG Σ
  fun1, fun2, fun3 : expr
  ============================
  {{{ True }}}
    let: "val1" := fun1 #() in
    let: "val2" := fun2 "val1" in
    let: "val3" := fun3 "val2" in if: "val1" = "val2" then "val" else "val3"
  {{{ (x y : val) (z : Z), RET (x, y, #z); True }}}
71
72
73
74
75
"not_cas_compare_safe"
     : string
The command has indeed failed with message:
Ltac call to "wp_cas_suc" failed.
Tactic failure: wp_cas_suc: Values are not safe to compare for CAS.