Skip to content

Records, opt-in array-preserving mode, and if-equation semantics - #172

Draft
asinghvi17 wants to merge 129 commits into
SciML:mainfrom
asinghvi17:bm-records-arrays
Draft

asinghvi17 wants to merge 129 commits into
SciML:mainfrom
asinghvi17:bm-records-arrays

Conversation

@asinghvi17

Copy link
Copy Markdown

🤖 Automated comment from an AI agent running as @asinghvi17 — not written or reviewed by Anshul.

This builds on #170 and contains its commits. Please review that PR first; this diff will shrink once it merges.

It adds record support (nested records, constructors, record values in functions, literal-size record arrays), and an opt-in arrays = :keep mode that keeps Base Modelica arrays as ModelingToolkit array variables. The default, :scalarize, is unchanged apart from bug fixes. It also gives initial and regular if-equations one consistent rule and fixes several loader and parser issues.

MultiBody Pendulum, DoublePendulum and FreeBody match OpenModelica in both modes with both parsers. A new IfEquations test group is added to CI. There is one known limitation, documented in the README: an unfixed start can be ignored by ModelingToolkit's initialization, an upstream behaviour.

🤖 Generated with Claude Code

https://claude.ai/code/session_014mFQHvJPDiPcACNgMUxAGS


🤖 Posted by an AI agent — harness: Claude 2.1.316 · model: claude-opus-5-5
Conversation: factory head hd_7dcbec22 on m_4242afb3ce622d22c2c40d9e9baf1f9a (no session URL)

asinghvi17 and others added 30 commits November 11, 2026 14:48
create_arithmetic_expression returned BaseModelicaUnaryMinus(first_term)
as soon as it saw a leading '-', discarding every following '+'/'-' term,
so der('v') = -'x' - 0.1*'v' became der('v') = -'x'. Apply the unary
operator to the first term and keep folding the remaining terms. A leading
'+' is now also accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
ANTLR's default ConsoleErrorListener printed lexer/parser errors to
stderr and let the parser recover, so malformed input produced a partial
AST and a silently wrong model. Replace the default listeners on both the
lexer and the parser with one that collects errors, and throw a
BaseModelicaParseError listing every error with line/column and source
context for the first. parse_file_antlr prefixes the filename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
spc only skipped whitespace, so a trailing '// comment' after an equation
or declaration made the parse fail; with NoCache, ParserCombinator then
backtracks through every alternative, which took minutes on real models.
Let spc also consume line and block comments. The regression test parses
in a subprocess with a timeout so a hang fails instead of blocking CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
visit_equation returned nothing for an equation without '=', so a
'reinit(v, -e*pre(v))' statement inside a when-equation vanished and the
bouncing ball fell through the floor while reporting success. Keep such
statements as a BaseModelicaSimpleEquation with an empty right-hand side,
as the :julia parser does, so the evaluator lowers or rejects them.

visit_whenEquation also put the bodies of all elsewhen branches into the
first branch; walk the children so each condition gets its own body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…tics

Fixes two silent/failing cases:
- reinit(x, expr) was dropped (bouncing ball reported Success at -29 m);
- 'n = pre(n) + 1' failed with 'Symbol n(t) is not present in the system'
  because discrete variables never received a start value.

when-equations are collected into backend-independent WhenClauses
(condition, discrete assignments, reinits) and lowered by a
DiscreteBackend. The built-in MTKEventsBackend emits one
SymbolicContinuousCallback per distinct zero-crossing (rising edge only)
or a periodic SymbolicDiscreteCallback for sample(). Affect equations
follow Modelica semantics: continuous variables read their pre-event
value via Pre, pre(v) is Pre(v), reinit assigns the state, and every
state that is not reinitialized is held with x ~ Pre(x). Without the
hold equations MTK solves the affect together with the observed
equations and treats unassigned states as free unknowns, corrupting them
(e.g. y = 2x + n shifted x by -0.5 when n changed).

Discrete variables get their start value (attribute, 'pre(v) = c'
initial equation, or Modelica default 0) as an initial condition.
Compound when-conditions, unknown functions and statements other than
reinit/assert in a when body now throw UnsupportedFeatureError instead
of being mis-converted.

