Module SubSystem

Abstract system

The functions and data types of this module are polymorphic in the actual source of the input system. See functions in InputSystem to delegate to concrete implementations of an input format.

A system is a set of subsystems, identified by a unique scope and containing instances of one other in a directed acyclic manner. Each system has at least an implementation or a contract, it may have both.

type 'a t = {
  1. scope : Scope.t;
    (*

    Name of the system as a scope

    *)
  2. source : 'a;
    (*

    Original input

    *)
  3. opacity : Opacity.t;
    (*

    Whether the system should be always abstracted by its contract, never, or sometimes

    *)
  4. has_contract : bool;
    (*

    System has a contract

    *)
  5. has_modes : bool;
    (*

    System has modes.

    *)
  6. has_impl : bool;
    (*

    System has an implementation

    *)
  7. map : 'a t Scope.Hashtbl.t;
  8. subsystems : Scope.t list;
    (*

    Sub-systems

    *)
}

A system parameterized by its actual source

val strategy_info_of : 'a t -> Strategy.info

Strategy info of a subsystem.

val all_subsystems : 'a t -> 'a t list

Return all subsystems in topological order with the top system at the head of the list

val all_subsystems_of_list : 'a t list -> 'a t list

Return all subsystems of the list in topological order

val find_subsystem : 'a t -> Scope.t -> 'a t

Return the subsystem of the given scope

Raise Not_found if there is no subsystem of that scope

val find_subsystem_of_list : 'a t list -> Scope.t -> 'a t