Class: Plumb::SemanticMatcher::NumericLiteral

Inherits:
Literal
  • Object
show all
Defined in:
lib/plumb/semantic_matcher.rb

Instance Attribute Summary

Attributes inherited from Node

#raw

Instance Method Summary collapse

Methods inherited from Literal

#error_message, #matcher_domain, #matches_value, #overlap_with_literal, #overlap_with_nominal, #overlap_with_pattern, #overlap_with_range, #singleton?, #subset_from_literal

Methods inherited from Node

#equivalent?, #error_message, #initialize, #intersect, #intersect_with_finite_set, #intersect_with_range, #matcher_domain, #matches_value, #nominal?, #overlap_with_finite_set, #overlap_with_literal, #overlap_with_nominal, #overlap_with_numeric_literal, #overlap_with_opaque, #overlap_with_pattern, #overlap_with_range, #overlap_with_text_literal, #singleton?, #subset_from_finite_set, #subset_from_literal, #subset_from_nominal, #subset_from_numeric_literal, #subset_from_opaque, #subset_from_pattern, #subset_from_range, #subset_from_text_literal

Constructor Details

This class inherits a constructor from Plumb::SemanticMatcher::Node

Instance Method Details

#kindObject



139
# File 'lib/plumb/semantic_matcher.rb', line 139

def kind = :numeric_literal

#overlap(other) ⇒ Object



148
149
150
151
152
# File 'lib/plumb/semantic_matcher.rb', line 148

def overlap(other)
  return Relation::PROVEN if equivalent?(other)

  other.overlap_with_numeric_literal(self)
end

#subset_of(other) ⇒ Object



142
143
144
145
146
# File 'lib/plumb/semantic_matcher.rb', line 142

def subset_of(other)
  return Relation::PROVEN if equivalent?(other)

  other.subset_from_numeric_literal(self)
end

#value_domainObject



140
# File 'lib/plumb/semantic_matcher.rb', line 140

def value_domain = ::Numeric