using Coq 8.10
-
Install VST (tag 2.5)[https://github.com/PrincetonUniversity/VST/releases/tag/v2.5]. can be installed with
make -j
Our modification of VST has two parts
- we prove some model level lemmas on preciseness of load/store (required to derive the conjunction rule)
- we define a stronger
semax
for VST-A, that removes bupd and restricts function specification being called to be precise
-
Install CompCert-A dependency from [https://github.com/QinxiangCao/VST-A-CompCertPart.git] commit [c7c2ed6] , first
./configure
and thenmake
-
run
make
, an CONFIGURE file will be generated, fill in thereRamifyCoq
can be left as empty, we do not depend on it for nowVSTDIR
is the path to (1)COMPCERTDIR
is the path to (1)/compcertCOMPCERTADIR
is the path to (2)
-
run
make
again, the following will be built- frontend,
aclightgen
- the parsed results of test progs in
cprogs/
- the split function and its soundness proof in
CSplit/
- the proof automation tactics in
floyd-seq/
(still working)
- frontend,
-
model_lemmas.v
:- model level lemmas for precise read/write
mapsto_join_andp_det
mapsto_join_andp_write_det
precise_funspec
: definition of precise function specification- two rewriting lemmas for function call (written in model level to make use of fash/unfash conveniently)
func_at_unique_rewrite
:- rewrite
func_at
:func_at (A P1 Q1) addr & func_at (A P2 Q2) addr |-- P1 x * (Q1 x -* R) <-> P2 x * (Q2 x -* R)
- rewrite
funspec_rewrite
:- rewrite state with subsumption:
gA gP gQ <: A P Q & P x * (Q x -* R) |-- EX x', gP x' * (gQ x' -* R)
- rewrite state with subsumption:
- model level lemmas for precise read/write
-
logic_lemmas.v
:- transfer lemmas in
model_lemmas.v
to logic scope
- transfer lemmas in
-
strong.v
- definition of precise function specification in logic scope (identical to
model_lemmas.v
) semax
: our stronger program logic- inversion lemmas
semax_noXXX_inv
: noreturn/nocontinue/nobreak lemmassemax_conj_rule
: conjunction ruleaux_semax_extract_exists
semax_derives
: soundness w.r.t. VST's program logic
- definition of precise function specification in logic scope (identical to
Can make frontend alone
make -f Makefile.frontend
Usage:
./aclightgen cprogs/sgn.c -normalize -A -V cprogs.sgn_def -V cprogs.sgn_prog -o cprogs/sgn_annot.v
Still working on the frontend, so the current split result is not ideal.