summaryrefslogtreecommitdiff
path: root/src/sail.ml
diff options
context:
space:
mode:
authorThomas Bauereiss2017-12-06 17:18:36 +0000
committerThomas Bauereiss2017-12-06 17:18:36 +0000
commit2bc281428a3a1d608d56f69e71b50056a25e3da0 (patch)
treedfd8e8a13702696fd9daef64315952b9652f95e8 /src/sail.ml
parentc3c3c40a1d4f81448d8356317e88be2b04363df7 (diff)
parent44e9396fa90ab68ee4c8d9674c6bbad6fc851c6d (diff)
Merge remote branch 'experiments' into experiments
Diffstat (limited to 'src/sail.ml')
-rw-r--r--src/sail.ml20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sail.ml b/src/sail.ml
index e7e965ba..aecbcbec 100644
--- a/src/sail.ml
+++ b/src/sail.ml
@@ -9,6 +9,14 @@
(* Robert Norton-Wright *)
(* Christopher Pulte *)
(* Peter Sewell *)
+(* Alasdair Armstrong *)
+(* Brian Campbell *)
+(* Thomas Bauereiss *)
+(* Anthony Fox *)
+(* Jon French *)
+(* Dominic Mulligan *)
+(* Stephen Kell *)
+(* Mark Wassell *)
(* *)
(* All rights reserved. *)
(* *)
@@ -49,6 +57,7 @@ let opt_print_initial_env = ref false
let opt_print_verbose = ref false
let opt_print_lem_ast = ref false
let opt_print_lem = ref false
+let opt_print_sil = ref false
let opt_print_ocaml = ref false
let opt_convert = ref false
let opt_memo_z3 = ref false
@@ -74,6 +83,9 @@ let options = Arg.align ([
( "-lem_ast",
Arg.Set opt_print_lem_ast,
" output a Lem AST representation of the input");
+ ( "-sil",
+ Arg.Tuple [Arg.Set opt_print_sil; Arg.Set Initial_check.opt_undefined_gen],
+ " output a SIL translated version of the input");
( "-lem",
Arg.Set opt_print_lem,
" output a Lem translated version of the input");
@@ -138,6 +150,9 @@ let options = Arg.align ([
( "-dsanity",
Arg.Set opt_sanity,
" (debug) sanity check the AST (slow)");
+ ( "-dmagic_hash",
+ Arg.Set Initial_check.opt_magic_hash,
+ " (debug) allow special character # in identifiers");
( "-v",
Arg.Set opt_print_version,
" print version");
@@ -204,6 +219,11 @@ let main() =
(if !(opt_print_lem_ast)
then output "" Lem_ast_out [out_name,ast]
else ());
+ (if !(opt_print_sil)
+ then
+ let ast = rewrite_ast_sil ast in
+ Pretty_print_sail2.pp_defs stdout ast
+ else ());
(if !(opt_print_ocaml)
then
let ast_ocaml = rewrite_ast_ocaml ast in