Revision a7062da6
Added by LĂ©lio Brun over 3 years ago
src/backends/Ada/misc_lustre_function.mli | ||
---|---|---|
1 |
open Utils |
|
2 |
open Machine_code_types |
|
3 |
|
|
4 |
val is_machine_statefull: machine_t -> bool |
|
5 |
val is_arrow: machine_t -> bool |
|
6 |
|
|
7 |
(** Find all polymorphic type : Types.Tunivar in a machine. @param machine the |
|
8 |
machine @return a list of id corresponding to polymorphic type **) |
|
9 |
val find_all_polymorphic_type: machine_t -> int list |
|
10 |
|
|
11 |
(** Test if two types are the same. @param typ1 the first type @param typ2 the |
|
12 |
second type **) |
|
13 |
val pp_eq_type: Types.t -> Types.t -> bool |
|
14 |
|
|
15 |
(** Check if a submachine is statefull. @param submachine a submachine @return |
|
16 |
true if the submachine is statefull **) |
|
17 |
val is_submachine_statefull: 'a * ('b * machine_t) -> bool |
|
18 |
|
|
19 |
(** Extract from a machine the instance corresponding to the identifier, assume |
|
20 |
that the identifier exists in the instances of the machine. |
|
21 |
|
|
22 |
@param identifier the instance identifier @param machine a machine @return |
|
23 |
the instance of machine.minstances corresponding to identifier **) |
|
24 |
val get_instance: 'a -> ('a * 'b) list -> 'b |
|
25 |
|
|
26 |
val build_if: 'a -> ident -> 'b -> ('c * 'b) list -> bool * 'a * 'b * 'b option |
|
27 |
|
|
28 |
(** Extract from a machine list the one corresponding to the given instance. |
|
29 |
assume that the machine is in the list. @param machines list of all machines |
|
30 |
@param instance instance of a machine @return the machine corresponding to |
|
31 |
hte given instance **) |
|
32 |
val get_machine: machine_t list -> 'a * (Lustre_types.top_decl * 'b) -> machine_t |
|
33 |
|
|
34 |
(** Extract from a subinstance that can have polymorphic type the instantiation |
|
35 |
of all its polymorphic type instanciation for a given machine. It searches |
|
36 |
the step calls and extract a substitution for all polymorphic type from it. |
|
37 |
@param machine the machine which instantiate the subinstance @param ident |
|
38 |
the identifier of the instance which permits to find the step call @param |
|
39 |
submachine the machine corresponding to the subinstance @return the |
|
40 |
correspondance between polymorphic type id and their instantiation **) |
|
41 |
val get_substitution: machine_t -> ident -> machine_t -> (int * Types.t) list |
Also available in: Unified diff
another step towards refactoring