Class: LogicConstraint
Represents a logical constraint or guard that must evaluate to true. Unlike a Goal/Call, this delegates to the expression evaluator rather than the predicate resolution engine.
Example
ts
baz(X) :- X > 4. // "X > 4" is the ConstraintConstructors
Constructor
new LogicConstraint(
expression,loc?):LogicConstraint
Parameters
| Parameter | Type |
|---|---|
expression | Expression |
loc? | SourceLocation |
Returns
LogicConstraint
Overrides
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata