summaryrefslogtreecommitdiff
path: root/language/l2_parse.ml
diff options
context:
space:
mode:
Diffstat (limited to 'language/l2_parse.ml')
-rw-r--r--language/l2_parse.ml457
1 files changed, 456 insertions, 1 deletions
diff --git a/language/l2_parse.ml b/language/l2_parse.ml
index ed594d3b..4dacb804 100644
--- a/language/l2_parse.ml
+++ b/language/l2_parse.ml
@@ -1,4 +1,4 @@
-(* generated by Ott 0.24 from: l2_parse.ott *)
+(* generated by Ott 0.25 from: l2_parse.ott *)
type text = string
@@ -441,5 +441,460 @@ type
defs = (* Definition sequence *)
Defs of (def) list
+(** pretty printer *)
+let pp_x (y5:x) : string = y5
+
+let pp_kid_aux (kid_aux5:kid_aux) : string =
+ match kid_aux5 with
+ | (Var x) -> " ' " ^ (pp_x x)
+
+
+let pp_id_aux (id_aux5:id_aux) : string =
+ match id_aux5 with
+ | (Id x) -> (pp_x x)
+ | (DeIid x) -> " ( " ^ " deinfix " ^ (pp_x x) ^ " ) "
+
+
+let pp_typquant_aux (typquant_aux5:typquant_aux) : string =
+ match typquant_aux5 with
+ | (TypQ_tq (quant_item_list)) -> " forall " ^ (String.concat "," (List.map (fun quant_item -> pp_quant_item quant_item) quant_item_list)) ^ " . "
+ | TypQ_no_forall ->
+
+
+let pp_kid (kid5:kid) : string =
+ match kid5 with
+ | (Kid_aux (kid_aux,l)) -> (pp_kid_aux kid_aux) ^ " " ^ (pp_l l)
+
+
+let pp_id (id5:id) : string =
+ match id5 with
+ | (Id_aux (id_aux,l)) -> (pp_id_aux id_aux) ^ " " ^ (pp_l l)
+
+
+let pp_typquant (typquant5:typquant) : string =
+ match typquant5 with
+ | (TypQ_aux (typquant_aux,l)) -> (pp_typquant_aux typquant_aux) ^ " " ^ (pp_l l)
+
+
+let rec pp_atyp (atyp5:atyp) : string =
+ match atyp5 with
+ | (ATyp_aux (atyp_aux,l)) -> (pp_atyp_aux atyp_aux) ^ " " ^ (pp_l l)
+and
+pp_atyp_aux (atyp_aux5:atyp_aux) : string =
+ match atyp_aux5 with
+ | (ATyp_id id) -> (pp_id id)
+ | (ATyp_var kid) -> (pp_kid kid)
+ | (ATyp_constant num) -> (pp_num num)
+ | (ATyp_times (atyp1,atyp2)) -> (pp_atyp atyp1) ^ " * " ^ (pp_atyp atyp2)
+ | (ATyp_sum (atyp1,atyp2)) -> (pp_atyp atyp1) ^ " + " ^ (pp_atyp atyp2)
+ | (ATyp_minus (atyp1,atyp2)) -> (pp_atyp atyp1) ^ " - " ^ (pp_atyp atyp2)
+ | (ATyp_exp atyp) -> " 2** " ^ (pp_atyp atyp)
+ | (ATyp_neg atyp) -> " neg " ^ (pp_atyp atyp)
+ | ATyp_inc -> " inc "
+ | ATyp_dec -> " dec "
+ | ATyp_default_ord -> " defaultOrd "
+ | (ATyp_set (base_effect_list)) -> " { " ^ (String.concat "," (List.map (fun base_effect -> pp_base_effect base_effect) base_effect_list)) ^ " } "
+ | (ATyp_fn (atyp1,atyp2,atyp3)) -> (pp_atyp atyp1) ^ " -> " ^ (pp_atyp atyp2) ^ " effect " ^ (pp_atyp atyp3)
+ | (ATyp_tup (atyp_list)) -> " ( " ^ (String.concat "," (List.map (fun atyp -> pp_atyp atyp) atyp_list)) ^ " ) "
+ | (ATyp_app (id,(atyp_list))) -> (pp_id id) ^ " < " ^ (String.concat "," (List.map (fun atyp -> pp_atyp atyp) atyp_list)) ^ " > "
+
+
+let pp_lit_aux (lit_aux5:lit_aux) : string =
+ match lit_aux5 with
+ | L_unit -> " ( " ^ " ) "
+ | L_zero -> " bitzero "
+ | L_one -> " bitone "
+ | L_true -> " true "
+ | L_false -> " false "
+ | (L_num num) -> (pp_num num)
+ | (L_hex hex) -> (pp_hex hex)
+ | (L_bin bin) -> (pp_bin bin)
+ | L_undef -> " undefined "
+ | (L_string string) -> (pp_string string)
+
+
+let pp_typschm_aux (typschm_aux5:typschm_aux) : string =
+ match typschm_aux5 with
+ | (TypSchm_ts (typquant,atyp)) -> (pp_typquant typquant) ^ " " ^ (pp_atyp atyp)
+
+
+let pp_lit (lit5:lit) : string =
+ match lit5 with
+ | (L_aux (lit_aux,l)) -> (pp_lit_aux lit_aux) ^ " " ^ (pp_l l)
+
+
+let pp_fexps_aux (fexps_aux5:fexps_aux) : string =
+ match fexps_aux5 with
+ | (FES_Fexps ((fexp_list),semi_opt)) -> (String.concat ";" (List.map (fun fexp -> pp_fexp fexp) fexp_list)) ^ " " ^ (pp_semi_opt semi_opt)
+
+
+let pp_typschm (typschm5:typschm) : string =
+ match typschm5 with
+ | (TypSchm_aux (typschm_aux,l)) -> (pp_typschm_aux typschm_aux) ^ " " ^ (pp_l l)
+
+
+let rec pp_pat (pat5:pat) : string =
+ match pat5 with
+ | (P_aux (pat_aux,l)) -> (pp_pat_aux pat_aux) ^ " " ^ (pp_l l)
+and
+pp_pat_aux (pat_aux5:pat_aux) : string =
+ match pat_aux5 with
+ | (P_lit lit) -> (pp_lit lit)
+ | P_wild -> " _ "
+ | (P_as (pat,id)) -> " ( " ^ (pp_pat pat) ^ " as " ^ (pp_id id) ^ " ) "
+ | (P_typ (atyp,pat)) -> " ( " ^ (pp_atyp atyp) ^ " ) " ^ (pp_pat pat)
+ | (P_id id) -> (pp_id id)
+ | (P_app (id,(pat_list))) -> (pp_id id) ^ " ( " ^ (String.concat "," (List.map (fun pat -> pp_pat pat) pat_list)) ^ " ) "
+ | (P_record ((fpat_list),semi_opt)) -> " { " ^ (String.concat ";" (List.map (fun fpat -> pp_fpat fpat) fpat_list)) ^ " " ^ (pp_semi_opt semi_opt) ^ " } "
+ | (P_vector (pat_list)) -> " [ " ^ (String.concat "," (List.map (fun pat -> pp_pat pat) pat_list)) ^ " ] "
+ | (P_vector_indexed (num_pat_list)) -> " [ " ^ (String.concat "," (List.map (fun num,pat -> pp_int num,pp_pat pat) num_pat_list)) ^ " ] "
+ | (P_vector_concat (pat_list)) -> (String.concat ":" (List.map (fun pat -> pp_pat pat) pat_list))
+ | (P_tup (pat_list)) -> " ( " ^ (String.concat "," (List.map (fun pat -> pp_pat pat) pat_list)) ^ " ) "
+ | (P_list (pat_list)) -> " [|| " ^ (String.concat "," (List.map (fun pat -> pp_pat pat) pat_list)) ^ " ||] "
+
+
+let pp_fexps (fexps5:fexps) : string =
+ match fexps5 with
+ | (FES_aux (fexps_aux,l)) -> (pp_fexps_aux fexps_aux) ^ " " ^ (pp_l l)
+
+
+let pp_kind_aux (kind_aux5:kind_aux) : string =
+ match kind_aux5 with
+ | (K_kind (base_kind_list)) -> (String.concat "->" (List.map (fun base_kind -> pp_base_kind base_kind) base_kind_list))
+
+
+let rec pp_letbind (letbind5:letbind) : string =
+ match letbind5 with
+ | (LB_aux (letbind_aux,l)) -> (pp_letbind_aux letbind_aux) ^ " " ^ (pp_l l)
+and
+pp_letbind_aux (letbind_aux5:letbind_aux) : string =
+ match letbind_aux5 with
+ | (LB_val_explicit (typschm,pat,exp)) -> " let " ^ (pp_typschm typschm) ^ " " ^ (pp_pat pat) ^ " = " ^ (pp_exp exp)
+ | (LB_val_implicit (pat,exp)) -> " let " ^ (pp_pat pat) ^ " = " ^ (pp_exp exp)
+and
+pp_opt_default (opt_default5:opt_default) : string =
+ match opt_default5 with
+ | (Def_val_aux (opt_default_aux,l)) -> (pp_opt_default_aux opt_default_aux) ^ " " ^ (pp_l l)
+and
+pp_opt_default_aux (opt_default_aux5:opt_default_aux) : string =
+ match opt_default_aux5 with
+ | Def_val_empty ->
+ | (Def_val_dec exp) -> " ; " ^ " default " ^ " = " ^ (pp_exp exp)
+and
+pp_exp (exp5:exp) : string =
+ match exp5 with
+ | (E_aux (exp_aux,l)) -> (pp_exp_aux exp_aux) ^ " " ^ (pp_l l)
+and
+pp_exp_aux (exp_aux5:exp_aux) : string =
+ match exp_aux5 with
+ | (E_block (exp_list)) -> " { " ^ (String.concat ";" (List.map (fun exp -> pp_exp exp) exp_list)) ^ " } "
+ | (E_nondet (exp_list)) -> " nondet " ^ " { " ^ (String.concat ";" (List.map (fun exp -> pp_exp exp) exp_list)) ^ " } "
+ | (E_id id) -> (pp_id id)
+ | (E_lit lit) -> (pp_lit lit)
+ | (E_cast (atyp,exp)) -> " ( " ^ (pp_atyp atyp) ^ " ) " ^ (pp_exp exp)
+ | (E_app (id,(exp_list))) -> (pp_id id) ^ " ( " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " ) "
+ | (E_app_infix (exp1,id,exp2)) -> (pp_exp exp1) ^ " " ^ (pp_id id) ^ " " ^ (pp_exp exp2)
+ | (E_tuple (exp_list)) -> " ( " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " ) "
+ | (E_if (exp1,exp2,exp3)) -> " if " ^ (pp_exp exp1) ^ " then " ^ (pp_exp exp2) ^ " else " ^ (pp_exp exp3)
+ | (E_for (id,exp1,exp2,exp3,atyp,exp4)) -> " foreach " ^ (pp_id id) ^ " from " ^ (pp_exp exp1) ^ " to " ^ (pp_exp exp2) ^ " by " ^ (pp_exp exp3) ^ " in " ^ (pp_atyp atyp) ^ " " ^ (pp_exp exp4)
+ | (E_vector (exp_list)) -> " [ " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " ] "
+ | (E_vector_indexed ((exp_list),opt_default)) -> " [ " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " " ^ (pp_opt_default opt_default) ^ " ] "
+ | (E_vector_access (exp,exp')) -> (pp_exp exp) ^ " [ " ^ (pp_exp exp') ^ " ] "
+ | (E_vector_subrange (exp,exp1,exp2)) -> (pp_exp exp) ^ " [ " ^ (pp_exp exp1) ^ " .. " ^ (pp_exp exp2) ^ " ] "
+ | (E_vector_update (exp,exp1,exp2)) -> " [ " ^ (pp_exp exp) ^ " with " ^ (pp_exp exp1) ^ " = " ^ (pp_exp exp2) ^ " ] "
+ | (E_vector_update_subrange (exp,exp1,exp2,exp3)) -> " [ " ^ (pp_exp exp) ^ " with " ^ (pp_exp exp1) ^ " : " ^ (pp_exp exp2) ^ " = " ^ (pp_exp exp3) ^ " ] "
+ | (E_vector_append (exp,exp2)) -> (pp_exp exp) ^ " : " ^ (pp_exp exp2)
+ | (E_list (exp_list)) -> " [|| " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " ||] "
+ | (E_cons (exp1,exp2)) -> (pp_exp exp1) ^ " :: " ^ (pp_exp exp2)
+ | (E_record fexps) -> " { " ^ (pp_fexps fexps) ^ " } "
+ | (E_record_update (exp,(exp_list))) -> " { " ^ (pp_exp exp) ^ " with " ^ (String.concat ";" (List.map (fun exp -> pp_exp exp) exp_list)) ^ " } "
+ | (E_field (exp,id)) -> (pp_exp exp) ^ " . " ^ (pp_id id)
+ | (E_case (exp,(pexp_list))) -> " switch " ^ (pp_exp exp) ^ " { " ^ (String.concat " " (List.map (fun pexp -> pp_pexp pexp) pexp_list)) ^ " } "
+ | (E_let (letbind,exp)) -> (pp_letbind letbind) ^ " in " ^ (pp_exp exp)
+ | (E_assign (exp,exp')) -> (pp_exp exp) ^ " := " ^ (pp_exp exp')
+ | (E_exit exp) -> " exit " ^ (pp_exp exp)
+
+
+let pp_kind (kind5:kind) : string =
+ match kind5 with
+ | (K_aux (kind_aux,l)) -> (pp_kind_aux kind_aux) ^ " " ^ (pp_l l)
+
+
+let pp_name_scm_opt_aux (name_scm_opt_aux5:name_scm_opt_aux) : string =
+ match name_scm_opt_aux5 with
+ | Name_sect_none ->
+ | (Name_sect_some regexp) -> " [ " ^ " name " ^ " = " ^ (pp_regexp regexp) ^ " ] "
+
+
+let pp_rec_opt_aux (rec_opt_aux5:rec_opt_aux) : string =
+ match rec_opt_aux5 with
+ | Rec_nonrec ->
+ | Rec_rec -> " rec "
+
+
+let pp_tannot_opt_aux (tannot_opt_aux5:tannot_opt_aux) : string =
+ match tannot_opt_aux5 with
+ | Typ_annot_opt_none ->
+ | (Typ_annot_opt_some (typquant,atyp)) -> (pp_typquant typquant) ^ " " ^ (pp_atyp atyp)
+
+
+let pp_effect_opt_aux (effect_opt_aux5:effect_opt_aux) : string =
+ match effect_opt_aux5 with
+ | Effect_opt_pure ->
+ | (Effect_opt_effect atyp) -> " effectkw " ^ (pp_atyp atyp)
+
+
+let pp_type_union_aux (type_union_aux5:type_union_aux) : string =
+ match type_union_aux5 with
+ | (Tu_id id) -> (pp_id id)
+ | (Tu_ty_id (atyp,id)) -> (pp_atyp atyp) ^ " " ^ (pp_id id)
+
+
+let pp_funcl_aux (funcl_aux5:funcl_aux) : string =
+ match funcl_aux5 with
+ | (FCL_Funcl (id,pat,exp)) -> (pp_id id) ^ " " ^ (pp_pat pat) ^ " = " ^ (pp_exp exp)
+
+
+let pp_base_kind_aux (base_kind_aux5:base_kind_aux) : string =
+ match base_kind_aux5 with
+ | BK_type -> " Type "
+ | BK_nat -> " Nat "
+ | BK_order -> " Order "
+ | BK_effect -> " Effect "
+
+
+let pp_kinded_id_aux (kinded_id_aux5:kinded_id_aux) : string =
+ match kinded_id_aux5 with
+ | (KOpt_none kid) -> (pp_kid kid)
+ | (KOpt_kind (kind,kid)) -> (pp_kind kind) ^ " " ^ (pp_kid kid)
+
+
+let pp_n_constraint_aux (n_constraint_aux5:n_constraint_aux) : string =
+ match n_constraint_aux5 with
+ | (NC_fixed (atyp,atyp')) -> (pp_atyp atyp) ^ " = " ^ (pp_atyp atyp')
+ | (NC_bounded_ge (atyp,atyp')) -> (pp_atyp atyp) ^ " >= " ^ (pp_atyp atyp')
+ | (NC_bounded_le (atyp,atyp')) -> (pp_atyp atyp) ^ " <= " ^ (pp_atyp atyp')
+ | (NC_nat_set_bounded (kid,(num_list))) -> (pp_kid kid) ^ " IN " ^ " { " ^ (String.concat "," (List.map (fun num -> pp_int num) num_list)) ^ " } "
+
+
+let pp_name_scm_opt (name_scm_opt5:name_scm_opt) : string =
+ match name_scm_opt5 with
+ | (Name_sect_aux (name_scm_opt_aux,l)) -> (pp_name_scm_opt_aux name_scm_opt_aux) ^ " " ^ (pp_l l)
+
+
+let pp_rec_opt (rec_opt5:rec_opt) : string =
+ match rec_opt5 with
+ | (Rec_aux (rec_opt_aux,l)) -> (pp_rec_opt_aux rec_opt_aux) ^ " " ^ (pp_l l)
+
+
+let pp_tannot_opt (tannot_opt5:tannot_opt) : string =
+ match tannot_opt5 with
+ | (Typ_annot_opt_aux (tannot_opt_aux,l)) -> (pp_tannot_opt_aux tannot_opt_aux) ^ " " ^ (pp_l l)
+
+
+let pp_effect_opt (effect_opt5:effect_opt) : string =
+ match effect_opt5 with
+ | (Effect_opt_aux (effect_opt_aux,l)) -> (pp_effect_opt_aux effect_opt_aux) ^ " " ^ (pp_l l)
+
+
+let pp_type_union (type_union5:type_union) : string =
+ match type_union5 with
+ | (Tu_aux (type_union_aux,l)) -> (pp_type_union_aux type_union_aux) ^ " " ^ (pp_l l)
+
+
+let pp_funcl (funcl5:funcl) : string =
+ match funcl5 with
+ | (FCL_aux (funcl_aux,l)) -> (pp_funcl_aux funcl_aux) ^ " " ^ (pp_l l)
+
+
+let pp_base_kind (base_kind5:base_kind) : string =
+ match base_kind5 with
+ | (BK_aux (base_kind_aux,l)) -> (pp_base_kind_aux base_kind_aux) ^ " " ^ (pp_l l)
+
+
+let pp_kinded_id (kinded_id5:kinded_id) : string =
+ match kinded_id5 with
+ | (KOpt_aux (kinded_id_aux,l)) -> (pp_kinded_id_aux kinded_id_aux) ^ " " ^ (pp_l l)
+
+
+let pp_n_constraint (n_constraint5:n_constraint) : string =
+ match n_constraint5 with
+ | (NC_aux (n_constraint_aux,l)) -> (pp_n_constraint_aux n_constraint_aux) ^ " " ^ (pp_l l)
+
+
+let pp_type_def_aux (type_def_aux5:type_def_aux) : string =
+ match type_def_aux5 with
+ | (TD_abbrev (id,name_scm_opt,typschm)) -> " typedef " ^ (pp_id id) ^ " " ^ (pp_name_scm_opt name_scm_opt) ^ " = " ^ (pp_typschm typschm)
+ | (TD_record (id,name_scm_opt,typquant,(atyp_id_list),semi_opt)) -> " typedef " ^ (pp_id id) ^ " " ^ (pp_name_scm_opt name_scm_opt) ^ " = " ^ " const " ^ " struct " ^ (pp_typquant typquant) ^ " { " ^ (String.concat ";" (List.map (fun atyp,id -> pp_atyp atyp;pp_id id) atyp_id_list)) ^ " " ^ (pp_semi_opt semi_opt) ^ " } "
+ | (TD_variant (id,name_scm_opt,typquant,(type_union_list),semi_opt)) -> " typedef " ^ (pp_id id) ^ " " ^ (pp_name_scm_opt name_scm_opt) ^ " = " ^ " const " ^ " union " ^ (pp_typquant typquant) ^ " { " ^ (String.concat ";" (List.map (fun type_union -> pp_type_union type_union) type_union_list)) ^ " " ^ (pp_semi_opt semi_opt) ^ " } "
+ | (TD_enum (id,name_scm_opt,(id_list),semi_opt)) -> " typedef " ^ (pp_id id) ^ " " ^ (pp_name_scm_opt name_scm_opt) ^ " = " ^ " enumerate " ^ " { " ^ (String.concat ";" (List.map (fun id -> pp_id id) id_list)) ^ " " ^ (pp_semi_opt semi_opt) ^ " } "
+ | (TD_register (id,atyp,atyp',(index_range_id_list))) -> " typedef " ^ (pp_id id) ^ " = " ^ " register " ^ " bits " ^ " [ " ^ (pp_atyp atyp) ^ " : " ^ (pp_atyp atyp') ^ " ] " ^ " { " ^ (String.concat ";" (List.map (fun index_range,id -> pp_index_range index_range;pp_id id) index_range_id_list)) ^ " } "
+
+
+let pp_scattered_def_aux (scattered_def_aux5:scattered_def_aux) : string =
+ match scattered_def_aux5 with
+ | (SD_scattered_function (rec_opt,tannot_opt,effect_opt,id)) -> " scattered " ^ " function " ^ (pp_rec_opt rec_opt) ^ " " ^ (pp_tannot_opt tannot_opt) ^ " " ^ (pp_effect_opt effect_opt) ^ " " ^ (pp_id id)
+ | (SD_scattered_funcl funcl) -> " function " ^ " clause " ^ (pp_funcl funcl)
+ | (SD_scattered_variant (id,name_scm_opt,typquant)) -> " scattered " ^ " typedef " ^ (pp_id id) ^ " " ^ (pp_name_scm_opt name_scm_opt) ^ " = " ^ " const " ^ " union " ^ (pp_typquant typquant)
+ | (SD_scattered_unioncl (id,type_union)) -> " union " ^ (pp_id id) ^ " member " ^ (pp_type_union type_union)
+ | (SD_scattered_end id) -> " end " ^ (pp_id id)
+
+
+let pp_dec_spec_aux (dec_spec_aux5:dec_spec_aux) : string =
+ match dec_spec_aux5 with
+ | (DEC_reg (atyp,id)) -> " register " ^ (pp_atyp atyp) ^ " " ^ (pp_id id)
+ | (DEC_alias (id,exp)) -> " register " ^ " alias " ^ (pp_id id) ^ " = " ^ (pp_exp exp)
+ | (DEC_typ_alias (atyp,id,exp)) -> " register " ^ " alias " ^ (pp_atyp atyp) ^ " " ^ (pp_id id) ^ " = " ^ (pp_exp exp)
+
+
+let pp_val_spec_aux (val_spec_aux5:val_spec_aux) : string =
+ match val_spec_aux5 with
+ | (VS_val_spec (typschm,id)) -> " val " ^ (pp_typschm typschm) ^ " " ^ (pp_id id)
+ | (VS_extern_no_rename (typschm,id)) -> " val " ^ " extern " ^ (pp_typschm typschm) ^ " " ^ (pp_id id)
+ | (VS_extern_spec (typschm,id,string)) -> " val " ^ " extern " ^ (pp_typschm typschm) ^ " " ^ (pp_id id) ^ " = " ^ (pp_string string)
+
+
+let pp_default_typing_spec_aux (default_typing_spec_aux5:default_typing_spec_aux) : string =
+ match default_typing_spec_aux5 with
+ | (DT_kind (base_kind,kid)) -> " default " ^ (pp_base_kind base_kind) ^ " " ^ (pp_kid kid)
+ | (DT_order (base_kind,atyp)) -> " default " ^ (pp_base_kind base_kind) ^ " " ^ (pp_atyp atyp)
+ | (DT_typ (typschm,id)) -> " default " ^ (pp_typschm typschm) ^ " " ^ (pp_id id)
+
+
+let pp_fundef_aux (fundef_aux5:fundef_aux) : string =
+ match fundef_aux5 with
+ | (FD_function (rec_opt,tannot_opt,effect_opt,(funcl_list))) -> " function " ^ (pp_rec_opt rec_opt) ^ " " ^ (pp_tannot_opt tannot_opt) ^ " " ^ (pp_effect_opt effect_opt) ^ (String.concat "and" (List.map (fun funcl -> pp_funcl funcl) funcl_list))
+
+
+let pp_fexp_aux (fexp_aux5:fexp_aux) : string =
+ match fexp_aux5 with
+ | (FE_Fexp (id,exp)) -> (pp_id id) ^ " = " ^ (pp_exp exp)
+
+
+let pp_base_effect_aux (base_effect_aux5:base_effect_aux) : string =
+ match base_effect_aux5 with
+ | BE_rreg -> " rreg "
+ | BE_wreg -> " wreg "
+ | BE_rmem -> " rmem "
+ | BE_wmem -> " wmem "
+ | BE_barr -> " barr "
+ | BE_undef -> " undef "
+ | BE_unspec -> " unspec "
+ | BE_nondet -> " nondet "
+
+
+let pp_quant_item_aux (quant_item_aux5:quant_item_aux) : string =
+ match quant_item_aux5 with
+ | (QI_id kinded_id) -> (pp_kinded_id kinded_id)
+ | (QI_const n_constraint) -> (pp_n_constraint n_constraint)
+
+
+let pp_pexp_aux (pexp_aux5:pexp_aux) : string =
+ match pexp_aux5 with
+ | (Pat_exp (pat,exp)) -> (pp_pat pat) ^ " -> " ^ (pp_exp exp)
+
+
+let pp_fpat_aux (fpat_aux5:fpat_aux) : string =
+ match fpat_aux5 with
+ | (FP_Fpat (id,pat)) -> (pp_id id) ^ " = " ^ (pp_pat pat)
+
+
+let pp_type_def (type_def5:type_def) : string =
+ match type_def5 with
+ | (TD_aux (type_def_aux,l)) -> (pp_type_def_aux type_def_aux) ^ " " ^ (pp_l l)
+
+
+let pp_scattered_def (scattered_def5:scattered_def) : string =
+ match scattered_def5 with
+ | (SD_aux (scattered_def_aux,l)) -> (pp_scattered_def_aux scattered_def_aux) ^ " " ^ (pp_l l)
+
+
+let pp_dec_spec (dec_spec5:dec_spec) : string =
+ match dec_spec5 with
+ | (DEC_aux (dec_spec_aux,l)) -> (pp_dec_spec_aux dec_spec_aux) ^ " " ^ (pp_l l)
+
+
+let pp_val_spec (val_spec5:val_spec) : string =
+ match val_spec5 with
+ | (VS_aux (val_spec_aux,l)) -> (pp_val_spec_aux val_spec_aux) ^ " " ^ (pp_l l)
+
+
+let pp_default_typing_spec (default_typing_spec5:default_typing_spec) : string =
+ match default_typing_spec5 with
+ | (DT_aux (default_typing_spec_aux,l)) -> (pp_default_typing_spec_aux default_typing_spec_aux) ^ " " ^ (pp_l l)
+
+
+let pp_fundef (fundef5:fundef) : string =
+ match fundef5 with
+ | (FD_aux (fundef_aux,l)) -> (pp_fundef_aux fundef_aux) ^ " " ^ (pp_l l)
+
+
+let pp_fexp (fexp5:fexp) : string =
+ match fexp5 with
+ | (FE_aux (fexp_aux,l)) -> (pp_fexp_aux fexp_aux) ^ " " ^ (pp_l l)
+
+
+let pp_base_effect (base_effect5:base_effect) : string =
+ match base_effect5 with
+ | (BE_aux (base_effect_aux,l)) -> (pp_base_effect_aux base_effect_aux) ^ " " ^ (pp_l l)
+
+
+let pp_ix (ix5:ix) : string = ix5
+
+let pp_defs (defs5:defs) : string =
+ match defs5 with
+ | (Defs (def_list)) -> (String.concat " " (List.map (fun def -> pp_def def) def_list))
+
+
+let pp_quant_item (quant_item5:quant_item) : string =
+ match quant_item5 with
+ | (QI_aux (quant_item_aux,l)) -> (pp_quant_item_aux quant_item_aux) ^ " " ^ (pp_l l)
+
+
+let rec pp_index_range (index_range5:index_range) : string =
+ match index_range5 with
+ | (BF_aux (index_range_aux,l)) -> (pp_index_range_aux index_range_aux) ^ " " ^ (pp_l l)
+and
+pp_index_range_aux (index_range_aux5:index_range_aux) : string =
+ match index_range_aux5 with
+ | (BF_single num) -> (pp_num num)
+ | (BF_range (num1,num2)) -> (pp_num num1) ^ " : " ^ (pp_num num2)
+ | (BF_concat (index_range1,index_range2)) -> (pp_index_range index_range1) ^ " , " ^ (pp_index_range index_range2)
+
+
+let pp_pexp (pexp5:pexp) : string =
+ match pexp5 with
+ | (Pat_aux (pexp_aux,l)) -> (pp_pexp_aux pexp_aux) ^ " " ^ (pp_l l)
+
+
+let pp_fpat (fpat5:fpat) : string =
+ match fpat5 with
+ | (FP_aux (fpat_aux,l)) -> (pp_fpat_aux fpat_aux) ^ " " ^ (pp_l l)
+
+
+let pp_def (def5:def) : string =
+ match def5 with
+ | (DEF_type type_def) -> (pp_type_def type_def)
+ | (DEF_fundef fundef) -> (pp_fundef fundef)
+ | (DEF_val letbind) -> (pp_letbind letbind)
+ | (DEF_spec val_spec) -> (pp_val_spec val_spec)
+ | (DEF_default default_typing_spec) -> (pp_default_typing_spec default_typing_spec)
+ | (DEF_scattered scattered_def) -> (pp_scattered_def scattered_def)
+ | (DEF_reg_dec dec_spec) -> (pp_dec_spec dec_spec)
+
+
+let rec pp_lexp (lexp5:lexp) : string =
+ match lexp5 with
+ | (LEXP_aux (lexp_aux,l)) -> (pp_lexp_aux lexp_aux) ^ " " ^ (pp_l l)
+and
+pp_lexp_aux (lexp_aux5:lexp_aux) : string =
+ match lexp_aux5 with
+ | (LEXP_id id) -> (pp_id id)
+ | (LEXP_mem (id,(exp_list))) -> (pp_id id) ^ " ( " ^ (String.concat "," (List.map (fun exp -> pp_exp exp) exp_list)) ^ " ) "
+ | (LEXP_vector (lexp,exp)) -> (pp_lexp lexp) ^ " [ " ^ (pp_exp exp) ^ " ] "
+ | (LEXP_vector_range (lexp,exp1,exp2)) -> (pp_lexp lexp) ^ " [ " ^ (pp_exp exp1) ^ " : " ^ (pp_exp exp2) ^ " ] "
+ | (LEXP_field (lexp,id)) -> (pp_lexp lexp) ^ " . " ^ (pp_id id)
+
+