Skip to content

Conversation

@seidewitz
Copy link
Member

This PR implements the (non-model-level) evaluation of all the functions from the Kernel Function Library package TrigFunctions.

Implemented Functions

The following functions from TrigFunctions are implemented in this PR.

  • deg
  • rad
  • sin
  • cos
  • tan
  • cot
  • arcsin
  • arccos
  • arctan

All functions are implemented using the corresponding functions from java.lang.Math (even for those functions whose definition is given in TrigFunctions).

In addition, the feature TrigFunctions::pi is implemented to have the value java.lang.Math.PI (even though this has lower precision than what is specified in TrigFunctions).

Other Changes

  1. Added a general capability to implement values for "library features" like TrigFunctions::pi.
  2. Created an ExpressionEvaluator interface, which can be used to type evaluator parameters and fields more generally than ModelLevelExpressionEvaluator. ModelLevelExpressionEvaluator implements ExpressionEvaluator.
  3. Fixed some problems with the org.omg.sysml.execution.expressions.ExpressionEvaluator extension of ModelLevelExpressionEvaluator.
    • Corrected instantiateInvocation to copy instantiatedType from the original InvocationExpression, rather than ownedTyping.
    • Updated the evaluation of Features so that unbound input parameters are considered to have a null value (rather than returning the Feature itself).

- Added general mechanism for model-level evaluation of library
features.

- Renamed some of the methods of interface LibraryFunction.
- Updated ModelLevelExpressionEvaluator to implement the new interface.
- Changed "evaluator" parameters to be typed by the new interface.
- Corrected instantiateInvocation to copy instantiatedType from the
original InvocationExpression, rather than the ownedTyping.

- Updated the evaluation of Features so that unbound input parameters
are considered to have a null value (rather than returning the Feature
itself).
@seidewitz seidewitz self-assigned this Jan 27, 2026
@seidewitz seidewitz added this to the 2026-01 milestone Jan 27, 2026
@seidewitz seidewitz requested review from himi and hpdekoning January 27, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants