class Roby::EventConstraints::UnboundTaskPredicate::Never
Representation of UnboundPredicateSupport#never
See documentation from UnboundPredicateSupport
Attributes
predicate[R]
Public Class Methods
new(pred)
click to toggle source
# File lib/roby/event_constraints.rb, line 429 def initialize(pred) if !pred.kind_of?(UnboundTaskPredicate::SingleEvent) raise ArgumentError, "can only create a Never predicate on top of a SingleEvent" end @predicate = pred end
Public Instance Methods
==(pred)
click to toggle source
# File lib/roby/event_constraints.rb, line 437 def ==(pred); pred.kind_of?(Never) && pred.predicate == predicate end
code()
click to toggle source
# File lib/roby/event_constraints.rb, line 462 def code "(!task_#{predicate.event_name} && task_event_#{predicate.event_name}.unreachable?)" end
explain_false(task)
click to toggle source
# File lib/roby/event_constraints.rb, line 443 def explain_false(task) return if evaluate(task) if predicate.evaluate(task) predicate.explain_true(task) elsif !predicate.static?(task) explanation = predicate.explain_false(task) explanation.value = true explanation end end
explain_static(task)
click to toggle source
# File lib/roby/event_constraints.rb, line 453 def explain_static(task) if predicate.evaluate(task) predicate.explain_true(task) else predicate.explain_static(task) end end
explain_true(task)
click to toggle source
# File lib/roby/event_constraints.rb, line 439 def explain_true(task) return if !evaluate(task) predicate.explain_static(task) end
required_events()
click to toggle source
# File lib/roby/event_constraints.rb, line 461 def required_events; predicate.required_events end
static?(task)
click to toggle source
# File lib/roby/event_constraints.rb, line 465 def static?(task) evaluate(task) || predicate.static?(task) end
to_s()
click to toggle source
# File lib/roby/event_constraints.rb, line 468 def to_s; "never(#{predicate})" end