summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKathy Gray2014-11-07 16:31:03 +0000
committerKathy Gray2014-11-07 16:31:03 +0000
commit08a7d0de5e844ae8ad2d7027a4da87df054b2a28 (patch)
treef8172be5684d9fc125db382f4589f698dd1f8ca4 /src
parent179da2c7c29265cee601b5cb1956e18699cedd3f (diff)
stop using LEMLIB in makefile, in case that's interfering with lem library placement, switch to LEMLIBOCAML
Diffstat (limited to 'src')
-rw-r--r--src/Makefile6
-rw-r--r--src/lem_interp/pretty_interp.ml5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index ab44b174..518804b5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -16,7 +16,7 @@ test: sail interpreter
./run_tests.native
LEM = ~/bitbucket/lem/lem
-LEMLIB = ~/bitbucket/lem/ocaml-lib/_build/
+LEMLIBOCAMl = ~/bitbucket/lem/ocaml-lib/_build/
install_elf:
cp -p ../../system-v-abi/src/*.lem elf_model/
@@ -30,7 +30,7 @@ elf:
cp -p elf_model/*.cmx _build/elf_model/
cp -p elf_model/*.o _build/elf_model/
cd _build/elf_model ;\
- ocamlfind ocamlopt -package batteries -package uint -package bitstring -I $(LEMLIB) -a -o elf_extract.cmxa missing_pervasives.cmx \
+ ocamlfind ocamlopt -package batteries -package uint -package bitstring -I $(LEMLIBOCAML) -a -o elf_extract.cmxa missing_pervasives.cmx \
show.cmx endianness.cmx error.cmx ml_bindings.cmx default_printing.cmx bitstring_local.cmx elf_types.cmx elf_header.cmx elf_file1.cmx elf_program_header_table.cmx elf_executable_file2.cmx string_table.cmx elf_section_header_table.cmx elf_interpreted_segment.cmx elf_symbol_table.cmx elf_executable_file3.cmx elf_linking_file2.cmx elf_linking_file3.cmx elf_relocation.cmx sail_interface.cmx
@@ -40,7 +40,7 @@ power: sail interpreter elf
cd _build/test ;\
../../sail.native -lem_ast power.sail ;\
$(LEM) -ocaml -only_changed_output -lib ../lem_interp/ power.lem;\
- env OCAMLRUNPARAM=l=100M ocamlfind ocamlopt -package num -package bitstring -package batteries -package uint -I $(LEMLIB) -I ../lem_interp/ -I ../elf_model/ -linkpkg $(LEMLIB)extract.cmxa ../pprint/src/PPrintLib.cmxa ../lem_interp/extract.cmxa elf_extract.cmxa power.ml run_power.ml -o run_power.native
+ env OCAMLRUNPARAM=l=100M ocamlfind ocamlopt -package num -package bitstring -package batteries -package uint -I $(LEMLIBOCAML) -I ../lem_interp/ -I ../elf_model/ -linkpkg $(LEMLIBOCAML)extract.cmxa ../pprint/src/PPrintLib.cmxa ../lem_interp/extract.cmxa elf_extract.cmxa power.ml run_power.ml -o run_power.native
ln -fs _build/test/run_power.native run_power.native
test_power: power
diff --git a/src/lem_interp/pretty_interp.ml b/src/lem_interp/pretty_interp.ml
index 6a72526a..b201723a 100644
--- a/src/lem_interp/pretty_interp.ml
+++ b/src/lem_interp/pretty_interp.ml
@@ -332,7 +332,10 @@ let doc_exp, doc_let =
| E_nondet exps ->
let exps_doc = separate_map (semi ^^ hardline) (exp env) exps in
string "nondet" ^^ space ^^ (surround 2 1 lbrace exps_doc rbrace)
- | E_id id -> (*TODO, use env here*) doc_id id
+ | E_id id ->
+ (match id with
+ | Id_aux(Id("0"), _) -> (*The evaluation context hole*) doc_id id
+ | _ -> doc_id id)
| E_lit lit -> doc_lit lit
| E_cast(typ,e) ->
if !ignore_casts then