Skip to content

Commit 5736832

Browse files
authored
Update vst/lib to VST 2.15 and CompCert 3.15 (#804)
1 parent e3b9e18 commit 5736832

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

fcf

lib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ endif
2323
## Your targets here ##
2424
####################################################################
2525

26-
run-clightgen: proof/math_extern.v proof/malloc_extern.v proof/SC_atomics_extern.v
26+
run-clightgen: proof/math_extern.v proof/malloc_extern.v proof/SC_atomics_extern.v proof/threads.v
2727

2828
include CoqMakefile.local
2929

3030
clean:
3131
rm -f CoqMakefile CoqMakefile.conf
3232
rm -f proof/{*.vo,*.vos,*.vok,*.glob}
33-
rm -f proof/{math_extern.v,malloc_extern.v,SC_atomics_extern.v}
33+
rm -f proof/{math_extern.v,malloc_extern.v,SC_atomics_extern.v,threads.v}
3434
rm -f test/{*.vo,*.vos,*.vok,*.glob}
3535
rm -f test/{incr.v,incr_main.v,testmath.v}
3636

lib/proof/spec_threads.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Proof.
115115
destruct x as [[[]] pre]; auto.
116116
Qed.
117117

118-
Definition spawned_funtype := Tfunction (Tcons (tptr tvoid) Tnil) tint cc_default.
118+
Definition spawned_funtype := Tfunction (tptr tvoid :: nil) tint cc_default.
119119

120120
Definition spawn_spec := mk_funspec
121121
((tptr spawned_funtype) :: (tptr tvoid) :: nil, tvoid)

lib/proof/src/math_extern.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifdef COMPCERT
2-
typedef float _Float16; /* _Float16 is a MacOS thing that CompCert doesn't support */
3-
#endif
41
#include <math.h>
52

63
/* Note regard 'long double':

lib/proof/verif_SC_atomics.v

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,58 @@ Definition Vprog : varspecs. mk_varspecs prog. Defined.
1212
Parameter body_make_atomic:
1313
forall {Espec: OracleKind} ,
1414
VST.floyd.library.body_lemma_of_funspec
15-
(EF_external "make_atomic" (mksignature (AST.Tint :: nil) AST.Tlong cc_default))
15+
(EF_external "make_atomic" (mksignature (Xint :: nil) Xptr cc_default))
1616
make_atomic_spec.
1717

1818
Parameter body_make_atomic_ptr:
1919
forall {Espec: OracleKind} ,
2020
VST.floyd.library.body_lemma_of_funspec
2121
(EF_external "make_atomic_ptr"
22-
(mksignature (AST.Tlong :: nil) AST.Tlong cc_default))
22+
(mksignature (Xptr :: nil) Xptr cc_default))
2323
make_atomic_ptr_spec.
2424

2525
Parameter body_free_atomic:
2626
forall {Espec: OracleKind} ,
2727
VST.floyd.library.body_lemma_of_funspec
2828
(EF_external "free_atomic"
29-
(mksignature (AST.Tlong :: nil) AST.Tvoid cc_default))
29+
(mksignature (Xptr :: nil) Xvoid cc_default))
3030
free_atomic_int_spec.
3131

3232
Parameter body_free_atomic_ptr:
3333
forall {Espec: OracleKind} ,
3434
VST.floyd.library.body_lemma_of_funspec
3535
(EF_external "free_atomic_ptr"
36-
(mksignature (AST.Tlong :: nil) AST.Tvoid cc_default))
36+
(mksignature (Xptr :: nil) Xvoid cc_default))
3737
free_atomic_ptr_spec.
3838

3939
Parameter body_atom_load:
4040
forall {Espec: OracleKind} ,
4141
VST.floyd.library.body_lemma_of_funspec
4242
(EF_external "atom_load"
43-
(mksignature (AST.Tlong :: nil) AST.Tint cc_default))
43+
(mksignature (Xptr :: nil) Xint cc_default))
4444
atomic_load_spec.
4545

4646
Parameter body_atom_store:
4747
forall {Espec: OracleKind} ,
4848
VST.floyd.library.body_lemma_of_funspec
4949
(EF_external "atom_store"
50-
(mksignature (AST.Tlong :: AST.Tint :: nil) AST.Tvoid cc_default))
50+
(mksignature (Xptr :: Xint :: nil) Xvoid cc_default))
5151
atomic_store_spec.
5252

5353
Parameter body_atom_CAS:
5454
forall {Espec: OracleKind} ,
5555
VST.floyd.library.body_lemma_of_funspec
5656
(EF_external "atom_CAS"
57-
(mksignature (AST.Tlong :: AST.Tlong :: AST.Tint :: nil)
58-
AST.Tint cc_default))
57+
(mksignature (Xptr :: Xptr :: Xint :: nil)
58+
Xint cc_default))
5959
atomic_CAS_spec.
6060

6161

6262
Parameter body_atom_exchange:
6363
forall {Espec: OracleKind} ,
6464
VST.floyd.library.body_lemma_of_funspec
6565
(EF_external "atom_exchange"
66-
(mksignature (AST.Tlong :: AST.Tint :: nil) AST.Tint
66+
(mksignature (Xptr :: Xint :: nil) Xint
6767
cc_default))
6868
atomic_exchange_spec.
6969

lib/proof/verif_locks.v

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,7 @@ Opaque inv_for_lock.
210210
- Intros r. if_tac; forward_if; try discriminate; try contradiction.
211211
+ forward. simpl spec_locks.lock_inv; entailer!.
212212
+ forward. simpl spec_locks.lock_inv; entailer!.
213-
Unshelve.
214-
apply Build_change_composite_env with (coeq := Maps.PTree.empty bool).
215-
intros. inv H1. intros. unfold cenv_cs; simpl. rewrite !Maps.PTree.gempty.
216-
split; intros [? ?]; discriminate.
217-
Qed.
213+
Qed.
218214

219215
#[global] Opaque M.
220216

lib/proof/verif_math.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ assert (match ret with
6363
| None => False
6464
end); [ | destruct t; try contradiction; auto].
6565
assert (match rettype_of_type t with
66-
| AST.Tvoid =>
66+
| Xvoid =>
6767
mkEnviron gx (Map.empty (block * type))
6868
(Map.empty val)
6969
| _ =>

lib/test/testmath.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifdef COMPCERT
2-
typedef float _Float16; /* _Float16 is a MacOS thing that CompCert doesn't support */
3-
#endif
41
#include <math.h>
52

63
double f(double t) {

lib/test/verif_incr.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Definition SpawnASI_without_exit :=
8080

8181
Definition incrImports := LockASI ++ SpawnASI_without_exit.
8282
Definition incrInternals := [incr_spec; read_spec; thread_func_spec; compute2_spec].
83-
Definition Gprog : funspecs := incrInternals ++ incrImports.
83+
Definition Gprog : funspecs := incrImports ++ incrInternals.
8484

8585
Lemma ctr_inv_exclusive : forall g1 g2 p,
8686
exclusive_mpred (cptr_lock_inv g1 g2 p).

0 commit comments

Comments
 (0)