Class: Gisele::Analysis::Trackvar

Inherits:
Variable
  • Object
show all
Defined in:
lib/gisele/analysis/variable/trackvar.rb

Instance Attribute Summary collapse

Attributes inherited from Variable

#bdd, #initially, #name, #session

Instance Method Summary collapse

Methods inherited from Variable

#install, #to_dnf

Methods included from Mixin::BddManagement

#bdd, #bdd_interface, #cudd_manager, #one, #with_bdd, #zero

Constructor Details

#initialize(session, name, update_events, initially) ⇒ Trackvar

Returns a new instance of Trackvar.



6
7
8
9
# File 'lib/gisele/analysis/variable/trackvar.rb', line 6

def initialize(session, name, update_events, initially)
  super(session, name, initially)
  @update_events = update_events
end

Instance Attribute Details

#update_eventsObject (readonly)

Returns the value of attribute update_events.



4
5
6
# File 'lib/gisele/analysis/variable/trackvar.rb', line 4

def update_events
  @update_events
end

Instance Method Details

#apply_on_invariant(invariant, event) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/gisele/analysis/variable/trackvar.rb', line 11

def apply_on_invariant(invariant, event)
  if invariant == zero
    zero
  elsif update_events.include?(event)
    invariant.exist_abstract(bdd)
  else
    invariant
  end
end