summaryrefslogtreecommitdiff
path: root/compiler/ExtractBase.ml
diff options
context:
space:
mode:
authorSon Ho2023-02-05 18:40:30 +0100
committerSon HO2023-06-04 21:44:33 +0200
commit985abfa5406e55a8a4e091486119e18b60896911 (patch)
tree3b8d6c8ff7f6f3a76c1d9b44aa71b7577b8789a3 /compiler/ExtractBase.ml
parent569513587ac168683c40cef03c1e3a74579e6e44 (diff)
Make minor fixes, improve formatting for Lean and generate code for all the test suite
Diffstat (limited to '')
-rw-r--r--compiler/ExtractBase.ml18
1 files changed, 8 insertions, 10 deletions
diff --git a/compiler/ExtractBase.ml b/compiler/ExtractBase.ml
index 4c4a9959..e96a80f9 100644
--- a/compiler/ExtractBase.ml
+++ b/compiler/ExtractBase.ml
@@ -51,7 +51,7 @@ type decl_kind =
(** The first definition of a group of mutually-recursive definitions.
F*: [type x0 = ... and x1 = ...]
- Coq: [Fixpoing x0 := ... with x1 := ...]
+ Coq: [Fixpoint x0 := ... with x1 := ...]
*)
| MutRecInner
(** An inner definition in a group of mutually-recursive definitions. *)
@@ -217,7 +217,6 @@ type formatter = {
the same purpose as in {!field:fun_name}.
- loop identifier, if this is for a loop
*)
-
var_basename : StringSet.t -> string option -> ty -> string;
(** Generates a variable basename.
@@ -471,8 +470,7 @@ let id_to_string (id : id) (ctx : extraction_ctx) : string =
| GlobalId gid ->
let name = (A.GlobalDeclId.Map.find gid global_decls).name in
"global name: " ^ Print.global_name_to_string name
- | DeclaredId fid
- | FunId fid -> (
+ | DeclaredId fid | FunId fid -> (
match fid with
| FromLlbc (fid, lp_id, rg_id) ->
let fun_name =
@@ -781,12 +779,12 @@ let ctx_add_fun_decl (trans_group : bool * pure_fun_translation)
ctx.fmt.fun_name def.basename def.num_loops def.loop_id num_rgs rg_info
(keep_fwd, num_backs)
in
- let ctx = if def.body = None && !Config.backend = Lean then
- ctx_add
- (DeclaredId (FromLlbc (A.Regular def_id, def.loop_id, def.back_id)))
- ("opaque_defs." ^ name) ctx
- else
- ctx
+ let ctx =
+ if def.body = None && !Config.backend = Lean then
+ ctx_add
+ (DeclaredId (FromLlbc (A.Regular def_id, def.loop_id, def.back_id)))
+ ("opaque_defs." ^ name) ctx
+ else ctx
in
ctx_add
(FunId (FromLlbc (A.Regular def_id, def.loop_id, def.back_id)))