Description
InvocationExpressionExtensions.ComputeRedefinedEvaluateOperation(this IInvocationExpression, IElement target)
in SysML2.NET/Extend/InvocationExpressionExtensions.cs:83 is a NotSupportedException stub. It has
no OCL derivation — KerML 1.0 §8.4.4.9.8 delegates it to execution semantics:
An InvocationExpression evaluates to an application of its function to argument values
corresponding to the results of evaluating each of the argument Expressions of the
InvocationExpression.
What is required
A model-level expression evaluation engine, following the pilot implementation
(org.omg.sysml.expressions → ModelLevelExpressionEvaluator).
- Library-function resolution.
ComputeResolveGlobalOperation
(SysML2.NET/Extend/NamespaceExtensions.cs:528) walks up owningNamespace only, so
function.qualifiedName resolves only when the Kernel Functions Library sits in the same
containment tree as the user model. Resources/sysml.library.kpar ships but is loaded nowhere
outside SysML2.NET.Kpar.Tests. Decide: SDK-side library registry, or caller-supplied library.
- Dispatch registry + evaluation context.
Evaluate(IElement target) carries no parameter
binding; collect / select re-enter evaluation once per element with a bound body parameter.
- Literal factory + numeric coercion.
evaluate constructs result elements (LiteralInteger,
LiteralRational, LiteralBoolean, LiteralString, LiteralInfinity) and promotes
Natural → Integer → Rational → Real.
- The 35 library function bodies, in four groups:
- classification —
istype, hastype, @, @@, as, meta, ==, !=, ===, !==
- boolean / control —
and, or, xor, not, implies, if, ?? (must not eagerly
evaluate all arguments, so these cannot share the generic dispatch path)
- numeric —
+, -, *, /, %, ^, <, >, <=, >=, ..
- sequence —
,, #, ., collect, select
- Fallback for a non-library function: evaluate the invoked type's result expression.
Blocked
meta and @@ need reflective metaclass features (KerML 1.0 §9.2.17) — i.e. the two remaining
Extend stubs MetadataAccessExpressionExtensions.ComputeMetaclassFeatureOperation
(SysML2.NET/Extend/MetadataAccessExpressionExtensions.cs:163) and
MetadataFeatureExtensions.ComputeSyntaxElementOperation
(SysML2.NET/Extend/MetadataFeatureExtensions.cs:208). Both require a MOF reflective registry that
does not exist in the SDK.
Depends on
#364 — dispatch keys on the same library-function set.
Checklist
System Configuration
- SysML2.NET version: 0.19.0
- Source file:
SysML2.NET/Extend/InvocationExpressionExtensions.cs
Description
InvocationExpressionExtensions.ComputeRedefinedEvaluateOperation(this IInvocationExpression, IElement target)in
SysML2.NET/Extend/InvocationExpressionExtensions.cs:83is aNotSupportedExceptionstub. It hasno OCL derivation — KerML 1.0 §8.4.4.9.8 delegates it to execution semantics:
What is required
A model-level expression evaluation engine, following the pilot implementation
(
org.omg.sysml.expressions→ModelLevelExpressionEvaluator).ComputeResolveGlobalOperation(
SysML2.NET/Extend/NamespaceExtensions.cs:528) walks upowningNamespaceonly, sofunction.qualifiedNameresolves only when the Kernel Functions Library sits in the samecontainment tree as the user model.
Resources/sysml.library.kparships but is loaded nowhereoutside
SysML2.NET.Kpar.Tests. Decide: SDK-side library registry, or caller-supplied library.Evaluate(IElement target)carries no parameterbinding;
collect/selectre-enter evaluation once per element with a bound body parameter.evaluateconstructs result elements (LiteralInteger,LiteralRational,LiteralBoolean,LiteralString,LiteralInfinity) and promotesNatural → Integer → Rational → Real.
istype,hastype,@,@@,as,meta,==,!=,===,!==and,or,xor,not,implies,if,??(must not eagerlyevaluate all arguments, so these cannot share the generic dispatch path)
+,-,*,/,%,^,<,>,<=,>=,..,,#,.,collect,selectBlocked
metaand@@need reflective metaclass features (KerML 1.0 §9.2.17) — i.e. the two remainingExtend stubs
MetadataAccessExpressionExtensions.ComputeMetaclassFeatureOperation(
SysML2.NET/Extend/MetadataAccessExpressionExtensions.cs:163) andMetadataFeatureExtensions.ComputeSyntaxElementOperation(
SysML2.NET/Extend/MetadataFeatureExtensions.cs:208). Both require a MOF reflective registry thatdoes not exist in the SDK.
Depends on
#364 — dispatch keys on the same library-function set.
Checklist
List<IElement> ComputeRedefinedEvaluateOperation(this IInvocationExpression, IElement)System Configuration
SysML2.NET/Extend/InvocationExpressionExtensions.cs