Class: Bud::BoolLattice

Inherits:
Lattice show all
Defined in:
lib/bud/lattice-lib.rb

Overview

XXX: consider creating two fixed (“interned”) values for true and false.

Instance Method Summary (collapse)

Methods inherited from Lattice

#<=>, #==, #eql?, global_mfuncs, global_morphs, #hash, #inspect, lattice_kinds, mfuncs, monotone, morph, morphs, #reject_input, #reveal, #wrap_unsafe, wrapper, wrapper_name

Constructor Details

- (BoolLattice) initialize(i = false)



73
74
75
76
# File 'lib/bud/lattice-lib.rb', line 73

def initialize(i=false)
  reject_input(i) unless [true, false].include? i
  @v = i
end

Instance Method Details

- (Object) merge(i)



78
79
80
# File 'lib/bud/lattice-lib.rb', line 78

def merge(i)
  self.class.new(@v || i.reveal)
end