parse_basemodelica/create_odeproblem gain discrete_backend (:auto, :mtk,
:synchtoolkit) and simplify (true, false, or a function such as
DyadInterface.simplify_model) keywords; simplify = false returns the
unsimplified System. The experiment annotation is attached to the System
as metadata (experiment_settings(sys)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
The BaseModelicaWhenEquation constructor stored only the element right
after each 'then', so a when-branch with several equations lost all but
the first (e.g. a reinit followed by a counter update). Collect all
equations up to the next 'elsewhen'. Covered by the initial-algorithm
event test added with algorithm-section support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Parsing (both backends produce the same new AST nodes):
- algorithm sections and statements (:=, if, for; while/when/break/
  return/multi-output are kept as BaseModelicaUnsupportedStatement);
- {...} array constructors; [..] and comprehensions become
  BaseModelicaUnsupportedExpression.
:julia: statements tolerate indentation, 'algorithm' is no longer
accepted as a type name, 'function' prefixes parse, and array_arguments
had a precedence bug ('|' and '+' share a level in Julia) that made
every {...} require a for-index and backtrack for minutes.
:antlr: algorithm sections were ignored and {...} returned a 0.0
placeholder; function calls now keep their full dotted name.

Conversion:
- user functions are inlined symbolically: arguments are bound to the
  inputs and the algorithm runs on symbolic values (if -> ifelse or
  constant-folded, for over constant ranges unrolled), so calls need no
  registration and stay differentiable;
- scalar for-equations over constant ranges are unrolled;
- initial algorithm sections of assignments run sequentially with time
  bound to the experiment start time (used by SimpleTriacCircuit.bmo);
- array variables, multi-component clauses (previously all but the
  first component were dropped), algorithm sections in models and
  unknown expression nodes throw UnsupportedFeatureError instead of
  being dropped or mis-converted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
BaseModelicaSynchToolkitExt (weak dependency on SynchToolkit, which is
only in the private DyadRegistry) implements the DiscreteBackend
interface with SynchToolkit clocked partitions:
  when c then v = e   -> ZeroCrossing(c; down=false) + EventClock, v(k) ~ e
  sample(s, dt)       -> Clock(dt; phase=s)
  pre(v)              -> v(k-1), v(k-1) ~ start as initialization equation
  discrete in cont.   -> Hold(v);   continuous in clocked -> Sample(clock)(x)
  reinit(x, e)        -> Impulsive()(x) ~ e on the clause's clock
Clauses with only reinits stay plain MTK callbacks (affects on a callback
linked to an EventClock are replaced by the synchronous step). The system
is compiled with additional_passes = [SynchToolkit.compile_lustre];
DyadInterface.simplify_model adds that pass on its own.

Opt-in via discrete_backend = :synchtoolkit; :auto keeps the MTK backend.
Against SynchToolkit 0.4.8 (the version installable here) counters tick
correctly, but Hold(v) shows the post-tick value before the first tick,
constant assignments record NaN and Impulsive on an event clock fails
inside SynchToolkit; see outputs/scripts/synchtoolkit_probe.log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…script

README: replace the stale support note (no events/functions) with the
current feature list, the UnsupportedFeatureError behaviour, the
experimental SynchToolkit backend and the simplify = false /
DyadInterface.simplify_model path. outputs/scripts/dyad_pipeline.jl runs
.bmo -> unsimplified System -> DyadInterface.simplify_model ->
ODEProblem -> Tsit5 and TransientAnalysis; its log is alongside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
On 0.5.2 / SynchJulia 0.8.6 the clocked lowering gives correct results
for elsewhen branches, constant assignments and Impulsive reinit plus a
counter on one EventClock (BouncingBallCounter: 6 bounces at the right
times), and the Dyad pipeline matches the MTK backend. A continuous
observable reading Hold(v) before v's first tick still errors ('Cannot
access discrete variable ... before initial save'), so :auto keeps the
MTK backend. Update the extension notes, the report and the logs
(0.4.8 log kept for reference).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 5dc384ae-ead8-48f7-827a-67e17e039323
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 5dc384ae-ead8-48f7-827a-67e17e039323 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…weakdep

Replace the in-tree SynchToolkit package extension with a public API for
registering discrete backends, with tests and documentation. Remove the
bundled outputs/ directory.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Harness: claude
Model: claude-sonnet-5-5
Factory-Task: df9c73f7-a80b-438e-a7b9-4dad797d72fc
Agent-Harness: Claude 2.1.301
Agent-Model: claude-sonnet-5-5
Agent-Session: factory task df9c73f7-a80b-438e-a7b9-4dad797d72fc on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
The ANTLR visitor parsed a component's annotation and dropped it; the
ParserCombinator parser joined a string comment and an annotation into
one garbled string. A component declaration's comment is now its
BaseModelicaAnnotation when it has one, so the evaluator can read
annotation(Evaluate = true).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: bb056ebf-f8d9-4825-93de-b7f7ac6f4c77
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task bb056ebf-f8d9-4825-93de-b7f7ac6f4c77 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…ameters

- `constant` components are inlined. MTK's @constants is only
  tunable=false metadata, which remake can still change.
- Parameters with annotation(Evaluate = true) become tunable=false, with a
  description saying they were evaluated at translation; their bindings
  are evaluated to numbers. MTK has no metadata that makes remake/setp
  reject a parameter, so loading warns once per model, listing them.
- Loading warns once per model about parameters that no equation,
  binding, start value or other attribute references: they were most
  likely consumed at translation without an Evaluate marker.
- A parameter whose binding refers to other parameters (r = p*q) keeps it
  as a symbolic default, which MTK 11 turns into a binding: remake(p)
  now recomputes r. Previously the binding was resolved to a number at
  load, so r went stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: bb056ebf-f8d9-4825-93de-b7f7ac6f4c77
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task bb056ebf-f8d9-4825-93de-b7f7ac6f4c77 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: bb056ebf-f8d9-4825-93de-b7f7ac6f4c77
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task bb056ebf-f8d9-4825-93de-b7f7ac6f4c77 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…eads

The conversion keeps its state in module-level globals (variable_map,
parameter_val_map, ...) that every conversion empties first. Two conversions
running at once on different threads overwrote each other's state:
references resolved to `nothing`, bindings lost the parameters they refer
to (KeyError, `-(::Nothing, ::Nothing)`), nondeterministically. Conversions
are now serialized by a lock. The ANTLR parser calls Python, which crashes
the process (signal 11) off the main thread; it now throws an ArgumentError
there instead, pointing to `parser = :julia`.

Parameters, free-parameter bindings, Pass 3.5 and state priorities iterated
`variable_map`, a Dict keyed by Symbols whose order depends on what was
parsed before in the session. They now follow declaration order, so the
system handed to ModelingToolkit depends only on the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 18a1bb4b-a3de-43b3-8530-08a9af5694a1
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 18a1bb4b-a3de-43b3-8530-08a9af5694a1 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…m at events

A Boolean defined by an equation, such as `off = s < 0`, was a Bool discrete
initialized to its `start` value. When that contradicted the relation (an
ideal diode starting reverse-biased with start = true, ...) the wrong branch
stayed selected until the relation crossed zero, possibly forever, and the
solve still reported Success. Definitions that were not a single relation
(hysteresis `y = pre(y) and u < a or u < b`, `b = time >= t0 and ...`) were
silently dropped, so the Boolean never changed. Declaration equations
(`Boolean b = expr`) were dropped too.

Each such Boolean is now a 0/1 Real discrete (equations see `b > 0.5`):
- initialization solves it with the unknowns it depends on
  (`b => missing`, `b ~ ifelse(definition, 1, 0)`, pre(b) = start), and
  remake with new initial values solves it again;
- each continuously varying relation of a definition gets a zero-crossing
  callback whose crossing direction gives the relation's new value (at the
  root it may evaluate either way), then all Booleans are iterated to a
  fixed point;
