Package ch.so.agi.mcp.constraint
Class ConstraintExpressionEngine
java.lang.Object
ch.so.agi.mcp.constraint.ConstraintExpressionEngine
Version-neutral evaluator and structural test-goal planner for
ConstraintExpression.
The engine operates on semantic IDs, never on INTERLIS surface syntax. It therefore evaluates
Math.add(a,b) and the INTERLIS 2.4 a + b representation identically once both have
been translated to the same IR.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumDesired semantic state for a generated structural test goal.static enumA boolean evaluation stopped because an operand had no value; not a technical failure.static final recordMeta-level assertion, deliberately distinct from an executable INTERLIS expression.static final recordstatic enumExplicit value used when an INTERLIS expression is not defined.static final class -
Method Summary
Modifier and TypeMethodDescriptionstatic Objectevaluate(ConstraintExpression expression, ConstraintExpressionEngine.EvaluationContext context) Returns a value, missing value (ConstraintExpressionEngine.Undefined), or stopped evaluation (ConstraintExpressionEngine.NotComputable).static booleanevaluateConstraint(ConstraintExpression expression, ConstraintExpressionEngine.EvaluationContext context) Evaluates a Mandatory Constraint.static booleanisUndefined(Object value) static booleanmatchesState(ConstraintExpressionEngine.GoalKind kind, Object value) testGoals(ConstraintExpression expression) Derives semantic coverage obligations independently of domains and XTF fixture construction.
-
Method Details
-
isUndefined
-
matchesState
-
evaluateConstraint
public static boolean evaluateConstraint(ConstraintExpression expression, ConstraintExpressionEngine.EvaluationContext context) Evaluates a Mandatory Constraint. Only an explicit false result is a violation. -
evaluate
public static Object evaluate(ConstraintExpression expression, ConstraintExpressionEngine.EvaluationContext context) Returns a value, missing value (ConstraintExpressionEngine.Undefined), or stopped evaluation (ConstraintExpressionEngine.NotComputable). Unsupported semantics and technical errors are exceptions, never successful undefined results. -
testGoals
Derives semantic coverage obligations independently of domains and XTF fixture construction. Later synthesis stages can solve these goals against model domains and cardinalities.
-