Skip to content
Snippets Groups Projects
actionsDeps.mli 1.71 KiB
(** Time-stamp: <modified the 02/04/2013 (at 16:06) by Erwan Jahier> *)

(** Compute dependencies between actions  *)


type t

val empty : t

(** Linear in the size of the first parameter *)
val concat: t -> t -> t


(** An action is an intermediary data type that is used to translate expressions
    into [Soc.gao]. It is basically a clocked Soc.atomic_operation with arguments.

    The idea is that each expression is translated into one or several actions.
    And those clocks are then translated into guards, so that each action is
    translated into a gao.

    A more natural Module to define that type in would have been Soc, but that
    module is meant to be shared with other front-ends (e.g., lucid-synchrone),
    and I prefer that module not to depend on 
    - such a cutting (expr -> action -> gao)
    - The [Eff.clock] name (could have been a module parameter though).
  *)

type rhs = Soc.var_expr list
type lhs = Soc.var_expr list
type action = Lic.clock * rhs * lhs * Soc.atomic_operation * Lxm.t

val string_of_action_simple: action -> string


(** Compute the action dependencies that comes from the I/O. 

    Construit des dépendances entre les actions en reliant les entrées et
    les sorties de ces actions. 

    Lic2soc.lic_to_soc_type is passed inn argument to break a mutuel dep loop
*)
val build_data_deps_from_actions:  (Lic.type_ -> Soc.var_type) -> t -> action list -> t

(** Use the dependency constraints that come from the SOC (e.g., 'get' before 'set'
    in memory SOC).
*)
val generate_deps_from_step_policy: Soc.precedence list -> (string * action) list -> t

(** Returns the list of actions that depends on the action in argument. *)
val find_deps: t -> action -> action list

val to_string: t -> string