class StateMachineChecker::StateResult
The result of checking whether this state satisfies a formula.
Attributes
path[R]
satisfied[R]
Public Class Methods
new(satisfied, path)
click to toggle source
@param [Boolean] satisfied @param [Array<Symbol>] path
# File lib/state_machine_checker/state_result.rb, line 6 def initialize(satisfied, path) @satisfied = satisfied @path = path end
Public Instance Methods
and(other)
click to toggle source
# File lib/state_machine_checker/state_result.rb, line 45 def and(other) if !other.satisfied? other else self end end
counterexample()
click to toggle source
A counterexample demonstrating that the formula is not satisfied from this state.
@return [Array<Symbol>] an array of the names of transitions.
# File lib/state_machine_checker/state_result.rb, line 31 def counterexample unless satisfied? path end end
or(other)
click to toggle source
# File lib/state_machine_checker/state_result.rb, line 37 def or(other) if satisfied? self else other end end
satisfied?()
click to toggle source
Whether the formula is satisfied from this state.
@return [true, false]
# File lib/state_machine_checker/state_result.rb, line 14 def satisfied? satisfied end
witness()
click to toggle source
A witness that the formula is satisfied from this state.
@return [Array<Symbol>] an array of the names of transitions.
# File lib/state_machine_checker/state_result.rb, line 21 def witness if satisfied? path end end