qvm: contact callers
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- docs/FINDINGS.md +7 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +4 -0
- docs/REVERSE_ENGINEERING_TODO.md +6 -0
- docs/research/QVM_CONTACT_CALLERS.md +35 -0
- docs/research/QVM_SLIDE_REPEATED.md +3 -0
- docs/research/QVM_STEP_COLLISION.md +3 -0
- docs/research/README.md +3 -0
- docs/research/qvm-contact-callers.json +0 -0
- scripts/analyze_qvm_contact_callers.py +54 -0
- scripts/analyze_qvm_slide_repeated.py +4 -3
- scripts/test_qvm_contact_callers.py +77 -0
- scripts/test_qvm_slide_repeated.py +5 -4
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -291,3 +291,6 @@ Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.m
|
|
| 291 |
|
| 292 |
|
| 293 |
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
|
| 292 |
|
| 293 |
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
Research progress: [QVM contact slide caller composition](research/QVM_CONTACT_CALLERS.md) completes bounded RE-493–495: both actual slide children inside step/wrapper, down/overlap/fallback/height policy and actual mode-tail state across22 fixtures. Native responses remain supplied. RE-492/496 retain native collision/legal state/main/full runtime/platform work; broad game/rendering milestones remain open.
|
docs/FINDINGS.md
CHANGED
|
@@ -597,3 +597,10 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 597 |
**F-227 — Accumulated impact/returns:**a once-supplied impact maximum persists and only increases across contacts; caller reset/consumers remain open.76 probes reach common, third-plane, allsolid and capacity exits; two return on the first contact without consuming later prepared records. [REPEAT-002](research/QVM_SLIDE_REPEATED.md).
|
| 598 |
|
| 599 |
**F-228 — Actual exhaustion:**four normal contacts reach counter4/common exit; fourth-clear reaches counter3/common exit. Both return1 and apply end/saved vector precedence. Fourth allsolid/capacity/third-plane returns bypass that suffix and leave counter3. Continuous synthetic state is verified; native collision/full callers/platform gameplay remain open. [REPEAT-003](research/QVM_SLIDE_REPEATED.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 597 |
**F-227 — Accumulated impact/returns:**a once-supplied impact maximum persists and only increases across contacts; caller reset/consumers remain open.76 probes reach common, third-plane, allsolid and capacity exits; two return on the first contact without consuming later prepared records. [REPEAT-002](research/QVM_SLIDE_REPEATED.md).
|
| 598 |
|
| 599 |
**F-228 — Actual exhaustion:**four normal contacts reach counter4/common exit; fourth-clear reaches counter3/common exit. Both return1 and apply end/saved vector precedence. Fourth allsolid/capacity/third-plane returns bypass that suffix and leave counter3. Continuous synthetic state is verified; native collision/full callers/platform gameplay remain open. [REPEAT-003](research/QVM_SLIDE_REPEATED.md).
|
| 600 |
+
|
| 601 |
+
|
| 602 |
+
**F-229 — Both slide children evaluated:**22 mode/wrapper fixtures evaluate38 actual57714 invocations. First-clear bypasses stepping; nonzero first returns launch59710 from original entry snapshots with raised origin/shrunk bounds. Actual child returns and shared state feed caller continuation. Native records remain supplied. [CALLSLIDE-001](research/QVM_CONTACT_CALLERS.md).
|
| 603 |
+
|
| 604 |
+
**F-230 — Contact-capable fallback:**actual raised-slide output feeds down/overlap step traces. Failure restores first-attempt position/velocity and sets32 while retaining child touch/impact and other unrolled state. Success keeps step output; deltaZ>2 precedes height truncation. [CALLSTEP-001](research/QVM_CONTACT_CALLERS.md).
|
| 605 |
+
|
| 606 |
+
**F-231 — Contact-to-mode chain:**actual60091 output now feeds41768 tail with both contact-capable slide children evaluated. Gravity updates current Z; negative results clear192/timer. Native collision/main environment and complete gameplay/platform behavior remain open. [CALLMODE-001](research/QVM_CONTACT_CALLERS.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -603,3 +603,6 @@ Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.m
|
|
| 603 |
|
| 604 |
|
| 605 |
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
|
| 604 |
|
| 605 |
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
| 606 |
+
|
| 607 |
+
|
| 608 |
+
Research progress: [QVM contact slide caller composition](research/QVM_CONTACT_CALLERS.md) completes bounded RE-493–495: both actual slide children inside step/wrapper, down/overlap/fallback/height policy and actual mode-tail state across22 fixtures. Native responses remain supplied. RE-492/496 retain native collision/legal state/main/full runtime/platform work; broad game/rendering milestones remain open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -375,3 +375,7 @@ Completed bounded RE-485–487 with `analyze_qvm_slide_loop.py`: verifies57714 c
|
|
| 375 |
## 2026-10-16 — Game-QVM continuous repeated contacts and four-bump exhaustion
|
| 376 |
|
| 377 |
Completed bounded RE-489–491 with `analyze_qvm_slide_repeated.py`: continuous shipped57714 evaluation across76 finite probes, actual third/fourth callbacks and accumulated plane/working/end/saved/time/touch/impact state. REPEAT-001–003/F-226–228 recover repeated normal nudges versus append/capacity, current-time reduction, entity8 dedup/1022 sentinel/entity9 insertion, impact initialized once and retained through multiple source solver passes, and actual exhaustion/common-exit precedence versus early returns. Outcomes:44 common exits,14 third-plane returns,12 allsolid returns,6 capacity returns. Two third-plane probes return at contact1 without consuming later prepared records; remaining74 reach four callbacks. Four-contact exhaustion leaves counter4, fourth-clear leaves3 and both apply gravity/end then timer/saved precedence; early fourth returns leave3 and skip suffix. Two zero-timestep fixtures still issue four traces and exhaust with unchanged origin. Native roots/ordered records/interpolated positions and initial impact remain supplied; trace legality/reachability/native side effects/impact reset-consumers/full callers/runtime remain unverified. Actual39253 touch registration executes within the bounded evaluator; no original executable/full QVM/native collision/physics/rendering executes. Eight tests compare all issued request/state/contact/gate/solver/counter/suffix/final words with an independent ordered-float state machine plus exit-family/capacity/touch/time/impact/timer/zero-time/root/ABI/provenance/scope checks. All591 tests pass. Direct slide-loop report regenerates byte-identically; new report reproduces twice byte-identically (1672861 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-488 remains open for broader native/caller/runtime scope; RE-492 tracks actual native trace/BSP collision/side effects, legal state/record domains, impact producers/consumers, complete slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
## 2026-10-16 — Game-QVM continuous repeated contacts and four-bump exhaustion
|
| 376 |
|
| 377 |
Completed bounded RE-489–491 with `analyze_qvm_slide_repeated.py`: continuous shipped57714 evaluation across76 finite probes, actual third/fourth callbacks and accumulated plane/working/end/saved/time/touch/impact state. REPEAT-001–003/F-226–228 recover repeated normal nudges versus append/capacity, current-time reduction, entity8 dedup/1022 sentinel/entity9 insertion, impact initialized once and retained through multiple source solver passes, and actual exhaustion/common-exit precedence versus early returns. Outcomes:44 common exits,14 third-plane returns,12 allsolid returns,6 capacity returns. Two third-plane probes return at contact1 without consuming later prepared records; remaining74 reach four callbacks. Four-contact exhaustion leaves counter4, fourth-clear leaves3 and both apply gravity/end then timer/saved precedence; early fourth returns leave3 and skip suffix. Two zero-timestep fixtures still issue four traces and exhaust with unchanged origin. Native roots/ordered records/interpolated positions and initial impact remain supplied; trace legality/reachability/native side effects/impact reset-consumers/full callers/runtime remain unverified. Actual39253 touch registration executes within the bounded evaluator; no original executable/full QVM/native collision/physics/rendering executes. Eight tests compare all issued request/state/contact/gate/solver/counter/suffix/final words with an independent ordered-float state machine plus exit-family/capacity/touch/time/impact/timer/zero-time/root/ABI/provenance/scope checks. All591 tests pass. Direct slide-loop report regenerates byte-identically; new report reproduces twice byte-identically (1672861 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-488 remains open for broader native/caller/runtime scope; RE-492 tracks actual native trace/BSP collision/side effects, legal state/record domains, impact producers/consumers, complete slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
| 378 |
+
|
| 379 |
+
## 2026-10-16 — Game-QVM evaluated contact slides through step, wrapper and mode
|
| 380 |
+
|
| 381 |
+
Completed bounded RE-493–495 with `analyze_qvm_contact_callers.py`:22 mode/wrapper fixtures evaluate38 actual57714 children at60091/59710 call boundaries with shared PS/frame/touch/impact state and disjoint live local frames. CALLSLIDE-001/CALLSTEP-001/CALLMODE-001/F-229–231 replace supplied first/raised slide return/vector effects with evaluated clear/repeated-contact/early-return children, original-snapshot raised/shrunk geometry, actual child-to-down/overlap traces, step clipping/returns, first-attempt fallback/flag32/height recording and actual41768 gravity/flag/timer tail. Six fixtures bypass step, six succeed, ten fail/fall back. Second child retains first-child touches/impact at entry; positional fallback preserves final child touch/impact effects. Initial impact0 is supplied once before mode; native roots and slide/down/overlap records/interpolation remain supplied, legal record/normal/state domains/native side effects/main dispatch/environment/actions/runtime unverified. No original executable/full QVM/native collision/physics/rendering executes. Repeated-slide evaluator accepts optional initial memory/result-memory return with unchanged defaults; independent slide oracle accepts entry snapshots and first-clear return0. Eight tests verify all38 children using independent generalized state-machine formulas, raise/shrink geometry, child/down/overlap/step outputs, wrapper bypass/success/fallback/height, full recorded mode-tail state, retained touch/impact, exact caller arguments/frame isolation, provenance and scope. All599 tests pass. Prior repeated-slide report regenerates byte-identically; new caller report reproduces twice byte-identically (639493 bytes). Storage/filter setup, documentation links and whitespace checks pass. No assets or shared instruction evaluator changed. RE-492 remains open for broader native/legal/main/runtime scope; RE-496 tracks native trace/BSP collision/side effects/legal domains/impact reset-consumers, other callers and real main-dispatch/environment/clock/basis/action composition with full macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -600,3 +600,9 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 600 |
- [x] RE-490 Retain supplied initial impact across contacts and recover accumulated max/early-return/capacity/touch-sentinel behavior with complete state checks ([REPEAT-002](research/QVM_SLIDE_REPEATED.md)).
|
| 601 |
- [x] RE-491 Evaluate actual four-contact exhaustion versus fourth-clear/allsolid/plane returns, preserving counter and common-exit precedence ([REPEAT-003](research/QVM_SLIDE_REPEATED.md)).
|
| 602 |
- [ ] RE-492 Recover native trace/BSP collision/side effects, impact reset/consumers/legal state-record domains; compose complete evaluated slide-to-step/wrapper/mode/main shared state and validate macOS/Linux Rust/Bevy/Solari gameplay. Continue broader game/assets/rendering/protocol work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 600 |
- [x] RE-490 Retain supplied initial impact across contacts and recover accumulated max/early-return/capacity/touch-sentinel behavior with complete state checks ([REPEAT-002](research/QVM_SLIDE_REPEATED.md)).
|
| 601 |
- [x] RE-491 Evaluate actual four-contact exhaustion versus fourth-clear/allsolid/plane returns, preserving counter and common-exit precedence ([REPEAT-003](research/QVM_SLIDE_REPEATED.md)).
|
| 602 |
- [ ] RE-492 Recover native trace/BSP collision/side effects, impact reset/consumers/legal state-record domains; compose complete evaluated slide-to-step/wrapper/mode/main shared state and validate macOS/Linux Rust/Bevy/Solari gameplay. Continue broader game/assets/rendering/protocol work.
|
| 603 |
+
|
| 604 |
+
|
| 605 |
+
- [x] RE-493 Evaluate both real57714 children inside60091/59710 with actual shared state and disjoint live frames, replacing supplied slide returns/vectors ([CALLSLIDE-001](research/QVM_CONTACT_CALLERS.md)).
|
| 606 |
+
- [x] RE-494 Connect raised-child outputs to down/overlap traces, step policy and wrapper fallback/height stores while retaining accumulated touch/impact ([CALLSTEP-001](research/QVM_CONTACT_CALLERS.md)).
|
| 607 |
+
- [x] RE-495 Feed actual contact-capable wrapper state into41768 gravity/flag/timer tail and validate complete bounded chain outputs ([CALLMODE-001](research/QVM_CONTACT_CALLERS.md)).
|
| 608 |
+
- [ ] RE-496 Recover native trace/BSP collision/side effects/legal state-record domains/impact reset-consumers; other slide/step/mode callers and real main-dispatch/environment/clock/basis/action composition. Validate full macOS/Linux Rust/Bevy/Solari gameplay and continue broader game/assets/rendering/protocol work.
|
docs/research/QVM_CONTACT_CALLERS.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# QVM contact slides inside step, fallback wrapper and gravity mode
|
| 2 |
+
|
| 3 |
+
This batch completes bounded RE-493–495 / F-229–231. It connects [continuous57714 contact evaluation](QVM_SLIDE_REPEATED.md) to actual59710 step,60091 wrapper and41768 prefix/tail instructions, replacing the slide returns/positions/velocities supplied in [the earlier step study](QVM_STEP_COLLISION.md). Native roots and slide/down/overlap trace responses remain supplied; this is not a native collision or full gameplay simulation.
|
| 4 |
+
|
| 5 |
+
Reproduce with `python3 scripts/analyze_qvm_contact_callers.py`; validate with `python3 scripts/test_qvm_contact_callers.py`. The [machine report](qvm-contact-callers.json) retains verified source identity, all evaluated slide reports, caller snapshots, native request arguments/records, source return words and bounded trace hashes. No original executable, full QVM, native collision, physics or rendering executes.
|
| 6 |
+
|
| 7 |
+
## CALLSLIDE-001 — Real children at both slide boundaries (RE-493)
|
| 8 |
+
|
| 9 |
+
Twenty-two fixtures begin with seeded41768 state and evaluate its prefix before60091. First-slide patterns are first-clear, four repeated X contacts and a ground/opposed-normal early third-plane return. Timers0/16 and three step trace policies exercise bypass, success and failure. Four additional fixtures run another four-contact slide in the raised step rather than first-clear. Six first-clear fixtures bypass stepping entirely; their prepared step policies are not executed. The other16 invoke59710. In total38 slide child invocations are evaluated.
|
| 10 |
+
|
| 11 |
+
At wrapper CALL60111, helper57714 runs against the actual shared PS/frame/touch/impact memory. Its returned word replaces the caller's result local before continuation. A zero first-slide return takes the source bypass without invoking59710. A contact/early return1 enters the actual step request at60146, preserving original entry snapshots and first-attempt outputs separately.
|
| 12 |
+
|
| 13 |
+
Step59710 restores position/velocity from the wrapper's original entry snapshots, raises origin Z by18 and reduces maxZ from45 to27. At CALL59764 another57714 executes against those actual prepared inputs. Its result replaces the step caller's local return word; its position/velocity/flags/touch/impact effects remain live for later step instructions. Disjoint live frames use slide0x55000000, step0x52000000, wrapper0x53000000 and mode0x54000000. The sequential slide calls reuse their own frame after the first has returned; no live parent snapshot is overwritten.
|
| 14 |
+
|
| 15 |
+
The reusable repeated-slide evaluator now accepts optional initial memory and can return resulting memory. Its default reports remain byte-identical. The independent slide oracle likewise accepts an optional entry snapshot; it predicts the children from their actual entry vectors/flags/touches rather than assuming original fixture coordinates.
|
| 16 |
+
|
| 17 |
+
## CALLSTEP-001 — Down/overlap policy, fallback and retained effects (RE-494)
|
| 18 |
+
|
| 19 |
+
The actual raised child origin feeds the down-trace start. The source endpoint subtracts18 from that child Z, using maxZ27. Supplied down records either set allsolid or use fraction0.5/interpolated position and a Z normal. Accepted down traces apply the source biased velocity clip, restore maxZ45, copy the down endpoint into PS origin and request an overlap trace with restored bounds. A supplied overlap startsolid result forces failure; otherwise step succeeds. Early down failure also restores bounds but can retain child position/velocity changes.
|
| 20 |
+
|
| 21 |
+
Wrapper failure restores **the first attempt's** position and velocity, not the original entry snapshots used to launch the raised child. It sets flag32. Other state is not rolled back by those copies: child flags, touch list and impact remain live. On success the evaluated step output is retained. Final deltaZ against the original entry position is tested strictly above2 before truncation into frame+48. First-clear bypass leaves that height word at its supplied99.
|
| 22 |
+
|
| 23 |
+
The fixtures produce six bypasses, six step successes and ten step failures. The independent step/wrapper formulas use actual evaluated child results and supplied native records to verify every return, position, velocity, flag and height word. Touch and impact checks establish that the second child starts from the first child's accumulated values and that fallback retains the final child values. The initial impact0 is supplied once before mode entry; its real caller reset/consumers remain unverified.
|
| 24 |
+
|
| 25 |
+
## CALLMODE-001 — Actual wrapper output into gravity tail (RE-495)
|
| 26 |
+
|
| 27 |
+
After60091 returns,41768 continues in its original frame using actual wrapper output. Its prefix cleared32 before the first child; step/fallback instructions can set32 again. The tail subtracts rounded gravity*timestep from current Z. A strictly negative result clears mask192 and timer; nonnegative results retain them. Current position, height record, touch/impact and other snapshot fields remain those produced by the evaluated caller chain.
|
| 28 |
+
|
| 29 |
+
These22 fixtures therefore compose both contact-capable slide children, raised/down/overlap step policy, fallback/height stores and mode tail without supplying child returns or physical output vectors. The top-level mode entry, optional ground state, gravity/timestep, original PS/frame data and all native records are still synthetic. Main dispatch, environment classification, other movement/action helpers, collision-derived traces and real platform execution are not composed.
|
| 30 |
+
|
| 31 |
+
## Validation and remaining tasks
|
| 32 |
+
|
| 33 |
+
Eight tests independently verify all38 slide children, original-snapshot raise/shrink geometry, actual child-to-down/overlap endpoints and bounds, step returns/clipping, first-attempt fallback and height recording, wrapper-to-mode gravity/flag/timer state, retained touch/impact, exact caller arguments/disjoint frames, source hash and supplied-effect scope. The generalized prior oracle retains its default tests. Reproducibility/full-suite/storage/link/whitespace results are recorded in the research ledger.
|
| 34 |
+
|
| 35 |
+
RE-492 remains open for its broader native/legal/main/runtime scope; these bounded caller connections are covered by RE-493–495. RE-496 tracks native trace/BSP collision/side effects, legal state and record domains, impact reset/consumers, other slide/step/mode callers and real main-dispatch/environment/clock/basis/action state composition; validate full macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
docs/research/QVM_SLIDE_REPEATED.md
CHANGED
|
@@ -33,3 +33,6 @@ Eight tests verify all76 probes against an independent ordered-float state machi
|
|
| 33 |
Native square roots come from finite math at recorded source checkpoints. Native trace records and interpolated endpoint positions come from ordered fixture slots, not a BSP collision implementation. Trace bounds/normal domains, callback side effects, exceptional/alias/control-state cases and actual runtime legality remain unverified. No complete step/wrapper/mode/main movement simulation or platform/Rust/Bevy/Solari gameplay claim follows from this bounded helper evaluation.
|
| 34 |
|
| 35 |
RE-488 remains open for its broader native/caller/runtime scope; continuous finite repeated-contact/exhaustion behavior is now covered by RE-489–491. RE-492 tracks real native trace/BSP collision and callback side effects, impact reset/consumers, legal state/normal/record domains, complete evaluated slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
Native square roots come from finite math at recorded source checkpoints. Native trace records and interpolated endpoint positions come from ordered fixture slots, not a BSP collision implementation. Trace bounds/normal domains, callback side effects, exceptional/alias/control-state cases and actual runtime legality remain unverified. No complete step/wrapper/mode/main movement simulation or platform/Rust/Bevy/Solari gameplay claim follows from this bounded helper evaluation.
|
| 34 |
|
| 35 |
RE-488 remains open for its broader native/caller/runtime scope; continuous finite repeated-contact/exhaustion behavior is now covered by RE-489–491. RE-492 tracks real native trace/BSP collision and callback side effects, impact reset/consumers, legal state/normal/record domains, complete evaluated slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
Follow-up: [contact caller composition](QVM_CONTACT_CALLERS.md) completes bounded RE-493–495 by evaluating this slide helper at both60091/59710 boundaries and carrying its actual effects through step/fallback/mode. Native collision/legal/main/runtime scope remains open under RE-492/496.
|
docs/research/QVM_STEP_COLLISION.md
CHANGED
|
@@ -47,3 +47,6 @@ Eight independent tests verify117 step returns/clip words/bounds/trace geometry
|
|
| 47 |
RE-468 remains open for the missing physical slide effects. RE-472 tracks helper57714's complete slide/contact/plane/gravity loop, native trace/collision ABI and legal records, frame+48 meaning/consumers, other step callers/arguments/flag producers, full mode/environment/shared-state composition and gameplay/macOS/Linux/Rust/Bevy/Solari validation. Other actions/modes/suffix, contact/resource/playback/packet/entity/player/snapshot/rendering milestones remain open.
|
| 48 |
|
| 49 |
Follow-up: [slide57714 prefix recovery](QVM_SLIDE_PREFIX.md) replaces supplied first-slide results in20 clear-path wrapper/mode chains. First gravity/plane preparation, clear/allsolid exits and partial touch/contact handling are evaluated; later plane solving, repeated bumps and actual native collision remain open (RE-473–476).
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
RE-468 remains open for the missing physical slide effects. RE-472 tracks helper57714's complete slide/contact/plane/gravity loop, native trace/collision ABI and legal records, frame+48 meaning/consumers, other step callers/arguments/flag producers, full mode/environment/shared-state composition and gameplay/macOS/Linux/Rust/Bevy/Solari validation. Other actions/modes/suffix, contact/resource/playback/packet/entity/player/snapshot/rendering milestones remain open.
|
| 48 |
|
| 49 |
Follow-up: [slide57714 prefix recovery](QVM_SLIDE_PREFIX.md) replaces supplied first-slide results in20 clear-path wrapper/mode chains. First gravity/plane preparation, clear/allsolid exits and partial touch/contact handling are evaluated; later plane solving, repeated bumps and actual native collision remain open (RE-473–476).
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
Follow-up: [contact-capable actual slide composition](QVM_CONTACT_CALLERS.md) completes bounded RE-493–495, replacing supplied57714 returns/vectors in selected step/wrapper/mode chains with evaluated children. This earlier report retains its original supplied-slide scope. Native collision/full main/runtime remain open.
|
docs/research/README.md
CHANGED
|
@@ -204,3 +204,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 204 |
|
| 205 |
|
| 206 |
[QVM continuous repeated contacts and exhaustion](QVM_SLIDE_REPEATED.md) adds RE-489–491. Reproduce with `python3 scripts/analyze_qvm_slide_repeated.py`; check with `python3 scripts/test_qvm_slide_repeated.py`. The helper runs continuously with evaluated touch registration and supplied native roots/traces; full callers/native collision/runtime remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
|
| 206 |
[QVM continuous repeated contacts and exhaustion](QVM_SLIDE_REPEATED.md) adds RE-489–491. Reproduce with `python3 scripts/analyze_qvm_slide_repeated.py`; check with `python3 scripts/test_qvm_slide_repeated.py`. The helper runs continuously with evaluated touch registration and supplied native roots/traces; full callers/native collision/runtime remain open.
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
[QVM contact slides inside step/wrapper/mode](QVM_CONTACT_CALLERS.md) adds RE-493–495. Reproduce with `python3 scripts/analyze_qvm_contact_callers.py`; check with `python3 scripts/test_qvm_contact_callers.py`. Both57714 children run against actual shared state; native roots/traces and initial mode environment remain supplied.
|
docs/research/qvm-contact-callers.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_contact_callers.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Actual slide children inside step/wrapper/mode with supplied native traces."""
|
| 3 |
+
import itertools,json
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from analyze_bsp_references import trace_fields
|
| 6 |
+
from analyze_deferred_auth import trace_slice
|
| 7 |
+
from analyze_qvm import decode,write_json
|
| 8 |
+
from analyze_qvm_acceleration import PS,FRAME,word,number,f
|
| 9 |
+
from analyze_qvm_slide_prefix import seed,vec
|
| 10 |
+
from analyze_qvm_slide_repeated import run,specs
|
| 11 |
+
from analyze_qvm_step_collision import STEP,WRAP,MODE
|
| 12 |
+
from analyze_vm_extensions import verified
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def snapshot(m):
|
| 16 |
+
return {'origin':vec(m,PS+20),'velocity':vec(m,PS+32),'flags':m[PS+12]&0xffffffff,'normal_xy':[m[PS+96]&0xffffffff,m[PS+100]&0xffffffff],'timer':m[PS+16],'maxz':m[FRAME+204]&0xffffffff,'height':m[FRAME+48],'touches':[m[FRAME+56+4*i] for i in range(m[FRAME+52])],'impact':m[35024000]&0xffffffff}
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def child(ins,m,records,gravity,name):
|
| 20 |
+
return run(ins,name,records,gravity,m[PS+16],m[35023940],number(m[35023928]),number(m[35024000]),initial_memory=m,return_memory=True)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def step(ins,m,args,records,policy):
|
| 24 |
+
m=dict(m);m.update({STEP+160:args[8],STEP+164:args[12],STEP+168:args[16]});pc=59711;calls=[];trace=[];requests=[];slide=None;at_slide=None;initial=snapshot(m)
|
| 25 |
+
while True:
|
| 26 |
+
t=trace_slice(ins,59711,60089,m,{},resume_at=pc,stop_targets=[s for s in [59766,59848,60075] if s!=pc],local_base=STEP,halt_on_leave=True,capture_stack=True,limit=1024);m=t['memory'];calls+=t['calls'];trace+=t['trace'];pc=t['stop']
|
| 27 |
+
if pc==59766:
|
| 28 |
+
at_slide=snapshot(m);m,slide=child(ins,m,records,args[8],'step_slide');m[STEP+116]=slide['return_word']
|
| 29 |
+
elif pc in [59848,60075]:
|
| 30 |
+
c=t['calls'][-1];a=c['args'];start=vec(m,a[12]);end=vec(m,a[24]);fraction=.5 if pc==59848 else 1;point=[word(f(number(x)+f(f(number(y)-number(x))*f(fraction)))) for x,y in zip(start,end)];solid=int(policy=='down_solid' and pc==59848);startsolid=int(policy=='overlap_solid' and pc==60075);record=[solid,startsolid,word(fraction),*point,word(0),word(0),word(1),0,0,0,0,9];requests.append({'call':c,'start':start,'end':end,'maxz':m[FRAME+204]&0xffffffff,'record':record})
|
| 31 |
+
for i,v in enumerate(record):m[a[8]+4*i]=v
|
| 32 |
+
elif t['trace'] and ins[t['trace'][-1]]['opcode']=='LEAVE':return m,{'initial':initial,'at_slide':at_slide,'slide':slide,'requests':requests,'return_word':t['stack'][-1],'final':snapshot(m),'calls':calls,**trace_fields({'trace':trace},False)}
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def composition(ins,first_name,timer,policy,second_name):
|
| 36 |
+
ground=int(first_name=='early');m=seed(flags=2208,timer=timer,plane=ground);m[35024000]=word(0);initial=snapshot(m);pre=trace_slice(ins,41769,41846,m,{},stop_targets=[41789],local_base=MODE);m=pre['memory'];before_wrapper=snapshot(m);pc=60092;calls=[];trace=[];first=None;stepped=None
|
| 37 |
+
patterns={'clear':[{'fraction':1,'normal':[0,0,1],'entity':8}],'contacts':specs([(1,0,0)]*4),'early':specs([(0,0,-1)]*4)}
|
| 38 |
+
while True:
|
| 39 |
+
t=trace_slice(ins,60092,60213,m,{92:1} if pc==60092 else {},resume_at=pc,stop_targets=[s for s in [60113,60148] if s!=pc],local_base=WRAP,halt_on_leave=True,capture_stack=True,limit=512);m=t['memory'];calls+=t['calls'];trace+=t['trace'];pc=t['stop']
|
| 40 |
+
if pc==60113:m,first=child(ins,m,patterns[first_name],1,'first_slide');m[WRAP+48]=first['return_word']
|
| 41 |
+
elif pc==60148:m,stepped=step(ins,m,t['calls'][-1]['args'],patterns[second_name],policy);m[WRAP+76]=stepped['return_word']
|
| 42 |
+
elif t['trace'] and ins[t['trace'][-1]]['opcode']=='LEAVE':wrapper={'before':before_wrapper,'first_slide':first,'step':stepped,'return_word':t['stack'][-1],'final':snapshot(m),'calls':calls,**trace_fields({'trace':trace},False)};break
|
| 43 |
+
post=trace_slice(ins,41769,41846,m,{},resume_at=41789,local_base=MODE)
|
| 44 |
+
return {'first_pattern':first_name,'step_pattern':second_name,'policy':policy,'initial':initial,'wrapper':wrapper,'mode_final':snapshot(post['memory']),'mode_calls':pre['calls']+post['calls']}
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def main():
|
| 48 |
+
q=json.loads(Path('docs/research/qvm/qagame.json').read_text());_,ins=decode(verified(Path(q['source']['member']['output']).read_bytes(),q['sha256']))
|
| 49 |
+
probes=[composition(ins,a,t,p,'clear') for a,t,p in itertools.product(['clear','contacts','early'],[0,16],['clear','down_solid','overlap_solid'])]
|
| 50 |
+
probes += [composition(ins,'contacts',t,p,'contacts') for t,p in itertools.product([0,16],['clear','overlap_solid'])]
|
| 51 |
+
out={'source':q['source'],'sha256':q['sha256'],'probes':probes,'limitations':'Bounded finite shipped-QVM composition; no original executable/full QVM/native collision/physics/rendering executes. Both57714 children,59710,60091 and41768 prefix/tail evaluate actual shared PS/frame/touch/impact state with disjoint live caller frames. Native roots and ordered slide/down/overlap trace records/interpolated endpoints remain supplied; collision/normal/record reachability and native side effects are unverified. Initial impact0 is supplied once before mode and retained across both slide children. Mode is seeded directly, not composed with main dispatch or all movement/actions. Complete native collision/runtime/macOS/Linux/Rust/Bevy/Solari gameplay remains open.'};write_json(Path('docs/research/qvm-contact-callers.json'),out);print('Composed actual contact slides through step/wrapper/mode')
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
if __name__=='__main__':main()
|
scripts/analyze_qvm_slide_repeated.py
CHANGED
|
@@ -17,13 +17,14 @@ def state(m):
|
|
| 17 |
return {'origin':vec(m,PS+20),'velocity':vec(m,PS+32),'end':vec(m,LOCAL+148),'saved':vec(m,LOCAL+252),'planes':planes(m),'remaining':m[LOCAL+224]&0xffffffff,'impact':m[35024000]&0xffffffff,'flags':m[PS+12]&0xffffffff,'normal_xy':[m[PS+96]&0xffffffff,m[PS+100]&0xffffffff],'keep':m[LOCAL+248],'bump':m[LOCAL+240],'touches':[m[FRAME+56+4*i] for i in range(m[FRAME+52])]}
|
| 18 |
|
| 19 |
|
| 20 |
-
def run(ins,name,specs,g,timer,ground,dt,impact):
|
| 21 |
-
m=seed(flags=2080,timer=timer,plane=ground,dt=dt);m[35024000]=word(impact);m[LOCAL+352]=g;pc=57715;roots=[];requests=[];calls=[];trace=[];root=0;children=[];suffix=False
|
| 22 |
stops=[57936,58200,58302,58312,58476,59191,59405,59637,59648]
|
| 23 |
for segment in range(128):
|
| 24 |
t=trace_slice(ins,57715,59708,m,{},resume_at=pc,stop_targets=[s for s in stops if s!=pc],local_base=LOCAL,call_results={57979:root,59215:root,59429:root},halt_on_leave=True,capture_stack=True,limit=8192);m=t['memory'];pc=t['stop'];trace+=t['trace'];calls+=t['calls']
|
| 25 |
if t['trace'] and ins[t['trace'][-1]]['opcode']=='LEAVE':
|
| 26 |
-
|
|
|
|
| 27 |
if pc in [57936,59191,59405]:
|
| 28 |
raw=vec(m,PS+32 if pc==57936 else LOCAL+100);root=root_word(list(map(number,raw)));roots.append({'checkpoint':pc,'raw':raw,'supplied_root':root})
|
| 29 |
elif pc==58200:
|
|
|
|
| 17 |
return {'origin':vec(m,PS+20),'velocity':vec(m,PS+32),'end':vec(m,LOCAL+148),'saved':vec(m,LOCAL+252),'planes':planes(m),'remaining':m[LOCAL+224]&0xffffffff,'impact':m[35024000]&0xffffffff,'flags':m[PS+12]&0xffffffff,'normal_xy':[m[PS+96]&0xffffffff,m[PS+100]&0xffffffff],'keep':m[LOCAL+248],'bump':m[LOCAL+240],'touches':[m[FRAME+56+4*i] for i in range(m[FRAME+52])]}
|
| 18 |
|
| 19 |
|
| 20 |
+
def run(ins,name,specs,g,timer,ground,dt,impact,initial_memory=None,return_memory=False):
|
| 21 |
+
m=seed(flags=2080,timer=timer,plane=ground,dt=dt) if initial_memory is None else dict(initial_memory);m[35024000]=word(impact);m[LOCAL+352]=g;pc=57715;roots=[];requests=[];calls=[];trace=[];root=0;children=[];suffix=False
|
| 22 |
stops=[57936,58200,58302,58312,58476,59191,59405,59637,59648]
|
| 23 |
for segment in range(128):
|
| 24 |
t=trace_slice(ins,57715,59708,m,{},resume_at=pc,stop_targets=[s for s in stops if s!=pc],local_base=LOCAL,call_results={57979:root,59215:root,59429:root},halt_on_leave=True,capture_stack=True,limit=8192);m=t['memory'];pc=t['stop'];trace+=t['trace'];calls+=t['calls']
|
| 25 |
if t['trace'] and ins[t['trace'][-1]]['opcode']=='LEAVE':
|
| 26 |
+
report={'name':name,'gravity':g,'timer':timer,'ground':ground,'dt':word(dt),'initial_impact':word(impact),'specs':specs,'requests':requests,'roots':roots,'touch_children':children,'calls':calls,'common_exit':suffix,'return_word':t['stack'][-1],'leave_instruction':t['trace'][-1],'final':state(m),**trace_fields({'trace':trace},False)}
|
| 27 |
+
return (m,report) if return_memory else report
|
| 28 |
if pc in [57936,59191,59405]:
|
| 29 |
raw=vec(m,PS+32 if pc==57936 else LOCAL+100);root=root_word(list(map(number,raw)));roots.append({'checkpoint':pc,'raw':raw,'supplied_root':root})
|
| 30 |
elif pc==58200:
|
scripts/test_qvm_contact_callers.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Independent child, step, wrapper and gravity-tail composition checks."""
|
| 3 |
+
import hashlib,json
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
import unittest
|
| 6 |
+
from test_qvm_ground import f,n,word
|
| 7 |
+
from test_qvm_slide_repeated import oracle as slide_oracle
|
| 8 |
+
from test_qvm_step_collision import step_oracle
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def expected_step(p):
|
| 12 |
+
child=p['slide'];v=child['final'];down=p['requests'][0]['record'];overlap=p['requests'][1]['record'] if len(p['requests'])>1 else [0,0]
|
| 13 |
+
return step_oracle({'initial_flags_word':v['flags'],'supplied_slide_return':child['return_word'],'supplied_slide_origin_float_words':v['origin'],'supplied_slide_velocity_float_words':v['velocity'],'supplied_trace_words':down,'supplied_final_solid':overlap[0],'supplied_final_startsolid':overlap[1]})
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class QvmContactCallersTests(unittest.TestCase):
|
| 17 |
+
@classmethod
|
| 18 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-contact-callers.json').read_text())
|
| 19 |
+
|
| 20 |
+
def test_every_actual_slide_against_generalized_independent_state_machine(self):
|
| 21 |
+
self.assertEqual(len(self.r['probes']),22);children=0
|
| 22 |
+
for p in self.r['probes']:
|
| 23 |
+
w=p['wrapper'];slide_oracle(self,w['first_slide'],w['before']);children+=1
|
| 24 |
+
if w['step']:slide_oracle(self,w['step']['slide'],w['step']['at_slide']);children+=1
|
| 25 |
+
self.assertEqual(children,38)
|
| 26 |
+
|
| 27 |
+
def test_raised_child_receives_original_snapshot_and_shrunk_hull(self):
|
| 28 |
+
for p in self.r['probes']:
|
| 29 |
+
w=p['wrapper'];s=w['step']
|
| 30 |
+
if not s:continue
|
| 31 |
+
self.assertEqual(s['at_slide']['origin'],w['before']['origin'][:2]+[word(f(n(w['before']['origin'][2])+18))]);self.assertEqual(s['at_slide']['velocity'],w['before']['velocity']);self.assertEqual(s['at_slide']['maxz'],word(27));self.assertEqual(s['final']['maxz'],word(45));self.assertEqual(s['calls'][0],{'instruction':59764,'target':57714,'args':{'8':1}})
|
| 32 |
+
|
| 33 |
+
def test_actual_child_results_drive_down_overlap_and_step_return(self):
|
| 34 |
+
for p in self.r['probes']:
|
| 35 |
+
s=p['wrapper']['step']
|
| 36 |
+
if not s:continue
|
| 37 |
+
ret,origin,v,flags=expected_step(s);self.assertEqual([s['return_word'],s['final']['origin'],s['final']['velocity'],s['final']['flags']],[ret,origin,v,flags]);down=s['requests'][0];self.assertEqual(down['start'],s['slide']['final']['origin']);self.assertEqual(down['end'],down['start'][:2]+[word(f(n(down['start'][2])-18))]);self.assertEqual(down['maxz'],word(27));self.assertEqual(len(s['requests']),1 if p['policy']=='down_solid' else 2)
|
| 38 |
+
if len(s['requests'])==2:q=s['requests'][1];self.assertEqual(q['start'],down['record'][3:6]);self.assertEqual(q['end'],q['start']);self.assertEqual(q['maxz'],word(45))
|
| 39 |
+
|
| 40 |
+
def test_wrapper_bypass_fallback_success_and_height_words(self):
|
| 41 |
+
seen=set()
|
| 42 |
+
for p in self.r['probes']:
|
| 43 |
+
w=p['wrapper'];first=w['first_slide']['final'];s=w['step'];self.assertEqual(w['return_word'],1)
|
| 44 |
+
if s:
|
| 45 |
+
ret,origin,v,flags=expected_step(s);seen.add('success' if ret else 'fallback')
|
| 46 |
+
if not ret:origin=first['origin'];v=first['velocity'];flags|=32
|
| 47 |
+
delta=f(n(origin[2])-n(w['before']['origin'][2]));height=int(delta) if delta>2 else 99
|
| 48 |
+
else:seen.add('bypass');self.assertEqual(w['first_slide']['return_word'],0);origin,v,flags,height=first['origin'],first['velocity'],first['flags'],99
|
| 49 |
+
self.assertEqual([w['final']['origin'],w['final']['velocity'],w['final']['flags'],w['final']['height']],[origin,v,flags,height])
|
| 50 |
+
self.assertEqual(seen,{'bypass','success','fallback'})
|
| 51 |
+
|
| 52 |
+
def test_evaluated_wrapper_state_feeds_mode_tail(self):
|
| 53 |
+
for p in self.r['probes']:
|
| 54 |
+
w=p['wrapper'];expected=dict(w['final']);vz=f(n(expected['velocity'][2])-f(f(800)*n(p['wrapper']['first_slide']['dt'])));expected['velocity']=expected['velocity'][:2]+[word(vz)]
|
| 55 |
+
if vz<0:expected['flags']&=~192;expected['timer']=0
|
| 56 |
+
self.assertEqual(p['mode_final'],expected);self.assertEqual(w['before']['flags'],p['initial']['flags']&~32);self.assertEqual(p['mode_calls'],[{'instruction':41787,'target':60091,'args':{'8':1}}])
|
| 57 |
+
|
| 58 |
+
def test_touch_and_impact_survive_child_entry_and_position_fallback(self):
|
| 59 |
+
retained=False
|
| 60 |
+
for p in self.r['probes']:
|
| 61 |
+
w=p['wrapper'];s=w['step']
|
| 62 |
+
if not s:continue
|
| 63 |
+
first=w['first_slide']['final'];second=s['slide'];self.assertEqual(second['initial_impact'],first['impact']);self.assertEqual(second['requests'][0]['before']['touches'],first['touches']);self.assertEqual(w['final']['touches'],second['final']['touches']);self.assertEqual(w['final']['impact'],second['final']['impact']);retained|=bool(first['touches'])
|
| 64 |
+
self.assertTrue(retained)
|
| 65 |
+
|
| 66 |
+
def test_actual_call_boundaries_and_disjoint_parent_frames(self):
|
| 67 |
+
for p in self.r['probes']:
|
| 68 |
+
w=p['wrapper'];self.assertEqual(w['calls'][0],{'instruction':60111,'target':57714,'args':{'8':1}})
|
| 69 |
+
if w['step']:self.assertEqual(w['calls'][1],{'instruction':60146,'target':59710,'args':{'8':1,'12':0x53000018,'16':0x53000024,'20':18}});self.assertEqual(w['step']['requests'][0]['call']['args']['8'],0x52000024)
|
| 70 |
+
else:self.assertEqual(len(w['calls']),1)
|
| 71 |
+
|
| 72 |
+
def test_source_and_supplied_native_scope(self):
|
| 73 |
+
q=json.loads(Path('docs/research/qvm/qagame.json').read_text());self.assertEqual(self.r['source'],q['source']);self.assertEqual(self.r['sha256'],hashlib.sha256(Path(q['source']['member']['output']).read_bytes()).hexdigest())
|
| 74 |
+
for text in ['no original executable/full QVM/native collision/physics/rendering executes','Initial impact0 is supplied once','Native roots and ordered slide/down/overlap trace records/interpolated endpoints remain supplied','not composed with main dispatch']:self.assertIn(text,self.r['limitations'])
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
if __name__=='__main__':unittest.main()
|
scripts/test_qvm_slide_repeated.py
CHANGED
|
@@ -9,10 +9,11 @@ from test_qvm_slide_planes import gate_oracle,dot
|
|
| 9 |
from test_qvm_slide_solver import solver_oracle
|
| 10 |
|
| 11 |
|
| 12 |
-
def oracle(test,p):
|
| 13 |
-
|
|
|
|
| 14 |
v,end,saved,planes,_,_=prefix_oracle({'initial':a,'gravity_on_word':p['gravity']})
|
| 15 |
-
s={'origin':list(map(word,[100,200,300])),'velocity':v,'end':end,'saved':saved,'planes':planes,'remaining':p['dt'],'impact':p['initial_impact'],'flags':2080,'normal_xy':[0x12345678,0x23456789],'keep':0,'bump':0,'touches':[]}
|
| 16 |
def suffix():
|
| 17 |
if p['gravity']:s['velocity']=s['end'][:]
|
| 18 |
if p['timer']:s['velocity']=s['saved'][:]
|
|
@@ -37,7 +38,7 @@ def oracle(test,p):
|
|
| 37 |
if status=='third_plane_return':reason=59589;break
|
| 38 |
test.assertEqual(q['after_solver_or_duplicate'],s);s['bump']+=1
|
| 39 |
if s['bump']==4:suffix();reason=59707;break
|
| 40 |
-
test.assertIsNotNone(reason);test.assertEqual(p['leave_instruction'],reason);test.assertEqual(p['common_exit'],reason==59707);test.assertEqual(p['return_word'],1);test.assertEqual(p['final'],s)
|
| 41 |
|
| 42 |
|
| 43 |
class QvmSlideRepeatedTests(unittest.TestCase):
|
|
|
|
| 9 |
from test_qvm_slide_solver import solver_oracle
|
| 10 |
|
| 11 |
|
| 12 |
+
def oracle(test,p,seed_state=None):
|
| 13 |
+
seed_state=seed_state or {}
|
| 14 |
+
a={'velocity_float_words':seed_state.get('velocity',list(map(word,[10,20,30]))),'normal_float_words':list(map(word,[0,0,1])),'dt_float_word':p['dt'],'gravity_word':800,'plane_word':p['ground']}
|
| 15 |
v,end,saved,planes,_,_=prefix_oracle({'initial':a,'gravity_on_word':p['gravity']})
|
| 16 |
+
s={'origin':seed_state.get('origin',list(map(word,[100,200,300]))),'velocity':v,'end':end,'saved':saved,'planes':planes,'remaining':p['dt'],'impact':p['initial_impact'],'flags':seed_state.get('flags',2080),'normal_xy':seed_state.get('normal_xy',[0x12345678,0x23456789]),'keep':0,'bump':0,'touches':seed_state.get('touches',[])[:]}
|
| 17 |
def suffix():
|
| 18 |
if p['gravity']:s['velocity']=s['end'][:]
|
| 19 |
if p['timer']:s['velocity']=s['saved'][:]
|
|
|
|
| 38 |
if status=='third_plane_return':reason=59589;break
|
| 39 |
test.assertEqual(q['after_solver_or_duplicate'],s);s['bump']+=1
|
| 40 |
if s['bump']==4:suffix();reason=59707;break
|
| 41 |
+
test.assertIsNotNone(reason);test.assertEqual(p['leave_instruction'],reason);test.assertEqual(p['common_exit'],reason==59707);test.assertEqual(p['return_word'],int(s['bump']!=0) if reason==59707 else 1);test.assertEqual(p['final'],s)
|
| 42 |
|
| 43 |
|
| 44 |
class QvmSlideRepeatedTests(unittest.TestCase):
|