Record Class SymbolicTermValue
- Record Components:
name- the term's name (today the source symbol name; hardening: key by symbol identity)
- All Implemented Interfaces:
AbstractValue
TopValue.
This is the value the ∃-polarity symbolic engine (the Contract/Symbolic scanner, M3) seeds where
the analyzer would otherwise record TOP. TOP means "no information" and collapses at a branch merge;
a symbolic term means "some specific but unknown input value", and it must survive a merge so
a path condition can be accumulated across branches. That survival is the entire mechanism:
join(AbstractValue) returns this when merged with the same named term (both paths
agree it is the same input), and widens to TOP otherwise — so it rides the existing
ConstraintState/branch-stack unchanged, with no parallel store.
It is deliberately NOT known-set (see AbstractValue.isKnownSet()): the engine reasons
about "for some input", so a symbolic term must never be treated as a proven value. It answers
evaluateCondition(String, AbstractValue) as UNKNOWN — relational reasoning about terms is done by the
orthogonal PathCondition, not by the per-value lattice.
Design proven by spikes S1/S3 (see EK9_SYMBOLIC_SCANNER_IMPLEMENTATION_SPEC.md §11 and the
preserved body in EK9_SYMBOLIC_SCANNER_SPIKE_REFERENCE.md §4.2): the only change to existing
lattice code is adding this to the AbstractValue permits clause + one isKnownSet
case.
-
Constructor Summary
ConstructorsConstructorDescriptionSymbolicTermValue(String name) Creates an instance of aSymbolicTermValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.evaluateCondition(String operator, AbstractValue operand) Evaluate whether this abstract value satisfies a comparison condition.final inthashCode()Returns a hash code value for this object.booleanisBottom()Check if this value represents an unreachable program point.booleanisKnown()Check if this value represents a known state (not TOP and not BOTTOM).join(AbstractValue other) Join this value with another at a branch convergence point.name()Returns the value of thenamerecord component.toString()Returns a string representation of this record class.Methods inherited from interface AbstractValue
isKnownSet
-
Constructor Details
-
SymbolicTermValue
-
-
Method Details
-
join
Description copied from interface:AbstractValueJoin this value with another at a branch convergence point. Returns the least upper bound of the two values.Key rules:
- BOTTOM join X = X (unreachable path is ignored)
- X join BOTTOM = X
- TOP join X = TOP
- Constant(a) join Constant(a) = Constant(a) (both agree)
- Constant(a) join Constant(b) = TOP (disagreement)
- Specified by:
joinin interfaceAbstractValue
-
evaluateCondition
Description copied from interface:AbstractValueEvaluate whether this abstract value satisfies a comparison condition.- Specified by:
evaluateConditionin interfaceAbstractValue- Parameters:
operator- the comparison operator (==, <>, <, >, etc.)operand- the right-hand side value to compare against- Returns:
- TRUE if condition is always satisfied, FALSE if never satisfied, UNKNOWN if indeterminate
-
isKnown
public boolean isKnown()Description copied from interface:AbstractValueCheck if this value represents a known state (not TOP and not BOTTOM).- Specified by:
isKnownin interfaceAbstractValue
-
isBottom
public boolean isBottom()Description copied from interface:AbstractValueCheck if this value represents an unreachable program point.- Specified by:
isBottomin interfaceAbstractValue
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-