Commit cffa3177 authored by Sylvain Dailler's avatar Sylvain Dailler

Q217-025 minor typo

Change-Id: Id165717756375db150031589740470cc1e08b8ac
parent a303ae72
......@@ -5,7 +5,7 @@ open Strings
exception Not_value
(* Adds all referenced cvc4 variables found in the term t to table *)
let rec get_variables_term (table: correspondance_table) t =
let rec get_variables_term (table: correspondence_table) t =
match t with
| Variable _ | Function_Local_Variable _ | Boolean _ | Integer _
| Decimal _ | Other _ | Bitvector _ -> table
......@@ -40,7 +40,7 @@ and get_variables_array table a =
let table = get_variables_term table t1 in
get_variables_term table t2
let get_all_var (table: correspondance_table) =
let get_all_var (table: correspondence_table) =
Mstr.fold (fun _key element table ->
match element with
| _, Noelement -> table
......@@ -89,7 +89,7 @@ let remove_end_num s =
(* Add the variables that can be deduced from ITE to the table of variables *)
let add_vars_to_table table value =
let rec add_vars_to_table (table: correspondance_table) value =
let rec add_vars_to_table (table: correspondence_table) value =
let t = match (snd value) with
| Term t -> t
| Function (_, t) -> t
......@@ -184,7 +184,7 @@ and refine_function table term =
To_array (refine_function table t)
and refine_variable_value (table: correspondance_table) key v =
and refine_variable_value (table: correspondence_table) key v =
let (b, t) = v in
if b then
table
......@@ -319,7 +319,7 @@ let corres_else_element table to_rep of_rep =
in
corres_else_element table to_rep of_rep
let to_rep_of_rep (table: correspondance_table) =
let to_rep_of_rep (table: correspondence_table) =
let to_reps =
List.sort (fun x y -> String.compare (fst x) (fst y))
(Mstr.fold (fun key value acc ->
......@@ -342,7 +342,7 @@ let to_rep_of_rep (table: correspondance_table) =
to_rep_of_rep table to_reps of_reps
let create_list (table: correspondance_table) =
let create_list (table: correspondence_table) =
(* First populate the table with all references to a cvc variable *)
let table = get_all_var table in
......
(* Debugging function *)
val print_table:
Smt2_model_defs.correspondance_table -> unit
Smt2_model_defs.correspondence_table -> unit
(* From the table generated by the parser, build a list of model_element *)
val create_list:
Smt2_model_defs.correspondance_table -> Model_parser.model_element list
Smt2_model_defs.correspondence_table -> Model_parser.model_element list
......@@ -12,7 +12,7 @@
%{
%}
%start <Smt2_model_defs.correspondance_table> output
%start <Smt2_model_defs.correspondence_table> output
%token <string> SPACE
%token <string> ATOM
%token MODEL
......
......@@ -27,9 +27,9 @@ type definition =
| Noelement
(* Type returned by parsing of model.
An hashtable that makes a correspondance between names (string) and
An hashtable that makes a correspondence between names (string) and
associated definition (complex stuff) *)
type correspondance_table = (bool * definition) Mstr.t
type correspondence_table = (bool * definition) Mstr.t
let rec print_array fmt a =
match a with
......@@ -63,7 +63,7 @@ let print_def fmt d =
| Term t -> Format.fprintf fmt "TERM : %a" print_term t
| Noelement -> Format.fprintf fmt "NOELEMENT"
let add_element x (t: correspondance_table) b =
let add_element x (t: correspondence_table) b =
match x with
| None -> t
| Some (key, value) ->
......
......@@ -29,13 +29,13 @@ type definition =
| Noelement
(* Type returned by parsing of model.
An hashtable that makes a correspondance between names (string) and
An hashtable that makes a correspondence between names (string) and
associated definition (complex stuff) *)
(* The boolean is true when the term has no external variable *)
type correspondance_table = (bool * definition) Mstr.t
type correspondence_table = (bool * definition) Mstr.t
val add_element: (string * definition) option ->
correspondance_table -> bool -> correspondance_table
correspondence_table -> bool -> correspondence_table
val make_local: variable list -> term -> term
......
......@@ -124,7 +124,8 @@ let get_list_projs t map_projs =
let rec projections_for_term ls term proj_name applied_projs env map_projs =
(* Return declarations for projections of the term.
Parameter proj_name is the name of the projection
Parameter applied_proj_f is a set of projection functions already applied to the term *)
Parameter applied_proj_f is a set of projection functions already applied
to the term *)
match (Opt.get term.t_ty).ty_node with
| Tyapp (ts, [_t_from; _t_to]) when ts.ts_name.id_string = "map" -> begin
let pfs = get_list_projs term map_projs in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment