Record Class FunctionSummary
java.lang.Object
java.lang.Record
org.ek9lang.compiler.symbolic.FunctionSummary
- Record Components:
requires- the parameter preconditions this callable asserts (empty when none are modellable)
The inter-procedural summary of a callable (docs/tooling/EK9_SYMBOLIC_SCANNER_IMPLEMENTATION_SPEC.md
§3.4) — the facts about it a caller needs to reason across the call boundary without
re-analysing its whole body. For M4 this is its
require preconditions: a caller that passes an
argument violating a callee's require triggers an uncatchable Panic on that path, and
the same predicates, read on the function itself, discharge its own downstream obligations (a division
guarded by require x <> 0 is safe).
Only the simple, decidable require shape is modelled: a single relational comparison of one
parameter against an integer literal (x <> 0, n > 0, …). Compound / opaque
requires are conservatively omitted. canReturnUnset/Empty/Error and resultRange
(Example 5, producer cases) are a later extension.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA singlerequireprecondition:param OP literal, keyed to the parameter's position so a call site can map it onto the matching argument. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FunctionSummaryAn empty summary — no modellable preconditions. -
Constructor Summary
ConstructorsConstructorDescriptionFunctionSummary(List<FunctionSummary.RequirePredicate> requires) Creates an instance of aFunctionSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanrequires()Returns the value of therequiresrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
An empty summary — no modellable preconditions.
-
-
Constructor Details
-
FunctionSummary
Creates an instance of aFunctionSummaryrecord class.- Parameters:
requires- the value for therequiresrecord component
-
-
Method Details
-
hasRequires
public boolean hasRequires() -
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). -
requires
-