- a discrete callback re-evaluates them after any step at which one
  disagrees with its definition, e.g. after a reinit jumps across zero.
`when b` for such a Boolean triggers on its relation.

The Boolean and `when` callbacks share root finding and reinitialization so
ModelingToolkit puts them in one vector callback and coincident roots fire
together; separate classes lost one of the two events. A Boolean crossing is
(a - b)/2 so it never equals a `when` condition: identical conditions of one
vector callback re-fire forever at a shared downward root.

Systems without states: ModelingToolkit evaluates a single-condition
continuous callback into the empty state buffer (BoundsError). Such
callbacks get a second condition that never crosses zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 18a1bb4b-a3de-43b3-8530-08a9af5694a1
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 18a1bb4b-a3de-43b3-8530-08a9af5694a1 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…less models

create_odeproblem collected the times of `if time < c` conditions but never
passed them on. The instants are now stored as `tstops` on the System, so
ModelingToolkit hands them to every ODEProblem built from it, including
DyadInterface's TransientAnalysis. They are collected from if-expressions as
well as if-equations, and may be expressions of parameters (`time <
startTime`), which follow remake. (A scalar System tstop is a period in
ModelingToolkit, so they are stored as one vector.)

Without differential states the error estimate is zero and one step can
span the whole simulation, missing events between its sample points (21 of
50 rising edges of a 50 Hz signal over 1 s, with Success). create_odeproblem
now sets dtmax to the experiment Interval, or a 500th of the time span, for
such models; explicit keyword arguments still take precedence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 18a1bb4b-a3de-43b3-8530-08a9af5694a1
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 18a1bb4b-a3de-43b3-8530-08a9af5694a1 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
`assert` in an `initial algorithm` was rejected as an unsupported
statement. Assertions are now evaluated in sequence with the assignments
and checked once the model is initialized, by the initialize affect of a
discrete callback that never fires: it sees the initialized state and the
current parameters (also after remake). A failed assertion throws from
solve, or logs a warning for AssertionLevel.warning. One that fails
whatever the parameters is rejected when the model is loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 18a1bb4b-a3de-43b3-8530-08a9af5694a1
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 18a1bb4b-a3de-43b3-8530-08a9af5694a1 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…ead behaviour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 18a1bb4b-a3de-43b3-8530-08a9af5694a1
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task 18a1bb4b-a3de-43b3-8530-08a9af5694a1 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Array components are expanded into scalar components named x[1], A[1,2]
before translation; references evaluate to Julia arrays of the element
symbols, so subscripts, slices, end, elementwise and matrix operators,
array constructors {..}, [..; ..], comprehensions and reductions work on
symbolic scalars, and array equations become one equation per element.
Array sizes and fill() sizes may refer to parameters with constant
values. User functions accept and return arrays. Both parsers keep
subscripts on component references and (expr)[subscripts].

