Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / corelang.mli @ e7cc5186

History | View | Annotate | Download (5.86 KB)

1 a2d97a3e ploc
(********************************************************************)
2
(*                                                                  *)
3
(*  The LustreC compiler toolset   /  The LustreC Development Team  *)
4
(*  Copyright 2012 -    --   ONERA - CNRS - INPT                    *)
5
(*                                                                  *)
6
(*  LustreC is free software, distributed WITHOUT ANY WARRANTY      *)
7
(*  under the terms of the GNU Lesser General Public License        *)
8
(*  version 2.1.                                                    *)
9
(*                                                                  *)
10
(********************************************************************)
11 22fe1c93 ploc
12
13 a2d97a3e ploc
open LustreSpec
14 22fe1c93 ploc
15 e7cc5186 ploc
exception Error of Location.t * Error.error_kind
16
module VSet: Set.S
17
  
18 01c7d5e1 ploc
val dummy_type_dec: type_dec
19
val dummy_clock_dec: clock_dec
20
21 22fe1c93 ploc
val mktyp: Location.t -> type_dec_desc -> type_dec
22
val mkclock: Location.t -> clock_dec_desc -> clock_dec
23 ec433d69 xthirioux
val mkvar_decl: Location.t -> ?orig:bool -> ident * type_dec * clock_dec * bool (* is const *) * expr option (* value *) -> var_decl
24
25 22fe1c93 ploc
val var_decl_of_const: const_desc -> var_decl
26
val mkexpr: Location.t ->  expr_desc -> expr
27
val mkeq: Location.t -> ident list * expr -> eq
28
val mkassert: Location.t -> expr -> assert_t
29 ef34b4ae xthirioux
val mktop_decl: Location.t -> ident -> bool -> top_decl_desc -> top_decl
30 22fe1c93 ploc
val mkpredef_call: Location.t -> ident -> expr list -> expr
31 b08ffca7 xthirioux
val mk_new_name: (ident -> bool) -> ident -> ident
32 fc886259 xthirioux
val mk_new_node_name: node_desc -> ident -> ident
33 04a63d25 xthirioux
val mktop: top_decl_desc -> top_decl
34
35 3ca27bc7 ploc
(* constructor for machine types *)
36 1b683c9a ploc
val mkinstr: ?lustre_expr:expr -> ?lustre_eq: eq -> instr_t_desc -> instr_t
37 3ca27bc7 ploc
val get_instr_desc: instr_t -> instr_t_desc
38
val update_instr_desc: instr_t -> instr_t_desc -> instr_t
39
  
