-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
REPO_BASE=../../../../../ | ||
ARCH=$(REPO_BASE)/tools/Vale/test | ||
|
||
INCLUDE=--include $(ARCH) --include $(REPO_BASE)/src/crypto/poly1305/x64/ | ||
Z3_OPTIONS=--z3cliopt smt.QI.EAGER_THRESHOLD=100 --z3cliopt smt.CASE_SPLIT=3 --z3cliopt smt.arith.nl=false | ||
FSTAR_OPTIONS=$(INCLUDE) $(Z3_OPTIONS) --hint_info --lax | ||
VALE=mono $(REPO_BASE)/bin/vale.exe | ||
|
||
# For simplified Makefiles, define FSTAR_HOME, then include the file below. | ||
include $(FSTAR_HOME)/examples/Makefile.include | ||
|
||
all: ocaml | ||
|
||
include $(FSTAR_HOME)/ulib/ml/Makefile.include | ||
|
||
$(ARCH)/decls.fst: $(ARCH)/decls.vaf | ||
$(VALE) -in $(ARCH)/decls.vaf -fstarText -out $(ARCH)/decls.fst | ||
|
||
poly1305.fst: poly1305.vaf $(ARCH)/decls.vaf | ||
$(VALE) -in poly1305.vaf -fstarText -out poly1305.fst | ||
|
||
poly1305.v: poly1305.fst $(ARCH)/decls.fst | ||
fstar $(FSTAR_OPTIONS) poly1305.fst | ||
|
||
ocaml: out poly1305.fst | ||
$(MAKE) -C $(ULIB_ML) | ||
$(FSTAR) $(FSTAR_DEFAULT_ARGS) $(INCLUDE) --lax --odir out --codegen OCaml poly1305.fst | ||
$(OCAMLOPT) out/Semantics.ml out/Decls.ml out/Vale.ml out/Poly1305.ml -o poly1305.exe | ||
./poly1305.exe | ||
|
||
out: | ||
mkdir -p out | ||
|
||
clean: | ||
make -C $(ULIB_ML) clean | ||
rm -rf out | ||
rm -f *~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters