invariants.core.propagation

PropagationStructure

class PropagationStructure extends AnyRef

This class manages propagation among propagation elements.

This class is intended to be extended, and the overriding class must implement the method getPropagationElements that returns the propagation elements to be considered Each propagation element has a UniqueID. Those should be assigned continuously starting from 0.

It is to be used as follows: once the set of propagation elements is stabilized, one must call setupPropagationStructure, which will built the necessary internal data structure propagation are triggered by calling the propagate method. additionally, before calling setupPropagationStructure, the method registerForPartialPropagation can be called to specify propagation elements that might require lazy propagation.

Two debug mechanisms are provided: trace printing and debug mode.

A trace printing is provided; the propagation structure prints a trace of what it is propagating. This is activated by the Verbose parameter. All prints are preceded by PropagationStruture This an be useful when checking the behavior of partial propagation.

A self-check method is called by the propagation structure after propagation is performed. This is activated by the DebugMode parameter. You should ensure that Asteroid is compiled with assert activated if you are using the debug mode. It will considerably slow down Asteroid, as other checks are implemented in the base modules.

Also, although this propagation structure is intended to support acyclic graph for the static dependency graph, you can deactivate the associated mechanism by setting the IsAcyclic graph to true. If unsure, set to false (or do not set; it is false by default), the engine will discover it by itself. See also method isAcyclic to query a propagation structure.

Attributes
abstract
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. PropagationStructure
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PropagationStructure (Verbose: Boolean, DebugMode: Boolean, NoCycle: Boolean)

    Verbose

    requires that the propagation structure prints a trace of what it is doing.

    DebugMode

    to active the debug mode

    NoCycle

    is to be set to true only if the static dependency graph is acyclic.

Abstract Value Members

  1. def getPropagationElements : Iterable[PropagationElement]

    This method is to be overriden and is expected to return the propagation elements on which the propagation structure will reason.

    This method is to be overriden and is expected to return the propagation elements on which the propagation structure will reason. The method is expected to return consistent result once the setupPropagationStructure method is called

    Attributes
    abstract

Concrete Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. val DebugMode : Boolean

    to active the debug mode

  7. def GetNextID (): Int

  8. val NoCycle : Boolean

    is to be set to true only if the static dependency graph is acyclic.

  9. var PropagatingElement : PropagationElement

    this variable is set by the propagation element to notify that they are propagating.

    this variable is set by the propagation element to notify that they are propagating. it is used to ensure that no propagation element perform illegal operation such as writing a variable they do not control, etc)

  10. val Verbose : Boolean

    requires that the propagation structure prints a trace of what it is doing.

  11. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  12. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def dropStaticGraph (): Unit

  14. def dumpToDot (StaticGraph: Boolean, DynamicGraph: Boolean, Target: PropagationElement = null): String

    This dumps the propagation graphs in a dot format, for documentation purposes Static graph should only be set if the static graph has not been dropped

    This dumps the propagation graphs in a dot format, for documentation purposes Static graph should only be set if the static graph has not been dropped

    StaticGraph

    adds the static graph as red arrows

    DynamicGraph

    adds the dynamic graph as blue arrows

    returns

    a string that contains the dot format

  15. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def getMaxID : Int

  20. def getPropagatingElement : PropagationElement

    returns the propagation element that is currently propagating.

    returns the propagation element that is currently propagating. it allows one to ensure that the propagating element behaves as declared in its dependencies

  21. def getStalls : Int

    return the summed stalls of all SCC.

    return the summed stalls of all SCC. A stall is when the SCC is unable to maintain the topological sort incrementally, and must recompute it from scratch this happens when dependencies are modified with transient cycles

    returns

    the summed number of stalls for all the SCC

  22. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  23. def isAcyclic : Boolean

    returns

    true if the propagation structure consider that his graph is acyclic, false otherwise. call this after the call to setupPropagationStructure If the propagation structure has been created with NoCycle set to true, this will return true

  24. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  25. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  26. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  27. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  28. def propagate (UpTo: PropagationElement = null): Unit

    triggers the propagation in the graph.

    triggers the propagation in the graph. this method will do nothing if called before setupPropagationStructure if UpTo set to a PropagationElement, and provided it has been registered through the registerForPartialPropagation method, the propagation will be partial, targeting this element.

  29. def registerForPartialPropagation (p: PropagationElement): Unit

    to call before setupPropagationStructure to specify PropagationElements on which one will invoque partial propagation

  30. def scheduleForPropagation (p: PropagationElement): Unit

    this method is used by propagationComponents to schedule themself for propagation.

  31. def setupPropagationStructure (DropStaticGraph: Boolean): Unit

    To call when one has defined all the propagation elements on which propagation will ever be triggered.

    To call when one has defined all the propagation elements on which propagation will ever be triggered. It must be called before any propagation is triggered, as it allows the propagation structure to build the necessary internal structures

    DropStaticGraph

    if true, the propagation structure drops the static graph after setup.

    Attributes
    protected
  32. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  33. def toString (): String

    Definition Classes
    AnyRef → Any
  34. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any