sample(start, interval) and for-ranges accept parameter arguments,
evaluated with their values at load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: a677e921-6b87-42b6-9e91-e2a295a363cf
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task a677e921-6b87-42b6-9e91-e2a295a363cf on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
`x[1, :]` failed to match and the parser backtracked for minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: a677e921-6b87-42b6-9e91-e2a295a363cf
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task a677e921-6b87-42b6-9e91-e2a295a363cf on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: a677e921-6b87-42b6-9e91-e2a295a363cf
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task a677e921-6b87-42b6-9e91-e2a295a363cf on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
…test expectation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: a677e921-6b87-42b6-9e91-e2a295a363cf
Agent-Harness: Claude 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: factory task a677e921-6b87-42b6-9e91-e2a295a363cf on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Preserve when-chain identity and branch priority, select simultaneous roots and
clocks together, and execute Boolean-triggered bodies during event iteration.
Keep pre-values across callbacks for the same instant and include the initial
sample tick on the absolute sample grid.

Respect scalar array targets when detecting discretes, read prior local array
writes in initial algorithms, and retain parameter-dependent Boolean starts.
Declare constants non-tunable through public metadata instead of toconstant.

Add both-parser regressions and an independent public discrete-backend solve.
Validation: Pkg.test() 823/823; QA/ExplicitImports 20/20 (clean_sources=false for
the read-only dependency depot).

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 23179837-fb43-4a06-a124-79e20fa53c18
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 23179837-fb43-4a06-a124-79e20fa53c18 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Address review findings A-E with regressions: seed initial edge history, preserve parameter-valued Boolean pre starts, iterate compiled callbacks, and advance discrete pre inputs while holding completed bodies. Preserve coincident elsewhen priority, restore the legacy WhenBlock constructor, and document Boolean edge handling for backends.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: ba56c437-18ea-4c44-9aa4-498776a41568
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task ba56c437-18ea-4c44-9aa4-498776a41568 on m_3e9b2709b53bf4c4dade6cc909217625 (no session URL)
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 46e6dbc0-a3c9-4273-aeb3-0e91c613b63e
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 46e6dbc0-a3c9-4273-aeb3-0e91c613b63e
Harness: codex
Model: gpt-6.1-sol
Factory-Task: d80e8cbe-a8b0-473e-a9be-1483f52b0d98
…ions

