Skip to content

[TS Calls] Execute semantic models written in TypeScript #366

Description

@CaelmBleidd

Part of #360. Depends on #365.

Goal

Support semantic-model bodies written in TypeScript and executed as EtsIR by the normal interpreter.

Why

Many stateful models are easier to express as TypeScript code than as Kotlin intrinsics over symbolic constraints.

Scope

  • Add the ETS_IR_BODY implementation kind alongside INTRINSIC.
  • Load TypeScript model sources through the native JacoDB frontend.
  • Register stable EtsIR entry points in the model registry.
  • Map the receiver, arguments, return value, exceptions, and state changes between the original call and the model body.
  • Apply the model domain guard before entering the EtsIR body.
  • Send unsupported inputs to the configured residual fallback.
  • Route unknown calls made inside a model body through the same dispatcher.
  • Detect recursive model redirection.
  • Include source and EtsIR hashes in the model-catalog fingerprint.

Definition of Done

  • One pure and one stateful TypeScript model execute end to end.
  • Argument, receiver, return, exception, and alias handling have focused tests.
  • Unsupported inputs use the configured residual fallback.
  • Nested unknown calls are handled consistently.
  • Recursive model redirection cannot loop indefinitely.
  • Model source and EtsIR artifacts are reproducible and fingerprinted.
  • The change is delivered in a dedicated PR linked to this issue and [Epic][TS Calls] Introduce explicit fallback policies and partial semantic models #360.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions