-
Notifications
You must be signed in to change notification settings - Fork 232
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
18 changed files
with
74 additions
and
136 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
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
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
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 |
---|---|---|
@@ -1,33 +1,26 @@ | ||
include ../Makefile.include | ||
|
||
include $(FSTAR_ULIB)/ml/Makefile.include | ||
|
||
all: uall | ||
|
||
uall: BinarySearch.uver IntSort.uver InsertionSort.uver MergeSort.uver QuickSort.List.uver QuickSort.Seq.uver GC.uver Unification.uver Huffman.uver QuickSort.Array.uver IntervalIntersect.uver #downgrade //TODO | ||
|
||
downgrade: QuickSort.Array.fst downgrade.fst | ||
$(FSTAR) --include $(FSTAR_ULIB)/reclaimable downgrade.fst | ||
FSTAR_ROOT ?= ../.. | ||
include $(FSTAR_ROOT)/mk/test.mk | ||
all: verify-all | ||
|
||
# TODO: restore this OCaml extraction | ||
|
||
include $(FSTAR_ULIB)/ml/Makefile.include | ||
# include $(FSTAR_ULIB)/ml/Makefile.include | ||
|
||
huffman-ocaml: out Huffman.fst | ||
$(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml Huffman.fst | ||
$(OCAMLOPT) -I out out/FStar_List_Tot_Base.ml out/Huffman.ml -o Huffman.exe | ||
./Huffman.exe | ||
# huffman-ocaml: out Huffman.fst | ||
# $(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml Huffman.fst | ||
# $(OCAMLOPT) -I out out/FStar_List_Tot_Base.ml out/Huffman.ml -o Huffman.exe | ||
# ./Huffman.exe | ||
|
||
OCAML_DEFAULT_FLAGS= | ||
huffman-ocaml-repl: out Huffman.fst | ||
$(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml Huffman.fst | ||
$(OCAMLC) -I out $(ULIB_ML)/prims.ml out/FStar_List_Tot_Base.ml out/Huffman.ml -o Huffman.exe | ||
utop -I out -I $(ULIB_ML) Huffman.repl | ||
# OCAML_DEFAULT_FLAGS= | ||
# huffman-ocaml-repl: out Huffman.fst | ||
# $(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml Huffman.fst | ||
# $(OCAMLC) -I out $(ULIB_ML)/prims.ml out/FStar_List_Tot_Base.ml out/Huffman.ml -o Huffman.exe | ||
# utop -I out -I $(ULIB_ML) Huffman.repl | ||
|
||
intersect-ocaml: out IntervalIntersect.fst | ||
$(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml --extract 'IntervalIntersect' IntervalIntersect.fst | ||
$(OCAMLOPT) out/IntervalIntersect.ml -o IntervalIntersect.exe | ||
./IntervalIntersect.exe | ||
# intersect-ocaml: out IntervalIntersect.fst | ||
# $(FSTAR) $(FSTAR_DEFAULT_ARGS) --odir out --codegen OCaml --extract 'IntervalIntersect' IntervalIntersect.fst | ||
# $(OCAMLOPT) out/IntervalIntersect.ml -o IntervalIntersect.exe | ||
# ./IntervalIntersect.exe | ||
|
||
out: | ||
mkdir -p out | ||
# out: | ||
# mkdir -p out |
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 |
---|---|---|
@@ -1,23 +1,12 @@ | ||
FSTAR_FILES = $(wildcard *.fst) | ||
FSTAR_ROOT ?= ../.. | ||
include $(FSTAR_ROOT)/mk/test.mk | ||
|
||
all: verify-all | ||
|
||
include ../Makefile.common | ||
|
||
verify-all: $(CACHE_DIR) $(addsuffix .checked, $(addprefix $(CACHE_DIR)/, $(FSTAR_FILES))) | ||
all: verify-all $(OUTPUT_DIR)/test.exe | ||
|
||
EXTRACT = RBTreeIntrinsic | ||
|
||
OCAML_DEFAULT_FLAGS += -I $(OUTPUT_DIRECTORY) -w -31 | ||
OCAML_DEFAULT_FLAGS += -I $(OUTPUT_DIR) -w -31 | ||
|
||
$(OUTPUT_DIRECTORY)/test.exe: $(OUTPUT_DIRECTORY)/$(EXTRACT).ml | $(OUTPUT_DIRECTORY) | ||
$(OUTPUT_DIR)/test.exe: $(OUTPUT_DIR)/$(EXTRACT).ml | $(OUTPUT_DIR) | ||
@echo 'let _ = test()' >> $^ | ||
$(OCAMLC) -o $(OUTPUT_DIRECTORY)/test.exe $^ | ||
|
||
test: $(OUTPUT_DIRECTORY)/test.exe | ||
$(OUTPUT_DIRECTORY)/test.exe | ||
|
||
clean: | ||
rm -rf $(OUTPUT_DIRECTORY) $(CACHE_DIR) .depend | ||
|
||
.PHONY: depend verify-all test clean | ||
$(OCAMLOPT) -package fstar_lib -linkpkg -o $(OUTPUT_DIR)/test.exe $^ |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FSTAR_EXE ?= ../../bin/fstar.exe | ||
FSTAR_EXE ?= ../../out/bin/fstar.exe | ||
|
||
.PHONY: all | ||
all: run | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(executable | ||
(name hello) | ||
(public_name hello.exe) | ||
(libraries fstar.lib) | ||
(libraries fstar_lib) | ||
(modes native) | ||
) |
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
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
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
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