Class: Bparity::Formal::Assumptions::WorldFreeze

Inherits:
Object
  • Object
show all
Defined in:
lib/bparity/formal/assumptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(classes) ⇒ WorldFreeze

Returns a new instance of WorldFreeze.



67
68
69
# File 'lib/bparity/formal/assumptions.rb', line 67

def initialize(classes)
  @classes = classes
end

Instance Method Details

#checkObject



71
72
73
74
75
76
77
# File 'lib/bparity/formal/assumptions.rb', line 71

def check(&)
  RuntimeMonitor.install!
  before = fingerprint
  value, violations = RuntimeMonitor.capture(@classes, &)
  violations << "H1: a target class changed during verification" unless before == fingerprint
  [value, violations.uniq]
end