From c741e731afe4a6d2c65d43ca299a1a48a1534ec0 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Thu, 14 Mar 2019 17:27:07 +0000 Subject: Add various useful methods to interactive mode :def evaluates a top-level definition :(b)ind : creates an identifier within the interactive type-checking environment :let = defines an identifier Using :def the following now works and brings the correct vector operations into scope. :def default Order dec :load lib/prelude.sail Also fix a type-variable shadowing bug --- src/initial_check.mli | 1 + 1 file changed, 1 insertion(+) (limited to 'src/initial_check.mli') diff --git a/src/initial_check.mli b/src/initial_check.mli index b96a9efb..b41b1818 100644 --- a/src/initial_check.mli +++ b/src/initial_check.mli @@ -98,6 +98,7 @@ val process_ast : ?generate:bool -> Parse_ast.defs -> unit defs val extern_of_string : id -> string -> unit def val val_spec_of_string : id -> string -> unit def val ast_of_def_string : string -> unit defs +val ast_of_def_string_with : (Parse_ast.defs -> Parse_ast.defs) -> string -> unit defs val exp_of_string : string -> unit exp val typ_of_string : string -> typ val constraint_of_string : string -> n_constraint -- cgit v1.2.3 From 22ced4748484bbc0e930efd74f7d162fe561fe32 Mon Sep 17 00:00:00 2001 From: Thomas Bauereiss Date: Fri, 15 Mar 2019 20:54:52 +0000 Subject: Don't constant-fold undefined_X functions in monomorphisation These should be preserved for prover backends. --- src/initial_check.mli | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/initial_check.mli') diff --git a/src/initial_check.mli b/src/initial_check.mli index b41b1818..59c8f0b6 100644 --- a/src/initial_check.mli +++ b/src/initial_check.mli @@ -87,6 +87,11 @@ val opt_enum_casts : bool ref all the loaded files. *) val have_undefined_builtins : bool ref +(** Val specs of undefined functions for builtin types that get added to + the AST if opt_undefined_gen is set (minus those functions that already + exist in the AST). *) +val undefined_builtin_val_specs : unit def list + (** {2 Desugar and process AST } *) (** If the generate flag is false, then we won't generate any -- cgit v1.2.3