Skip to content

Answer vector accessors on an unset variable (Y Component Of on Null) #108

Closed

Description

@e54-bot

Problem

After #105, Bastion on athena main with the committed docs/scenario-examples/valid/bastion.json (now carries buttons, slot, matchPhase, game mode) ends not_modeled at tick 0:

{ "status": "not_modeled", "construct": "__yComponentOf__ on Null", "tick": 0,
  "location": { "rule": 216, "name": "[Core] Resolve finish", "eventPlayer": "p2", "condition": 2 } }

Condition 2 is Y Component Of(If-Then-Else(…, Position Of(First Of((Event Player).possess)), Position Of(Event Player))) >= Y Component Of(Global.endPosition). Position Of(Event Player) is a vector (scenario position). Global.endPosition is a global the program assigns in another rule; when this rule's condition runs first, the variable is unset, so Y Component Of receives Null.

Question to settle first

What does the Workshop do when a vector accessor (X/Y/Z Component Of, and the neighbouring vector reads) receives an unset variable (Null, which the model already treats as the default 0 for arithmetic and compares)? Use the evidence in this order, and do not guess:

  1. The catalog text for Y Component Of / Vector and any existing athena precedent for Null and number operands in vector positions (docs/findings.md, docs/architecture.md, how Multiply/Distance Between treat a number operand and an unset variable; issue b6 on ambiguous vector constants is related).
  2. If the evidence settles it, implement it: an unset variable read in a vector position follows the same rule as the model's other default-zero reads, and record it in docs/findings.md as modeled, not measured, naming the evidence.
  3. If the evidence does not settle it, do not guess: keep not_modeled, write a probe request in the form the repo uses (docs/probes or the existing probe list), and report that as the blocker in the PR body so the owner can run the probe. In that case also check whether a rule-order fact explains it: confirm that in the real client this rule's condition could see endPosition unset at this point, i.e. that this is a genuine read of an unset variable and not an ordering bug in athena's scheduler (compare with which rule sets Global.endPosition, and when it runs relative to rule 216 at tick 0). Report what you find.

Scope

  • The accessor family on a Null operand: X/Y/Z Component Of, Horizontal/Vertical Angle Towards-style readers only if the same question applies and the same evidence settles it; list the others in the PR body.
  • Docs: docs/findings.md, docs/simulator-interface.md if it lists value coercions.

Acceptance

  • Tests: accessor on an unset variable (per the decision above); accessor on a real vector unchanged; the same read after the variable is set.
  • Bastion rerun with the committed bastion.json unchanged except what this PR adds: report the new first stop, or completion. Parent: Run Bastion to completion on athena-sim #45.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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