invariants.core.computation

Model

class Model extends PropagationStructure

This class contains the model, namely, the invariants and variables They are all modeled as propagation Elements, which are handled by the inherited propagationstructure class.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Model
  2. PropagationStructure
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

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

    Verbose

    requires that the propagation structure prints a trace of what it is doing. all prints are preceded by PropagationStruture

    DebugMode

    specifies that once propagation is finished, it must call the checkInternals method on all propagation elements.

    NoCycle

    is to be set to true only if the static dependency graph between propagation elements has no cycles. If unsure, set to false, the engine will discover it by itself. See also method isAcyclic to query a propagation structure.

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

    specifies that once propagation is finished, it must call the checkInternals method on all propagation elements.

    specifies that once propagation is finished, it must call the checkInternals method on all propagation elements.

    Definition Classes
    ModelPropagationStructure
  7. def GetNextID (): Int

    Definition Classes
    PropagationStructure
  8. val NoCycle : Boolean

    is to be set to true only if the static dependency graph between propagation elements has no cycles.

    is to be set to true only if the static dependency graph between propagation elements has no cycles. If unsure, set to false, the engine will discover it by itself. See also method isAcyclic to query a propagation structure.

    Definition Classes
    ModelPropagationStructure
  9. var NotifiedInvariant : Invariant

  10. 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)

    Definition Classes
    PropagationStructure
  11. val Verbose : Boolean

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

    requires that the propagation structure prints a trace of what it is doing. all prints are preceded by PropagationStruture

    Definition Classes
    ModelPropagationStructure
  12. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  13. def checkExecutingInvariantOK (i: Invariant): Boolean

  14. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def close (DropStaticGraph: Boolean = true): Unit

    calls this when you have declared all your invariants and variables.

    calls this when you have declared all your invariants and variables. This must be called before any query and update can be made on the model, and after all the invariants and variables have been declared.

  16. def dropStaticGraph (): Unit

    Definition Classes
    PropagationStructure
  17. 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

    Definition Classes
    PropagationStructure
  18. def eq (arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    PropagationStructure
  23. 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

    Definition Classes
    PropagationStructure
  24. 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

    Definition Classes
    ModelPropagationStructure
  25. def getSolution (OnlyPrimitive: Boolean = true): Solution

    To save the current value of the variables registered in the model

    To save the current value of the variables registered in the model

    OnlyPrimitive

    if set to true (as by default) the solution will only contain the variables that are not derived through an invariant

  26. def getSourceVariables (v: Variable): SortedSet[Variable]

  27. 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

    Definition Classes
    PropagationStructure
  28. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  29. 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

    Definition Classes
    PropagationStructure
  30. def isClosed : Boolean

  31. def isInstanceOf [T0] : Boolean

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  35. 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.

    Definition Classes
    PropagationStructure
  36. def registerForPartialPropagation (p: PropagationElement): Unit

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

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

    Definition Classes
    PropagationStructure
  37. def registerInvariant (i: Invariant): Int

    Called by each invariants to register themselves to the model

    Called by each invariants to register themselves to the model

    i

    the invariant

    returns

    a unique identifier that will be used to distinguish invariants. basically, invariants use this value to set up an arbitrary ordering for use in dictionnaries.

  38. def registerVariable (v: Variable): Int

    Called by each variable to register themselves to the model

    Called by each variable to register themselves to the model

    v

    the variable

    returns

    a unique identifier that will be used to distinguish variables. basically, variables use this value to set up an arbitrary ordering for use in dictionnaries.

  39. def restoreSolution (s: Solution): Unit

    To restore a saved solution notice that only the variables that are not derived will be restored; others will be derived lazily at the next propagation wave.

    To restore a saved solution notice that only the variables that are not derived will be restored; others will be derived lazily at the next propagation wave. This enables invariants to rebuild their internal data structure if needed. Only solutions saved from the same model can be restored in the model.

  40. def scheduleForPropagation (p: PropagationElement): Unit

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

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

    Definition Classes
    PropagationStructure
  41. 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
    Definition Classes
    PropagationStructure
  42. def synchronized [T0] (arg0: ⇒ T0): T0

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

    Definition Classes
    Model → AnyRef → Any
  44. def toStringInputOnly : String

  45. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from PropagationStructure

Inherited from AnyRef

Inherited from Any