Harness: codex
Model: gpt-6.1-sol
Factory-Task: d80e8cbe-a8b0-473e-a9be-1483f52b0d98
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 1ccceae5-342c-4983-994c-4ca4e39eaa15
asinghvi17 and others added 30 commits November 21, 2026 12:47
…acks

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 6e2aa25c-577c-4d3f-8ffe-17c428e4519a
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 6e2aa25c-577c-4d3f-8ffe-17c428e4519a on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 6e2aa25c-577c-4d3f-8ffe-17c428e4519a
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 6e2aa25c-577c-4d3f-8ffe-17c428e4519a on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 408a6b38-716c-4512-9669-82eb72e16681
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 408a6b38-716c-4512-9669-82eb72e16681 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 408a6b38-716c-4512-9669-82eb72e16681
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 408a6b38-716c-4512-9669-82eb72e16681 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 76afe29d-36fb-408e-8818-e3c5830ec6a8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 76afe29d-36fb-408e-8818-e3c5830ec6a8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 4bd2689c-c5d5-4993-aac8-0d0f7f170e50
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 4bd2689c-c5d5-4993-aac8-0d0f7f170e50 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
…nches

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
…ents

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: af288993-8c0d-49e2-9fd9-693a5548028d
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task af288993-8c0d-49e2-9fd9-693a5548028d on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 74224db1-e23d-4fee-b212-4216c2e5f4d8
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 74224db1-e23d-4fee-b212-4216c2e5f4d8 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 8f40cca8-d841-457f-8c02-00cf0e8c7420
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 8f40cca8-d841-457f-8c02-00cf0e8c7420 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 8f40cca8-d841-457f-8c02-00cf0e8c7420
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 8f40cca8-d841-457f-8c02-00cf0e8c7420 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 8f40cca8-d841-457f-8c02-00cf0e8c7420
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 8f40cca8-d841-457f-8c02-00cf0e8c7420 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 8f40cca8-d841-457f-8c02-00cf0e8c7420
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 8f40cca8-d841-457f-8c02-00cf0e8c7420 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: cab8a780-d3a6-4956-83c0-b2cce26d1e8b
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task cab8a780-d3a6-4956-83c0-b2cce26d1e8b on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
…tion

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: cab8a780-d3a6-4956-83c0-b2cce26d1e8b
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task cab8a780-d3a6-4956-83c0-b2cce26d1e8b on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Revert the completion pass, declaration metadata, numerical rank and projection machinery, compile hooks, export, and completion-only regressions. Keep the independent records, retained arrays, derivative-input, initialization-constraint, and event fixes from the same stack.

Pass unfixed starts through as MTK guesses again. Document the retained-parameter upstream limitation, pin it with broken tests, and retain compilation-route and whole-array initial-reduction coverage without completion.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 097a9378-e975-4e35-9fd5-9034817550c5
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 097a9378-e975-4e35-9fd5-9034817550c5 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
A3f retains a parameter and A6c has time-driven derivative rows, so MTK no longer obtains initial values from their unfixed guesses after the completion pass is removed. Supply explicit problem initial values for these trajectory checks while keeping both original unfixed fixtures and their lowering coverage intact.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 097a9378-e975-4e35-9fd5-9034817550c5
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 097a9378-e975-4e35-9fd5-9034817550c5 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Keep branch selection coverage at both experiment start times, and remove expectations that the inactive branch's free coordinate is completed from its unfixed start. MTK remains responsible for that guess-only value.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 097a9378-e975-4e35-9fd5-9034817550c5
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 097a9378-e975-4e35-9fd5-9034817550c5 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
The complete Core group exceeds the worker's 30-minute limit. Add BASEMODELICA_CORE_PART=head/tail for bounded Pkg.test runs, retaining every existing test include in the default all route and rejecting misspelled part names.

Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 097a9378-e975-4e35-9fd5-9034817550c5
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 097a9378-e975-4e35-9fd5-9034817550c5 on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 440e251b-5d91-407a-bbf1-5084f993cc8e
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 440e251b-5d91-407a-bbf1-5084f993cc8e on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 440e251b-5d91-407a-bbf1-5084f993cc8e
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 440e251b-5d91-407a-bbf1-5084f993cc8e on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 440e251b-5d91-407a-bbf1-5084f993cc8e
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 440e251b-5d91-407a-bbf1-5084f993cc8e on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 440e251b-5d91-407a-bbf1-5084f993cc8e
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 440e251b-5d91-407a-bbf1-5084f993cc8e on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Co-Authored-By: Codex <noreply@openai.com>
Harness: codex
Model: gpt-6.1-sol
Factory-Task: 440e251b-5d91-407a-bbf1-5084f993cc8e
Agent-Harness: Codex 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: factory task 440e251b-5d91-407a-bbf1-5084f993cc8e on m_e7dafdb55d0afc98861a124723a9e3fd (no session URL)

This branch has not been deployed

No deployments
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.

1 participant