Skip to content

Commit

Permalink
add more tests to Holmakefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
palmskog committed Mar 5, 2024
1 parent 396b261 commit 0020be2
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 13 deletions.
12 changes: 11 additions & 1 deletion examples/bsl-wp-smt/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ INCLUDES = $(HOLDIR)/examples/l3-machine-code/common \
$(HOLDIR)/examples/l3-machine-code/riscv/step \
$(HOLBADIR)/src/shared/HolSmt \
$(HOLBADIR)/src/shared \
$(HOLBADIR)/src/tools/cfg \
$(HOLBADIR)/src/tools/wp

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-addrs-eq-imp-x42.exe test-cjmp.exe test-gauss-no-mem.exe
.PHONY: all

example-gauss-with-mem.exe: example-gauss-with-mem.uo
Expand All @@ -26,3 +27,12 @@ test-gauss-no-mem.exe: test-gauss-no-mem.uo

wpsimp_test-gauss-no-mult.exe: wpsimp_test-gauss-no-mult.uo
$(HOLMOSMLC) -o $@ $<

test: test-addrs-eq-imp-x42.exe test-cjmp.exe test-gauss-no-mem.exe
./test-addrs-eq-imp-x42.exe
./test-cjmp.exe
./test-gauss-no-mem.exe
.PHONY: test

EXTRA_CLEANS = example-gauss-with-mem.exe test-addrs-eq-imp-x42.exe \
test-cjmp.exe test-gauss-no-mem.exe wpsimp_test-gauss-no-mult.exe
11 changes: 10 additions & 1 deletion examples/tutorial/7-composition/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,14 @@ INCLUDES = $(HOLDIR)/examples/l3-machine-code/common \
$(HOLBADIR)/examples/tutorial/5-wp \
$(HOLBADIR)/examples/tutorial/6-smt

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-composition.exe
.PHONY: all

test-composition.exe: test-composition.uo
$(HOLMOSMLC) -o $@ $<

test: test-composition.exe
./test-composition.exe
.PHONY: test

EXTRA_CLEANS = test-composition.exe
File renamed without changes.
11 changes: 10 additions & 1 deletion src/shared/HolSmt/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
INCLUDES =

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) selftest.exe
.PHONY: all

selftest.exe: selftest.uo
$(HOLMOSMLC) -o $@ $<

test: selftest.exe
./selftest.exe
.PHONY: test

EXTRA_CLEANS = selftest.exe
41 changes: 39 additions & 2 deletions src/shared/examples/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
INCLUDES =
INCLUDES = $(HOLBADIR)/src/shared \
$(HOLBADIR)/src/shared/HolSmt \
$(HOLBADIR)/src/shared/sml-simplejson \
$(HOLBADIR)/src/theory/bir \
$(HOLBADIR)/src/theory/bir-support

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-bir-to-word-to-z3-sat-model.exe test-bir-to-word.exe test-bsl-progs.exe test-json.exe test-smtLib.exe test-z3-sat-model.exe test-z3_wrapper.exe
.PHONY: all

test-bir-to-word-to-z3-sat-model.exe: test-bir-to-word-to-z3-sat-model.uo
$(HOLMOSMLC) -o $@ $<

test-bir-to-word.exe: test-bir-to-word.uo
$(HOLMOSMLC) -o $@ $<

test-bsl-progs.exe: test-bsl-progs.uo
$(HOLMOSMLC) -o $@ $<

test-json.exe: test-json.uo
$(HOLMOSMLC) -o $@ $<

test-smtLib.exe: test-smtLib.uo
$(HOLMOSMLC) -o $@ $<

test-z3-sat-model.exe: test-z3-sat-model.uo
$(HOLMOSMLC) -o $@ $<

test-z3_wrapper.exe: test-z3_wrapper.uo
$(HOLMOSMLC) -o $@ $<

test: test-bir-to-word-to-z3-sat-model.exe test-bir-to-word.exe test-bsl-progs.exe test-json.exe test-smtLib.exe test-z3-sat-model.exe test-z3_wrapper.exe
./test-bir-to-word-to-z3-sat-model.exe
./test-bir-to-word.exe
./test-bsl-progs.exe
./test-json.exe
./test-smtLib.exe
./test-z3-sat-model.exe
./test-z3_wrapper.exe
.PHONY: test

EXTRA_CLEANS = test-bir-to-word-to-z3-sat-model.exe test-bir-to-word.exe test-bsl-progs.exe test-json.exe test-smtLib.exe test-z3-sat-model.exe test-z3_wrapper.exe
4 changes: 4 additions & 0 deletions src/shared/examples/test-json.sml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
open HolKernel Parse boolLib bossLib;

open wordsTheory;
open bir_valuesTheory;
open bir_programTheory;

(*
val _ = load "sml-simplejson/jsonparse";
*)
Expand Down
2 changes: 2 additions & 0 deletions src/theory/bir-support/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ selftest.exe: selftest.uo
test: selftest.exe
./selftest.exe
.PHONY: test

