Module dev.civl.mc

Interface StateValueHelper


public interface StateValueHelper

This class provides a set of interfaces for help dealing with values of $state type objects.

This class provides methods for dealing with scope values problems: Scopes in the state referred by a $state object may not be consistent with other states.

  • Method Summary

    Modifier and Type
    Method
    Description
    dev.civl.sarl.IF.UnaryOperator<dev.civl.sarl.IF.expr.SymbolicExpression>
    scopeSubstituterForCurrentState(State currState, dev.civl.sarl.IF.expr.SymbolicExpression referredStateValue)
    Given a current State and a $state type object, returns a substituter that maps scope values in the state referred by the $state object to the scope values in the current state.
    dev.civl.sarl.IF.UnaryOperator<dev.civl.sarl.IF.expr.SymbolicExpression>
    scopeSubstituterForReferredState(State currState, dev.civl.sarl.IF.expr.SymbolicExpression referredStateValue)
    Given a current State and a $state type object "referredStateValue", returns a substituter.
  • Method Details

    • scopeSubstituterForReferredState

      dev.civl.sarl.IF.UnaryOperator<dev.civl.sarl.IF.expr.SymbolicExpression> scopeSubstituterForReferredState(State currState, dev.civl.sarl.IF.expr.SymbolicExpression referredStateValue)

      Given a current State and a $state type object "referredStateValue", returns a substituter. For the same scopes, the substituter substitutes their values in the current state to their values in the state referred by the $state object. For scopes that exist in the current state but not the state referred by $state object, this substituter substitutes them to an ModelConfiguration.DYNAMIC_UNDEFINED_SCOPE

      Parameters:
      currState - the current state which contains the $state type object
      referredStateValue - the value of a $state type object in the current state
      Returns:
      a substituter
    • scopeSubstituterForCurrentState

      dev.civl.sarl.IF.UnaryOperator<dev.civl.sarl.IF.expr.SymbolicExpression> scopeSubstituterForCurrentState(State currState, dev.civl.sarl.IF.expr.SymbolicExpression referredStateValue)

      Given a current State and a $state type object, returns a substituter that maps scope values in the state referred by the $state object to the scope values in the current state. The current state is the state contains the $state object.

      Parameters:
      currState - the current state which contains the $state type object
      referredStateValue - the value of a $state type object
      Returns:
      a substituter