Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / corelang.mli @ b08ffca7

History | View | Annotate | Download (5.07 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 52cfee34 xthirioux
exception Error of Location.t * error
16 22fe1c93 ploc
17 01c7d5e1 ploc
val dummy_type_dec: type_dec
18
val dummy_clock_dec: clock_dec
19
20 22fe1c93 ploc
val mktyp: Location.t -> type_dec_desc -> type_dec
21
val mkclock: Location.t -> clock_dec_desc -> clock_dec
22
val mkvar_decl: Location.t -> ident * type_dec * clock_dec * bool (* is const *) -> var_decl
23
val var_decl_of_const: const_desc -> var_decl
24
val mkexpr: Location.t ->  expr_desc -> expr
25
val mkeq: Location.t -> ident list * expr -> eq
26
val mkassert: Location.t -> expr -> assert_t
27 ef34b4ae xthirioux
val mktop_decl: Location.t -> ident -> bool -> top_decl_desc -> top_decl
28 22fe1c93 ploc
val mkpredef_call: Location.t -> ident -> expr list -> expr
29 b08ffca7 xthirioux
val mk_new_name: (ident -> bool) -> ident -> ident
30 22fe1c93 ploc
31
32
val node_table : (ident, top_decl) Hashtbl.t
33 ef34b4ae xthirioux
val print_node_table:  Format.formatter -> unit -> unit
34 22fe1c93 ploc
val node_name: top_decl -> ident
35
val node_inputs: top_decl -> var_decl list
36
val node_from_name: ident -> top_decl
37
val is_generic_node: top_decl -> bool
38
val is_imported_node: top_decl -> bool
39
40 ef34b4ae xthirioux
val consts_table: (ident, top_decl) Hashtbl.t
41
val print_consts_table:  Format.formatter -> unit -> unit
42
val type_table: (type_dec_desc, top_decl) Hashtbl.t
43
val print_type_table:  Format.formatter -> unit -> unit
44 22fe1c93 ploc
val get_repr_type: type_dec_desc -> type_dec_desc
45
val is_user_type: type_dec_desc -> bool
46 b1655a21 xthirioux
val coretype_equal: type_dec_desc -> type_dec_desc -> bool
47 22fe1c93 ploc
val tag_true: label
48
val tag_false: label
49 ef34b4ae xthirioux
val tag_table: (label, top_decl) Hashtbl.t
50
val field_table: (label, top_decl) Hashtbl.t
51 22fe1c93 ploc
52
val get_enum_type_tags: type_dec_desc -> label list
53
54 6a6abd76 xthirioux
val get_struct_type_fields: type_dec_desc -> (label * type_dec_desc) list
55
56 ef34b4ae xthirioux
val consts_of_enum_type: top_decl -> top_decl list
57
58 22fe1c93 ploc
val const_of_bool: bool -> constant
59
val const_is_bool: constant -> bool
60
val const_negation: constant -> constant
61
val const_or: constant -> constant -> constant
62
val const_and: constant -> constant -> constant
63
val const_xor: constant -> constant -> constant
64
val const_impl: constant -> constant -> constant
65
66 01c7d5e1 ploc
val get_node_vars: node_desc -> var_decl list
67
val get_node_var: ident -> node_desc -> var_decl
68 b08ffca7 xthirioux
val get_node_eqs: node_desc -> eq list
69 01c7d5e1 ploc
val get_node_eq: ident -> node_desc -> eq
70 ed81df06 xthirioux
val get_node_interface: node_desc -> imported_node_desc
71 22fe1c93 ploc
72
(* val get_const: ident -> constant *)
73
74
val sort_handlers : (label * 'a) list -> (label * 'a) list
75
76
val is_eq_expr: expr -> expr -> bool
77
78
val pp_error :  Format.formatter -> error -> unit
79
80
(* Caution, returns an untyped, unclocked, etc, expression *)
81 b616fe7a xthirioux
val is_tuple_expr : expr -> bool
82 add75bcb xthirioux
val ident_of_expr : expr -> ident
83 22fe1c93 ploc
val expr_of_ident : ident -> Location.t -> expr
84
val expr_list_of_expr : expr -> expr list
85
val expr_of_expr_list : Location.t -> expr list -> expr
86
val call_of_expr: expr -> (ident * expr list * (ident * label) option)
87
val expr_of_dimension: Dimension.dim_expr -> expr
88
val dimension_of_expr: expr -> Dimension.dim_expr
89
val dimension_of_const: Location.t -> constant -> Dimension.dim_expr
90
91
(* REMOVED, pushed in utils.ml   val new_tag : unit -> tag *)
92
93
val add_internal_funs: unit -> unit
94
95
val pp_prog_type : Format.formatter -> program -> unit
96
97
val pp_prog_clock : Format.formatter -> program -> unit
98
99 ef34b4ae xthirioux
val const_of_top: top_decl -> const_desc
100
val node_of_top: top_decl -> node_desc
101
val imported_node_of_top: top_decl -> imported_node_desc
102
val typedef_of_top: top_decl -> typedef_desc
103
val dependency_of_top: top_decl -> (bool * ident)
104
105
val get_nodes : program -> top_decl list
106
val get_imported_nodes : program -> top_decl list
107
val get_consts : program -> top_decl list
108
val get_typedefs: program -> top_decl list
109
val get_dependencies : program -> top_decl list
110 c1adf235 ploc
(* val prog_unfold_consts: program -> program *)
111
112 2822cf55 xthirioux
val get_expr_vars: Utils.ISet.t -> expr -> Utils.ISet.t
113 22fe1c93 ploc
val expr_replace_var: (ident -> ident) -> expr -> expr
114
val eq_replace_rhs_var: (ident -> bool) -> (ident -> ident) -> eq -> eq
115
116 e2380d4d ploc
(** rename_prog f_node f_var f_const prog *)
117
val rename_prog: (ident -> ident) -> (ident -> ident) -> (ident -> ident) -> program -> program
118
119 22fe1c93 ploc
val update_expr_annot: expr -> LustreSpec.expr_annot -> expr
120
121 af5af1e8 ploc
val substitute_expr: var_decl list -> eq list -> expr -> expr
122 22fe1c93 ploc
123 01c7d5e1 ploc
(** Annotation expression related functions *)
124
val mkeexpr: Location.t ->  expr -> eexpr
125
val merge_node_annot: node_annot -> node_annot -> node_annot 
126
val extend_eexpr: (quantifier_type * var_decl list) list -> eexpr -> eexpr
127
val update_expr_annot: expr -> expr_annot -> expr
128
(* val mkpredef_call: Location.t -> ident -> eexpr list -> eexpr*)
129
130 22fe1c93 ploc
(* Local Variables: *)
131
(* compile-command:"make -C .." *)
132
(* End: *)