EXTRA_CLEANS = selftest.exe
2 changes: 2 additions & 0 deletions src/theory/bir/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ selftest.exe: selftest.uo
test: selftest.exe
./selftest.exe
.PHONY: test

EXTRA_CLEANS = selftest.exe
2 changes: 2 additions & 0 deletions src/tools/lifter/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ test: selftest_arm.exe selftest_riscv.exe
./selftest_arm.exe
./selftest_riscv.exe
.PHONY: test

EXTRA_CLEANS = selftest_arm.exe selftest_riscv.exe
18 changes: 16 additions & 2 deletions src/tools/scamv/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
INCLUDES = $(HOLBADIR)/src/theory/bir \
$(HOLBADIR)/src/theory/bir-support \
$(HOLBADIR)/src/shared \
$(HOLBADIR)/src/theory/tools/lifter
$(HOLBADIR)/src/theory/tools/lifter \
$(HOLBADIR)/src/tools/scamv/persistence

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-bir_utilLib.exe test-scamv_enumLib.exe
.PHONY: all

test-bir_utilLib.exe: test-bir_utilLib.uo
$(HOLMOSMLC) -o $@ $<

test-scamv_enumLib.exe: test-scamv_enumLib.uo
$(HOLMOSMLC) -o $@ $<

test: test-bir_utilLib.exe test-scamv_enumLib.exe
./test-bir_utilLib.exe
./test-scamv_enumLib.exe
.PHONY: test

EXTRA_CLEANS = test-bir_utilLib.exe test-scamv_enumLib.exe
3 changes: 2 additions & 1 deletion src/tools/scamv/bir_utilLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ struct
local
open HolKernel Parse;
open bslSyntax;
open bir_exp_to_wordsLib stringSyntax wordsSyntax
open bir_exp_to_wordsLib stringSyntax wordsSyntax;
open experimentsLib;

(* error handling *)
val libname = "bir_utilLib"
Expand Down
14 changes: 12 additions & 2 deletions src/tools/scamv/obsmodel/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
INCLUDES = $(HOLBADIR)/src/theory/bir \
$(HOLBADIR)/src/shared
$(HOLBADIR)/src/shared \
$(HOLBADIR)/src/tools/cfg

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-bir_obs_model.exe
.PHONY: all

test-bir_obs_model.exe: test-bir_obs_model.uo
$(HOLMOSMLC) -o $@ $<

test: test-bir_obs_model.exe
./test-bir_obs_model.exe
.PHONY: test

EXTRA_CLEANS = test-bir_obs_model.exe
1 change: 1 addition & 0 deletions src/tools/scamv/obsmodel/bir_obs_modelLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open HolKernel boolLib liteLib simpLib Parse bossLib;

local
open bir_obs_modelTheory;
open bir_block_collectionLib;
in


Expand Down
4 changes: 4 additions & 0 deletions src/tools/scamv/obsmodel/test-bir_obs_model.sml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
open HolKernel Parse boolLib bossLib;

(* FIXME: needed to avoid quse errors *)
open m0_stepLib;

open bslSyntax;

open bir_obs_modelLib;
Expand Down
3 changes: 2 additions & 1 deletion src/tools/scamv/symbexec/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
INCLUDES = $(HOLBADIR)/src/theory/bir \
$(HOLBADIR)/src/theory/bir-support \
$(HOLBADIR)/src/shared
$(HOLBADIR)/src/shared \
$(HOLBADIR)/src/tools/exec

all: $(DEFAULT_TARGETS)
.PHONY: all
11 changes: 10 additions & 1 deletion src/tools/scamv/symbexec/examples/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
INCLUDES = $(HOLBADIR)/src/tools/scamv/symbexec \
$(HOLBADIR)/src/tools/scamv/symbexec/examples/minimal

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-minimal.exe
.PHONY: all

test-minimal.exe: test-minimal.uo
$(HOLMOSMLC) -o $@ $<

test: test-minimal.exe
./test-minimal.exe
.PHONY: test

EXTRA_CLEANS = test-minimal.exe
4 changes: 4 additions & 0 deletions src/tools/wp/bir_wpLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ struct
(* these dependencies probably need cleanup *)
(* ================================================ *)
open HolKernel boolLib liteLib simpLib Parse bossLib;

(* FIXME: needed to avoid quse errors *)
open m0_stepLib;

open bir_inst_liftingTheory
open bir_lifting_machinesTheory
open bir_lifting_machinesLib bir_lifting_machinesLib_instances;
Expand Down
15 changes: 14 additions & 1 deletion src/tools/wp/examples/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
INCLUDES = $(HOLBADIR)/src/tools/wp

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) test-toy.exe test-wp.exe
.PHONY: all

test-toy.exe: test-toy.uo
$(HOLMOSMLC) -o $@ $<

test-wp.exe: test-wp.uo
$(HOLMOSMLC) -o $@ $<

test: test-toy.exe test-wp.exe
./test-toy.exe
./test-wp.exe
.PHONY: test

EXTRA_CLEANS = test-toy.exe test-wp.exe

0 comments on commit 0020be2

Please sign in to comment.