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

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

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.

RBS:

  • (differences: Array[Difference], explored: Integer, truncated: bool, max_tokens: Integer, max_cases: Integer) -> void

Parameters:

  • differences: (Array[Difference])
  • explored: (Integer)
  • truncated: (Boolean)
  • max_tokens: (Integer)
  • max_cases: (Integer)


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

#differencesArray[Difference] (readonly)

Signature:

  • Array[Difference]

Returns:



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

def differences
  @differences
end

#exploredInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


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

def explored
  @explored
end

#max_casesInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


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

def max_cases
  @max_cases
end

#max_tokensInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


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

def max_tokens
  @max_tokens
end

#truncatedBoolean (readonly)

Signature:

  • bool

Returns:

  • (Boolean)


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

def truncated
  @truncated
end

Instance Method Details

#ok?Boolean

RBS:

  • () -> bool

Returns:

  • (Boolean)


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

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