Module: Gisele::Analysis::Mixin::VarsHolder

Included in:
Session
Defined in:
lib/gisele/analysis/mixin/vars_holder.rb

Instance Method Summary collapse

Instance Method Details

#c0_from_variablesObject



25
26
27
28
29
30
31
32
# File 'lib/gisele/analysis/mixin/vars_holder.rb', line 25

def c0_from_variables
  cube = []
  variables.each do |var|
    next if var.initially.nil?
    cube << (var.initially ? var.bdd : !var.bdd)
  end
  bdd_interface.cube(cube, :bdd)
end

#fluent(name, init_events, term_events, initially = nil) ⇒ Object



17
18
19
# File 'lib/gisele/analysis/mixin/vars_holder.rb', line 17

def fluent(name, init_events, term_events, initially=nil)
  add_var Fluent.new(session, name, init_events, term_events, initially)
end

#trackvar(name, update_events, initially = nil) ⇒ Object



21
22
23
# File 'lib/gisele/analysis/mixin/vars_holder.rb', line 21

def trackvar(name, update_events, initially=nil)
  add_var Trackvar.new(session, name, update_events, initially)
end

#variable(name, raise_on_missing = false) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/gisele/analysis/mixin/vars_holder.rb', line 9

def variable(name, raise_on_missing = false)
  if var = variables.find{|v| v.name==name}
    var
  elsif raise_on_missing
    raise Gisele::NoSuchVariableError, "No such variable `#{name}`"
  end
end

#variablesObject



5
6
7
# File 'lib/gisele/analysis/mixin/vars_holder.rb', line 5

def variables
  @variables ||= []
end