Summary
spar instance --format json does not include any properties field in the output tree. Both type-level properties (e.g., Period, Clock_Period, Compute_Execution_Time) and subcomponent-binding overrides (subcomp: T { prop => val; }) are dropped.
This blocks programmatic use of the instance model for downstream analyses / codegen that aren't built into spar itself (e.g., exporting to a reporting tool, generating a zone-map config from the AADL model).
Reproducer
Using the wohl repo at /Users/r/git/pulseengine/wohl:
-- wohl_home.aadl (excerpt)
system implementation StarterHome.Deployed
subcomponents
door_front: system Wohl_Nodes::DoorWindowNode.Battery
{ Wohl_Properties::Zone_Id => 1;
Wohl_Properties::Zone_Name => "front_door";
Wohl_Properties::Location => "ground_floor/entry";
Wohl_Properties::Role => "door"; };
...
end StarterHome.Deployed;
$ cd /Users/r/git/pulseengine/wohl
$ spar instance --root Wohl_Home::StarterHome.Deployed --format json spar/*.aadl > inst.json
$ python3 -c 'import json; d=json.load(open("inst.json"))
def walk(n):
if isinstance(n, dict):
if "properties" in n: print("FOUND:", n["properties"])
for v in n.values(): walk(v)
elif isinstance(n, list):
for v in n: walk(v)
walk(d)'
# (no output — no `properties` field anywhere in the tree)
The subcomponents blocks are correctly parsed (the file passes spar parse), and the declaration-level Wohl_Properties::Battery_Capacity_mAh => 220.0; is also absent from the instance JSON.
Expected
Each node in the instance tree includes a properties array (or map) with the declared + inherited + subcomponent-binding properties resolved for that instance. Something like:
{
"name": "door_front",
"category": "system",
...
"properties": {
"Wohl_Properties::Zone_Id": {"value": 1, "unit": null},
"Wohl_Properties::Zone_Name": {"value": "front_door"},
"Wohl_Properties::Battery_Capacity_mAh": {"value": 220.0}
}
}
Why this matters
- The sensor-to-room mapping we need to ship with a Wohl deployment (zone IDs, human-readable names, physical location, role) should live in the AADL model and be extractable programmatically, so
wohl-hub can generate its zone config directly from the model. Currently we'd have to re-parse the .aadl text ourselves to get these.
- Power / battery-life analyses expect
Wohl_Properties::Sleep_Current_uA etc. on the instance.
- Schedulability analyses expect
Period, Deadline, Compute_Execution_Time, Priority on every thread instance.
Scope
This might be purely a JSON-serialization bug (properties exist internally, just not surfaced) or an instantiation-time bug (properties not carried into instances). Worth confirming which.
🤖 Generated with Claude Code
Summary
spar instance --format jsondoes not include anypropertiesfield in the output tree. Both type-level properties (e.g.,Period,Clock_Period,Compute_Execution_Time) and subcomponent-binding overrides (subcomp: T { prop => val; }) are dropped.This blocks programmatic use of the instance model for downstream analyses / codegen that aren't built into spar itself (e.g., exporting to a reporting tool, generating a zone-map config from the AADL model).
Reproducer
Using the wohl repo at
/Users/r/git/pulseengine/wohl:The
subcomponentsblocks are correctly parsed (the file passesspar parse), and the declaration-levelWohl_Properties::Battery_Capacity_mAh => 220.0;is also absent from the instance JSON.Expected
Each node in the instance tree includes a
propertiesarray (or map) with the declared + inherited + subcomponent-binding properties resolved for that instance. Something like:{ "name": "door_front", "category": "system", ... "properties": { "Wohl_Properties::Zone_Id": {"value": 1, "unit": null}, "Wohl_Properties::Zone_Name": {"value": "front_door"}, "Wohl_Properties::Battery_Capacity_mAh": {"value": 220.0} } }Why this matters
wohl-hubcan generate its zone config directly from the model. Currently we'd have to re-parse the.aadltext ourselves to get these.Wohl_Properties::Sleep_Current_uAetc. on the instance.Period,Deadline,Compute_Execution_Time,Priorityon every thread instance.Scope
This might be purely a JSON-serialization bug (properties exist internally, just not surfaced) or an instantiation-time bug (properties not carried into instances). Worth confirming which.
🤖 Generated with Claude Code