Class: Ibex::Verify::LanguageWitness::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/verify/language_witness.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(differences:, explored:, truncated:, max_tokens:, max_cases:) ⇒ Result

Returns a new instance of Result.



44
45
46
47
48
49
50
51
# File 'lib/ibex/verify/language_witness.rb', line 44

def initialize(differences:, explored:, truncated:, max_tokens:, max_cases:)
  @differences = differences.dup.freeze
  @explored = explored
  @truncated = truncated
  @max_tokens = max_tokens
  @max_cases = max_cases
  freeze
end

Instance Attribute Details

#differencesObject (readonly)

: Array



36
37
38
# File 'lib/ibex/verify/language_witness.rb', line 36

def differences
  @differences
end

#exploredObject (readonly)

: Integer



37
38
39
# File 'lib/ibex/verify/language_witness.rb', line 37

def explored
  @explored
end

#max_casesObject (readonly)

: Integer



40
41
42
# File 'lib/ibex/verify/language_witness.rb', line 40

def max_cases
  @max_cases
end

#max_tokensObject (readonly)

: Integer



39
40
41
# File 'lib/ibex/verify/language_witness.rb', line 39

def max_tokens
  @max_tokens
end

#truncatedObject (readonly)

: bool



38
39
40
# File 'lib/ibex/verify/language_witness.rb', line 38

def truncated
  @truncated
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/ibex/verify/language_witness.rb', line 54

def ok?
  differences.empty? && !truncated
end