40 22fe1c93 ploc
val node_table : (ident, top_decl) Hashtbl.t
41 ef34b4ae xthirioux
val print_node_table:  Format.formatter -> unit -> unit
42 22fe1c93 ploc
val node_name: top_decl -> ident
43
val node_inputs: top_decl -> var_decl list
44
val node_from_name: ident -> top_decl
45
val is_generic_node: top_decl -> bool
46
val is_imported_node: top_decl -> bool
47
48 ef34b4ae xthirioux
val consts_table: (ident, top_decl) Hashtbl.t
49
val print_consts_table:  Format.formatter -> unit -> unit
50
val type_table: (type_dec_desc, top_decl) Hashtbl.t
51
val print_type_table:  Format.formatter -> unit -> unit
52 ec433d69 xthirioux
val is_clock_dec_type: type_dec_desc -> bool
53 22fe1c93 ploc
val get_repr_type: type_dec_desc -> type_dec_desc
54
val is_user_type: type_dec_desc -> bool
55 b1655a21 xthirioux
val coretype_equal: type_dec_desc -> type_dec_desc -> bool
56 22fe1c93 ploc
val tag_true: label
57
val tag_false: label
58 77a61575 xthirioux
val tag_default: label
59 ef34b4ae xthirioux
val tag_table: (label, top_decl) Hashtbl.t
60
val field_table: (label, top_decl) Hashtbl.t
61 22fe1c93 ploc
62
val get_enum_type_tags: type_dec_desc -> label list
63
64 6a6abd76 xthirioux
val get_struct_type_fields: type_dec_desc -> (label * type_dec_desc) list
65
66 ef34b4ae xthirioux
val consts_of_enum_type: top_decl -> top_decl list
67
68 22fe1c93 ploc
val const_of_bool: bool -> constant
69
val const_is_bool: constant -> bool
70
val const_negation: constant -> constant
71
val const_or: constant -> constant -> constant
72
val const_and: constant -> constant -> constant
73
val const_xor: constant -> constant -> constant
74
val const_impl: constant -> constant -> constant
75
76 01c7d5e1 ploc
val get_node_vars: node_desc -> var_decl list
77
val get_node_var: ident -> node_desc -> var_decl
78 b08ffca7 xthirioux
val get_node_eqs: node_desc -> eq list
79 01c7d5e1 ploc
val get_node_eq: ident -> node_desc -> eq
80 ed81df06 xthirioux
val get_node_interface: node_desc -> imported_node_desc
81 22fe1c93 ploc
82
(* val get_const: ident -> constant *)
83
84
val sort_handlers : (label * 'a) list -> (label * 'a) list
85
86
val is_eq_expr: expr -> expr -> bool
87
88 e7cc5186 ploc
(* val pp_error :  Format.formatter -> error -> unit *)
89 22fe1c93 ploc
90
(* Caution, returns an untyped, unclocked, etc, expression *)
91 b616fe7a xthirioux
val is_tuple_expr : expr -> bool
92 add75bcb xthirioux
val ident_of_expr : expr -> ident
93 fc886259 xthirioux
val expr_of_vdecl : var_decl -> expr
94 22fe1c93 ploc
val expr_of_ident : ident -> Location.t -> expr
95
val expr_list_of_expr : expr -> expr list
96
val expr_of_expr_list : Location.t -> expr list -> expr
97 54d032f5 xthirioux
val call_of_expr: expr -> (ident * expr list * expr option)
98 22fe1c93 ploc
val expr_of_dimension: Dimension.dim_expr -> expr
99
val dimension_of_expr: expr -> Dimension.dim_expr
100
val dimension_of_const: Location.t -> constant -> Dimension.dim_expr
101
102
(* REMOVED, pushed in utils.ml   val new_tag : unit -> tag *)
103
104
val add_internal_funs: unit -> unit
105
106
val pp_prog_type : Format.formatter -> program -> unit
107
108
val pp_prog_clock : Format.formatter -> program -> unit
109
110 ef34b4ae xthirioux
val const_of_top: top_decl -> const_desc
111
val node_of_top: top_decl -> node_desc
112
val imported_node_of_top: top_decl -> imported_node_desc
113
val typedef_of_top: top_decl -> typedef_desc
114
val dependency_of_top: top_decl -> (bool * ident)
115
116
val get_nodes : program -> top_decl list
117
val get_imported_nodes : program -> top_decl list
118
val get_consts : program -> top_decl list
119
val get_typedefs: program -> top_decl list
120
val get_dependencies : program -> top_decl list
121 c1adf235 ploc
(* val prog_unfold_consts: program -> program *)
122
123 ec433d69 xthirioux
val rename_static: (ident -> Dimension.dim_expr) -> type_dec_desc -> type_dec_desc
124
val rename_carrier: (ident -> ident) -> clock_dec_desc -> clock_dec_desc
125
126 a6df3992 Ploc
val get_expr_vars: expr -> Utils.ISet.t
127 22fe1c93 ploc
val expr_replace_var: (ident -> ident) -> expr -> expr
128
val eq_replace_rhs_var: (ident -> bool) -> (ident -> ident) -> eq -> eq
129
130 e2380d4d ploc
(** rename_prog f_node f_var f_const prog *)
131
val rename_prog: (ident -> ident) -> (ident -> ident) -> (ident -> ident) -> program -> program
132 53206908 xthirioux
133 af5af1e8 ploc
val substitute_expr: var_decl list -> eq list -> expr -> expr
134 22fe1c93 ploc
135 ec433d69 xthirioux
val copy_var_decl: var_decl -> var_decl
136
val copy_const: const_desc -> const_desc
137
val copy_node: node_desc -> node_desc
138
val copy_top: top_decl -> top_decl
139
val copy_prog: top_decl list -> top_decl list
140
141 01c7d5e1 ploc
(** Annotation expression related functions *)
142
val mkeexpr: Location.t ->  expr -> eexpr
143
val merge_node_annot: node_annot -> node_annot -> node_annot 
144
val extend_eexpr: (quantifier_type * var_decl list) list -> eexpr -> eexpr
145 04a63d25 xthirioux
val update_expr_annot: ident -> expr -> expr_annot -> expr
146 01c7d5e1 ploc
(* val mkpredef_call: Location.t -> ident -> eexpr list -> eexpr*)
147
148 e7cc5186 ploc
val expr_contains_expr: tag -> expr -> bool
149 22fe1c93 ploc
(* Local Variables: *)
150
(* compile-command:"make -C .." *)
151
(* End: *)