qvm: acceleration
Browse files- docs/ASSET_PIPELINE_TODO.md +2 -0
- docs/FINDINGS.md +6 -0
- docs/PROVISIONAL_TODO.md +2 -0
- docs/RESEARCH_LEDGER.md +6 -0
- docs/REVERSE_ENGINEERING_TODO.md +5 -0
- docs/research/QVM_ACCELERATION.md +52 -0
- docs/research/QVM_VIEW_MOTION.md +2 -0
- docs/research/README.md +2 -0
- docs/research/qvm-acceleration.json +0 -0
- scripts/analyze_deferred_auth.py +6 -5
- scripts/analyze_qvm_acceleration.py +61 -0
- scripts/test_qvm_acceleration.py +70 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -256,3 +256,5 @@ Research progress: [QVM movement scheduler/output gates](research/QVM_MOVEMENT_L
|
|
| 256 |
Research progress: [QVM child flags/clock/dispatch](research/QVM_STEP_STATE.md) completes bounded RE-421–423. RE-420/424 retain omitted child/callee/physics/native effects and complete gameplay/runtime/platform work; broad game/rendering milestones remain open.
|
| 257 |
|
| 258 |
Research progress: [QVM view/basis/position tails](research/QVM_VIEW_MOTION.md) completes bounded RE-425–427. RE-424/428 retain native trig/callees/full mode physics/composition/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
| 256 |
Research progress: [QVM child flags/clock/dispatch](research/QVM_STEP_STATE.md) completes bounded RE-421–423. RE-420/424 retain omitted child/callee/physics/native effects and complete gameplay/runtime/platform work; broad game/rendering milestones remain open.
|
| 257 |
|
| 258 |
Research progress: [QVM view/basis/position tails](research/QVM_VIEW_MOTION.md) completes bounded RE-425–427. RE-424/428 retain native trig/callees/full mode physics/composition/runtime/platform work; broad game/rendering milestones remain open.
|
| 259 |
+
|
| 260 |
+
Research progress: [QVM command scale/acceleration](research/QVM_ACCELERATION.md) completes bounded RE-429–431. RE-428/432 retain native sqrt/friction/producers/legal ranges/full mode/collision/runtime/platform work; broad game/rendering milestones remain open.
|
docs/FINDINGS.md
CHANGED
|
@@ -498,3 +498,9 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 498 |
**F-179 — Conditional basis algebra:** child angle/trig requests and rounded nine-word basis construction match independent rotation/orthogonality oracles under supplied source angles/trig returns. Native trig/return ABI, view/helper50525 effects and real physics composition remain unverified. [VIEW-002](research/QVM_VIEW_MOTION.md).
|
| 499 |
|
| 500 |
**F-180 — Mode position tails:** helper42486 integrates supplied velocity only if any component magnitude exceeds1; helper45461's tail integrates unconditionally. Exact rounded position words and velocity retention match independent fixtures; complete modes/friction/acceleration/collision/runtime remain open. [VIEW-003](research/QVM_VIEW_MOTION.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
**F-179 — Conditional basis algebra:** child angle/trig requests and rounded nine-word basis construction match independent rotation/orthogonality oracles under supplied source angles/trig returns. Native trig/return ABI, view/helper50525 effects and real physics composition remain unverified. [VIEW-002](research/QVM_VIEW_MOTION.md).
|
| 499 |
|
| 500 |
**F-180 — Mode position tails:** helper42486 integrates supplied velocity only if any component magnitude exceeds1; helper45461's tail integrates unconditionally. Exact rounded position words and velocity retention match independent fixtures; complete modes/friction/acceleration/collision/runtime remain open. [VIEW-003](research/QVM_VIEW_MOTION.md).
|
| 501 |
+
|
| 502 |
+
**F-181 — Command scale:** helper40397 uses literal speeds220/340, with button256/right-zero/forward>80/player-state+184>10 gates for340. Signed-byte max magnitude and supplied sqrt feed the exact normalized scale; legal movement/meter/button domains and native sqrt remain open. [ACCEL-001](research/QVM_ACCELERATION.md).
|
| 503 |
+
|
| 504 |
+
**F-182 — Acceleration policy:** helper40275 computes projection gap, returns unchanged for gap<=0 and otherwise adds a direction-scaled coefficient/timestep/wish-speed amount capped to the gap. It does not clamp total speed; full surrounding friction/collision/runtime policy remains open. [ACCEL-002](research/QVM_ACCELERATION.md).
|
| 505 |
+
|
| 506 |
+
**F-183 — Partial mode composition:** 48 supplied-basis/post-friction fixtures compose decoded command-scale, caller normalization, acceleration and position-tail instructions with exact word/request oracles and disjoint synthetic local frames. Earlier mode/native sqrt/collision/full-runtime effects remain omitted. [ACCEL-003](research/QVM_ACCELERATION.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -568,3 +568,5 @@ Research progress: [QVM movement scheduler/output gates](research/QVM_MOVEMENT_L
|
|
| 568 |
Research progress: [QVM child flags/clock/dispatch](research/QVM_STEP_STATE.md) completes bounded RE-421–423. RE-420/424 retain omitted child/callee/physics/native effects and complete gameplay/runtime/platform work; broad game/rendering milestones remain open.
|
| 569 |
|
| 570 |
Research progress: [QVM view/basis/position tails](research/QVM_VIEW_MOTION.md) completes bounded RE-425–427. RE-424/428 retain native trig/callees/full mode physics/composition/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
| 568 |
Research progress: [QVM child flags/clock/dispatch](research/QVM_STEP_STATE.md) completes bounded RE-421–423. RE-420/424 retain omitted child/callee/physics/native effects and complete gameplay/runtime/platform work; broad game/rendering milestones remain open.
|
| 569 |
|
| 570 |
Research progress: [QVM view/basis/position tails](research/QVM_VIEW_MOTION.md) completes bounded RE-425–427. RE-424/428 retain native trig/callees/full mode physics/composition/runtime/platform work; broad game/rendering milestones remain open.
|
| 571 |
+
|
| 572 |
+
Research progress: [QVM command scale/acceleration](research/QVM_ACCELERATION.md) completes bounded RE-429–431. RE-428/432 retain native sqrt/friction/producers/legal ranges/full mode/collision/runtime/platform work; broad game/rendering milestones remain open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -307,3 +307,9 @@ Validation: all preceding composition reports regenerated byte-identically, incl
|
|
| 307 |
Completed bounded RE-425–427 with `analyze_qvm_view_motion.py`: verified shipped qagame helper53186/basis/tail slices, 42 view probes, twelve supplied-trig basis probes and 48 mode-tail probes. VIEW-001–003/F-178–180 recover view state gates, signed16 command+delta conversion, pitch clamp/bias/delta rewrites and bit16 truncation in this consumer; conditional view-helper/trig requests and rounded nine-word rotation basis; and per-component velocity threshold versus unconditional rounded position integration. Independent formulas verify exact view/delta/basis/position words, orthogonality, requests and velocity retention. Trig returns/source angles and post-acceleration velocity/timestep are supplied; view conversion is evaluated separately and helper53186/50525 effects in the basis slice remain omitted. No full QVM/original executable/native callee/collision/physics executes. Shared evaluator adds explicit byte-backed halfwords/sign-extension and finite add/subtract/negate/comparison operations, retaining prior MULF behavior and rejecting unknown halfwords/nonfinite cases. General alias/coherence/control-state/runtime semantics remain open. Eight independent tests cover gates/clamps/bias/deltas/high-word truncation, trig/skip/argument behavior, exact rotation and orthogonality, threshold/tail integration/retention, source boundaries, halfword failure domains and finite operations. All 463 tests pass; storage/links/whitespace checks pass. RE-424 remains open; RE-428 tracks native trig ABI/services/helper50525, real view-to-child vector composition, complete mode friction/acceleration/collision, semantic type/coordinate/producer/key domains, exceptional/alias/control-state cases, main movement and full gameplay/macOS/Linux/Rust/Bevy/Solari compatibility; packet/entity/player/snapshot/rendering milestones remain open.
|
| 308 |
|
| 309 |
Validation: all preceding composition reports regenerated byte-identically, including shared-QVM-evaluator users. The new view-motion report reproduced twice byte-identically. Final suite: 463 passing tests. Storage policy/filter setup, documentation links and whitespace checks pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
Completed bounded RE-425–427 with `analyze_qvm_view_motion.py`: verified shipped qagame helper53186/basis/tail slices, 42 view probes, twelve supplied-trig basis probes and 48 mode-tail probes. VIEW-001–003/F-178–180 recover view state gates, signed16 command+delta conversion, pitch clamp/bias/delta rewrites and bit16 truncation in this consumer; conditional view-helper/trig requests and rounded nine-word rotation basis; and per-component velocity threshold versus unconditional rounded position integration. Independent formulas verify exact view/delta/basis/position words, orthogonality, requests and velocity retention. Trig returns/source angles and post-acceleration velocity/timestep are supplied; view conversion is evaluated separately and helper53186/50525 effects in the basis slice remain omitted. No full QVM/original executable/native callee/collision/physics executes. Shared evaluator adds explicit byte-backed halfwords/sign-extension and finite add/subtract/negate/comparison operations, retaining prior MULF behavior and rejecting unknown halfwords/nonfinite cases. General alias/coherence/control-state/runtime semantics remain open. Eight independent tests cover gates/clamps/bias/deltas/high-word truncation, trig/skip/argument behavior, exact rotation and orthogonality, threshold/tail integration/retention, source boundaries, halfword failure domains and finite operations. All 463 tests pass; storage/links/whitespace checks pass. RE-424 remains open; RE-428 tracks native trig ABI/services/helper50525, real view-to-child vector composition, complete mode friction/acceleration/collision, semantic type/coordinate/producer/key domains, exceptional/alias/control-state cases, main movement and full gameplay/macOS/Linux/Rust/Bevy/Solari compatibility; packet/entity/player/snapshot/rendering milestones remain open.
|
| 308 |
|
| 309 |
Validation: all preceding composition reports regenerated byte-identically, including shared-QVM-evaluator users. The new view-motion report reproduced twice byte-identically. Final suite: 463 passing tests. Storage policy/filter setup, documentation links and whitespace checks pass.
|
| 310 |
+
|
| 311 |
+
## 2026-10-15 — Game-QVM command scale, acceleration and partial mode composition
|
| 312 |
+
|
| 313 |
+
Completed bounded RE-429–431 with `analyze_qvm_acceleration.py`: verified shipped qagame helpers40397/40275 and selected helper45461 caller, 256 command-scale probes, 324 acceleration probes and 48 partial caller compositions. ACCEL-001–003/F-181–183 recover literal220/340 speed gating, signed-byte maximum/norm scale and zero bypass; rounded projection/gap/capped-amount velocity updates without total-speed clamping; and evaluated scale/normalization/acceleration/position data flow with supplied identity basis/post-friction velocity. Square-root returns are supplied from ordinary finite math rather than native trap106; prior mode/friction/collision/callback effects remain omitted and no full QVM/original executable/native callee/physics system executes. Explicit disjoint synthetic caller/scale/acceleration frames prevent local-word overwrites. Shared evaluator adds finite DIVF with zero/nonfinite rejection and configurable local base with unchanged default. Eight independent tests verify exact scale/sqrt requests/strict thresholds, full projection/gap/amount/velocity, above-target retention, partial caller direction/speed/velocity/position/requests, source partitions, frame isolation and division failure domains. All 471 tests pass; storage/links/whitespace checks pass. RE-428 remains open; RE-432 tracks friction/surrounding velocity policy, native sqrt ABI, input/button/meter/coefficient/timestep producers/legal ranges, real basis/frame/callee/collision effects and complete mode/step gameplay/macOS/Linux/Rust/Bevy/Solari compatibility; packet/entity/player/snapshot/rendering milestones remain open.
|
| 314 |
+
|
| 315 |
+
Validation: all preceding composition reports regenerated byte-identically, including shared-QVM-evaluator users. The new acceleration report reproduced twice byte-identically. Final suite: 471 passing tests. Storage policy/filter setup, documentation links and whitespace checks pass.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -517,3 +517,8 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 517 |
- [x] RE-426 Recover bounded child basis-vector algebra and helper/trig request gating with explicitly supplied trig returns and independent rotation/orthogonality checks. [VIEW-002](research/QVM_VIEW_MOTION.md).
|
| 518 |
- [x] RE-427 Recover bounded per-component-threshold and unconditional position-update tails of helpers42486/45461 using supplied post-acceleration vectors/timestep. [VIEW-003](research/QVM_VIEW_MOTION.md).
|
| 519 |
- [ ] RE-428 Recover native trig ABI/services/helper50525, real view-to-child vector composition, complete mode acceleration/friction/collision effects, field/type/coordinate meanings and angle producer/key domains; characterize alias/exceptional/control-state cases, main movement branches and full gameplay/macOS/Linux before Rust/Bevy/Solari claims. Continue packet/entity/player/snapshot/rendering work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
- [x] RE-426 Recover bounded child basis-vector algebra and helper/trig request gating with explicitly supplied trig returns and independent rotation/orthogonality checks. [VIEW-002](research/QVM_VIEW_MOTION.md).
|
| 518 |
- [x] RE-427 Recover bounded per-component-threshold and unconditional position-update tails of helpers42486/45461 using supplied post-acceleration vectors/timestep. [VIEW-003](research/QVM_VIEW_MOTION.md).
|
| 519 |
- [ ] RE-428 Recover native trig ABI/services/helper50525, real view-to-child vector composition, complete mode acceleration/friction/collision effects, field/type/coordinate meanings and angle producer/key domains; characterize alias/exceptional/control-state cases, main movement branches and full gameplay/macOS/Linux before Rust/Bevy/Solari claims. Continue packet/entity/player/snapshot/rendering work.
|
| 520 |
+
|
| 521 |
+
- [x] RE-429 Recover bounded complete helper40397 signed command scale, literal220/340 speed gates and zero/supplied-sqrt behavior with independent finite formulas. [ACCEL-001](research/QVM_ACCELERATION.md).
|
| 522 |
+
- [x] RE-430 Recover bounded complete helper40275 dot/gap/capped-amount/vector acceleration and above-target retention. [ACCEL-002](research/QVM_ACCELERATION.md).
|
| 523 |
+
- [x] RE-431 Compose evaluated scale/acceleration into selected helper45461 wish-vector/normalization/position slices using supplied basis/post-friction state and disjoint synthetic frames. [ACCEL-003](research/QVM_ACCELERATION.md).
|
| 524 |
+
- [ ] RE-432 Recover friction/surrounding velocity policy, native sqrt106 ABI, input/button/meter/coefficient/time producers/legal ranges, real basis/frame/callee/collision effects and complete mode/step gameplay/macOS/Linux validation before Rust/Bevy/Solari claims. Continue packet/entity/player/snapshot/rendering work.
|
docs/research/QVM_ACCELERATION.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Game-QVM command scaling and acceleration
|
| 2 |
+
|
| 3 |
+
RE-429–431 / F-181–183. [qvm-acceleration.json](qvm-acceleration.json) retains complete helper40397/40275 partitions and a selected helper45461 caller slice. Reproduce with `python3 scripts/analyze_qvm_acceleration.py`; verify with `python3 scripts/test_qvm_acceleration.py`.
|
| 4 |
+
|
| 5 |
+
This follows [view and mode position tails](QVM_VIEW_MOTION.md). All results use bounded synthetic instruction evaluation. No complete QVM, original executable, native callee or collision/physics system executes. Square-root returns are supplied from an ordinary finite math model rather than native trap106. Caller compositions use a supplied identity basis and post-friction velocity, evaluated scaling/acceleration slices and an evaluated position tail. Earlier mode effects remain omitted.
|
| 6 |
+
|
| 7 |
+
## ACCEL-001 — Command-scale helper40397 (RE-429)
|
| 8 |
+
|
| 9 |
+
The helper reads three signed command bytes at+21/+22/+23 and computes their maximum absolute component. Zero maximum returns a zero float word without requesting a square root. Nonzero input requests encoded target-107 with the binary32 sum of integer component squares. Its return is supplied by the analysis as rounded binary32 square root.
|
| 10 |
+
|
| 11 |
+
Observed base-speed constants are binary32 words1130102784 (220) and1135214592 (340). The latter is selected only if all predicates hold:
|
| 12 |
+
|
| 13 |
+
- Command buttons+16 include mask256.
|
| 14 |
+
- Signed right byte is zero.
|
| 15 |
+
- Signed forward byte is strictly greater than80.
|
| 16 |
+
- Player-state+184 is strictly greater than10.
|
| 17 |
+
|
| 18 |
+
The returned scale is binary32 `(speed * maximum_abs) / (supplied_length *127)`, with operation-level binary32 rounding. The field+184 and button256 meanings remain producer/consumer tasks; boost/sprint terminology is provisional. The helper uses literal speeds rather than reading the candidate speed word at player-state+52 in this partition.
|
| 19 |
+
|
| 20 |
+
256 probes cover signed endpoints including-128/-127, forward80/81, strafe/vertical combinations, button gating and field values10/11. An independent formula verifies exact float return words and square-root requests, including zero-input bypass. Byte-128 sign-extends to-128 and has magnitude128; normalization uses denominator127. This describes supplied bytes, not verified input-producer limits or legitimate maximum movement speed.
|
| 21 |
+
|
| 22 |
+
## ACCEL-002 — Projection-based helper40275 (RE-430)
|
| 23 |
+
|
| 24 |
+
Arguments are a wish-direction vector, wish speed and acceleration coefficient, supplied through the QVM frame. The helper reads velocity at player-state+32/+36/+40 and fractional timestep at global35023928. Finite observed operations are:
|
| 25 |
+
|
| 26 |
+
1. Compute the rounded dot product of velocity and wish direction.
|
| 27 |
+
2. Compute `gap = wish_speed - projection`.
|
| 28 |
+
3. Return unchanged if gap <=0.
|
| 29 |
+
4. Otherwise compute `amount = acceleration * timestep * wish_speed`, rounding after each multiply, and cap it downward to gap.
|
| 30 |
+
5. Add `amount * direction[i]` to each velocity component, with separate multiply/add rounding.
|
| 31 |
+
|
| 32 |
+
This is a projection-gap acceleration rule, not a total-speed clamp. A velocity whose projection already meets or exceeds the wish speed is retained. Lateral components are not removed by this helper. Unit-vector quality, coefficient/timestep ranges and surrounding friction/collision/speed policy remain open; negative or exceptional legal domains are not established.
|
| 33 |
+
|
| 34 |
+
324 fixtures vary initial velocity, three wish directions, speeds0/100/220, coefficients0/10 and timesteps0/0.016/0.1. Independent dot/gap/amount/vector arithmetic predicts every result word and tests both early-return and capped/uncapped updates. The report records amount only when the update branch executes, avoiding assumptions about uninitialized local data.
|
| 35 |
+
|
| 36 |
+
## ACCEL-003 — Partial caller composition through position (RE-431)
|
| 37 |
+
|
| 38 |
+
The selected helper45461 region45647–45885 requests helper40397 for command scale, builds a wish vector from supplied identity forward/right vectors and signed movement bytes, copies and normalizes it using a supplied square-root return, then multiplies original wish length by the evaluated command scale. It requests helper40275 with normalized direction, wish speed and a supplied coefficient word from global21200.
|
| 39 |
+
|
| 40 |
+
The analysis evaluates helper40275 in a separate synthetic local frame, applies its velocity stores and resumes the caller's unconditional position-update tail. Scale, acceleration and caller frames are explicitly disjoint; no real QVM CALL frames are created or unwound. The scale helper is evaluated against matching separately supplied command/button/meter data, not an executing address-space bridge.
|
| 41 |
+
|
| 42 |
+
48 compositions cover zero, axis, diagonal, signed-128, vertical and strafe commands, both button/field gates, and zero or already-high initial velocities. Source basis, post-friction velocity, coefficient10 and timestep0.016 are supplied. Every scale, normalized direction, wish speed, resulting velocity, position and recorded caller request is independently checked. Zero command can still integrate supplied residual velocity because earlier friction is omitted; this is not a complete mode behavior claim.
|
| 43 |
+
|
| 44 |
+
Actual native square-root implementation/return convention, basis generation, earlier helper45461 friction, other frame fields, collisions, callbacks, complete movement and original-runtime conformance remain open.
|
| 45 |
+
|
| 46 |
+
## Evaluator and validation
|
| 47 |
+
|
| 48 |
+
The shared evaluator adds finite DIVF with explicit zero-divisor/nonfinite rejection, and a configurable synthetic local-frame base whose default remains unchanged. Tests verify that a child frame does not overwrite caller local words. General stack aliasing, exceptional division, floating-control state and actual QVM frame semantics are not recovered by this model.
|
| 49 |
+
|
| 50 |
+
Eight tests verify signed command scale and sqrt requests, strict boost boundaries/strafe exclusion, dot/gap/amount/full velocity, unchanged above-target projections, complete partial caller outputs/requests, source partitions, local-frame isolation and finite division failure domains. Prior report regeneration checks protect shared evaluator users.
|
| 51 |
+
|
| 52 |
+
RE-428 remains open for complete mode/native/runtime work. RE-432 must recover friction and surrounding velocity/speed policy, native sqrt106 ABI/service, field+184/button256 producers and legal movement/coefficient/timestep ranges, real basis/stack/callee/collision effects, complete mode/step composition and gameplay/macOS/Linux validation before Rust/Bevy/Solari compatibility claims. Packet/entity/player/snapshot/rendering milestones remain open.
|
docs/research/QVM_VIEW_MOTION.md
CHANGED
|
@@ -44,3 +44,5 @@ The QVM slice model adds explicit byte-backed STORE2/LOAD2/SEX16 for local halfw
|
|
| 44 |
Eight tests independently verify view gates/clamps/bias/deltas/word-bit truncation, trig request/skip behavior, rounded basis algebra and orthogonality, per-component threshold/unconditional position tails, source/boundary evidence, halfword operations/failure domains and finite arithmetic rejection. Previous report regeneration checks protect shared evaluator users.
|
| 45 |
|
| 46 |
RE-424 remains open for full mode/callee/runtime work. RE-428 must recover native trig services/return ABI and helper50525, compose view updates with real child vectors, trace complete mode friction/acceleration and collision effects, verify field/type/coordinate meanings and angle producer/key domains, characterize alias/exceptional/control-state cases, continue main movement branches and validate full gameplay/macOS/Linux before Rust/Bevy/Solari compatibility claims. Packet/entity/player/snapshot/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
| 44 |
Eight tests independently verify view gates/clamps/bias/deltas/word-bit truncation, trig request/skip behavior, rounded basis algebra and orthogonality, per-component threshold/unconditional position tails, source/boundary evidence, halfword operations/failure domains and finite arithmetic rejection. Previous report regeneration checks protect shared evaluator users.
|
| 45 |
|
| 46 |
RE-424 remains open for full mode/callee/runtime work. RE-428 must recover native trig services/return ABI and helper50525, compose view updates with real child vectors, trace complete mode friction/acceleration and collision effects, verify field/type/coordinate meanings and angle producer/key domains, characterize alias/exceptional/control-state cases, continue main movement branches and validate full gameplay/macOS/Linux before Rust/Bevy/Solari compatibility claims. Packet/entity/player/snapshot/rendering milestones remain open.
|
| 47 |
+
|
| 48 |
+
Follow-up: [command scaling and acceleration](QVM_ACCELERATION.md) recovers two helpers and partially composes them into a mode caller through position integration. Friction, native sqrt, complete basis/callee/collision effects and runtime validation remain open.
|
docs/research/README.md
CHANGED
|
@@ -169,3 +169,5 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 169 |
[QVM child flags, clock and early dispatch](QVM_STEP_STATE.md) adds RE-421–423. Reproduce with `python3 scripts/analyze_qvm_step_state.py`; check with `python3 scripts/test_qvm_step_state.py`. Only the decoded clock prefix is composed into selected schedulers; physics and other child effects remain open.
|
| 170 |
|
| 171 |
[QVM view angles, supplied-trig basis and position tails](QVM_VIEW_MOTION.md) adds RE-425–427. Reproduce with `python3 scripts/analyze_qvm_view_motion.py`; check with `python3 scripts/test_qvm_view_motion.py`. Trig returns and post-acceleration vectors are supplied; full mode/native/runtime effects remain open.
|
|
|
|
|
|
|
|
|
| 169 |
[QVM child flags, clock and early dispatch](QVM_STEP_STATE.md) adds RE-421–423. Reproduce with `python3 scripts/analyze_qvm_step_state.py`; check with `python3 scripts/test_qvm_step_state.py`. Only the decoded clock prefix is composed into selected schedulers; physics and other child effects remain open.
|
| 170 |
|
| 171 |
[QVM view angles, supplied-trig basis and position tails](QVM_VIEW_MOTION.md) adds RE-425–427. Reproduce with `python3 scripts/analyze_qvm_view_motion.py`; check with `python3 scripts/test_qvm_view_motion.py`. Trig returns and post-acceleration vectors are supplied; full mode/native/runtime effects remain open.
|
| 172 |
+
|
| 173 |
+
[QVM command scaling and acceleration](QVM_ACCELERATION.md) adds RE-429–431. Reproduce with `python3 scripts/analyze_qvm_acceleration.py`; check with `python3 scripts/test_qvm_acceleration.py`. Sqrt, basis and post-friction inputs are supplied; complete mode/native/runtime effects remain open.
|
docs/research/qvm-acceleration.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_deferred_auth.py
CHANGED
|
@@ -17,7 +17,7 @@ def signed32(value):
|
|
| 17 |
|
| 18 |
|
| 19 |
def trace_slice(instructions, start, stop, memory, locals_map, limit=256, byte_memory=None, capture_stack=False,
|
| 20 |
-
halt_on_leave=False, stop_targets=(), call_results=None, resume_at=None):
|
| 21 |
"""Evaluate only a selected straight/bounded slice against synthetic memory.
|
| 22 |
|
| 23 |
Record calls rather than entering callees. Reject unknown reads/opcodes and
|
|
@@ -28,7 +28,6 @@ def trace_slice(instructions, start, stop, memory, locals_map, limit=256, byte_m
|
|
| 28 |
stack, args, calls, trace, byte_writes = [], {}, [], [], []
|
| 29 |
memory = dict(memory)
|
| 30 |
bytes_map = None if byte_memory is None else dict(byte_memory)
|
| 31 |
-
local_base = 0x40000000
|
| 32 |
for offset, value in locals_map.items():
|
| 33 |
memory[local_base+offset] = value
|
| 34 |
pc = start if resume_at is None else resume_at
|
|
@@ -80,14 +79,16 @@ def trace_slice(instructions, start, stop, memory, locals_map, limit=256, byte_m
|
|
| 80 |
elif op in ('BAND', 'BOR'):
|
| 81 |
right, left = stack.pop(), stack.pop()
|
| 82 |
stack.append(signed32(left & right if op == 'BAND' else left | right))
|
| 83 |
-
elif op in ('MULF', 'ADDF', 'SUBF'):
|
| 84 |
right, left = stack.pop(), stack.pop()
|
| 85 |
a, b = [struct.unpack('<f', struct.pack('<I', v & 0xffffffff))[0] for v in (left, right)]
|
| 86 |
-
label = {'MULF':'multiply', 'ADDF':'add', 'SUBF':'subtract'}[op]
|
| 87 |
if not math.isfinite(a) or not math.isfinite(b):
|
| 88 |
raise ValueError('nonfinite bounded float '+label)
|
|
|
|
|
|
|
| 89 |
try:
|
| 90 |
-
result = struct.pack('<f', a*b if op == 'MULF' else a+b if op == 'ADDF' else a-b)
|
| 91 |
except OverflowError as exc:
|
| 92 |
raise ValueError('overflow bounded float '+label) from exc
|
| 93 |
if not math.isfinite(struct.unpack('<f', result)[0]):
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
def trace_slice(instructions, start, stop, memory, locals_map, limit=256, byte_memory=None, capture_stack=False,
|
| 20 |
+
halt_on_leave=False, stop_targets=(), call_results=None, resume_at=None, local_base=0x40000000):
|
| 21 |
"""Evaluate only a selected straight/bounded slice against synthetic memory.
|
| 22 |
|
| 23 |
Record calls rather than entering callees. Reject unknown reads/opcodes and
|
|
|
|
| 28 |
stack, args, calls, trace, byte_writes = [], {}, [], [], []
|
| 29 |
memory = dict(memory)
|
| 30 |
bytes_map = None if byte_memory is None else dict(byte_memory)
|
|
|
|
| 31 |
for offset, value in locals_map.items():
|
| 32 |
memory[local_base+offset] = value
|
| 33 |
pc = start if resume_at is None else resume_at
|
|
|
|
| 79 |
elif op in ('BAND', 'BOR'):
|
| 80 |
right, left = stack.pop(), stack.pop()
|
| 81 |
stack.append(signed32(left & right if op == 'BAND' else left | right))
|
| 82 |
+
elif op in ('MULF', 'ADDF', 'SUBF', 'DIVF'):
|
| 83 |
right, left = stack.pop(), stack.pop()
|
| 84 |
a, b = [struct.unpack('<f', struct.pack('<I', v & 0xffffffff))[0] for v in (left, right)]
|
| 85 |
+
label = {'MULF':'multiply', 'ADDF':'add', 'SUBF':'subtract', 'DIVF':'divide'}[op]
|
| 86 |
if not math.isfinite(a) or not math.isfinite(b):
|
| 87 |
raise ValueError('nonfinite bounded float '+label)
|
| 88 |
+
if op == 'DIVF' and b == 0:
|
| 89 |
+
raise ValueError('zero bounded float divisor')
|
| 90 |
try:
|
| 91 |
+
result = struct.pack('<f', a*b if op == 'MULF' else a+b if op == 'ADDF' else a-b if op == 'SUBF' else a/b)
|
| 92 |
except OverflowError as exc:
|
| 93 |
raise ValueError('overflow bounded float '+label) from exc
|
| 94 |
if not math.isfinite(struct.unpack('<f', result)[0]):
|
scripts/analyze_qvm_acceleration.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Bounded command scaling, acceleration and partial mode composition."""
|
| 3 |
+
import itertools
|
| 4 |
+
import json
|
| 5 |
+
import math
|
| 6 |
+
import struct
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
from analyze_bsp_references import trace_fields
|
| 9 |
+
from analyze_deferred_auth import trace_slice
|
| 10 |
+
from analyze_qvm import decode,write_json
|
| 11 |
+
from analyze_vm_extensions import verified
|
| 12 |
+
|
| 13 |
+
PS=0x10000
|
| 14 |
+
CMD=0x20000
|
| 15 |
+
FRAME=0x30000
|
| 16 |
+
WISH=0x50000
|
| 17 |
+
CALLER=0x40000000
|
| 18 |
+
ACCEL_FRAME=0x41000000
|
| 19 |
+
SCALE_FRAME=0x42000000
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def word(v):return struct.unpack('<I',struct.pack('<f',v))[0]
|
| 23 |
+
def number(v):return struct.unpack('<f',struct.pack('<I',v&0xffffffff))[0]
|
| 24 |
+
def f(v):return number(word(v))
|
| 25 |
+
def s8(v):return v if v<128 else v-256
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def scale_probe(ins,forward,right,up,buttons,meter):
|
| 29 |
+
movement=[forward&255,right&255,up&255];norm=math.sqrt(sum(s8(v)**2 for v in movement));sqrtword=word(norm);m={35024032:FRAME,FRAME:PS,PS+184:meter,CMD+16:buttons};b={CMD+21+i:v for i,v in enumerate(movement)};t=trace_slice(ins,40398,40677,m,{60:CMD},byte_memory=b,call_results={40655:sqrtword},halt_on_leave=True,capture_stack=True,local_base=SCALE_FRAME,limit=512)
|
| 30 |
+
return {'movement_bytes':movement,'buttons_word':buttons,'meter_word':meter,'supplied_sqrt_word':sqrtword,'result_scale_float_word':t['stack'][-1]&0xffffffff,'calls':t['calls'],**trace_fields(t,False)}
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def accel(ins,m,direction,speed,acceleration,dt):
|
| 34 |
+
m=dict(m);m[35024032]=FRAME;m[FRAME]=PS;m[35023928]=word(dt)
|
| 35 |
+
for i,v in enumerate(direction):m[WISH+4*i]=word(v)
|
| 36 |
+
t=trace_slice(ins,40276,40395,m,{48:WISH,52:word(speed),56:word(acceleration)},local_base=ACCEL_FRAME,limit=512);mem=t['memory'];return mem,{'direction_float_words':[word(v) for v in direction],'wish_speed_float_word':word(speed),'acceleration_float_word':word(acceleration),'dt_float_word':word(dt),'projection_float_word':mem[ACCEL_FRAME+20]&0xffffffff,'gap_float_word':mem[ACCEL_FRAME+16]&0xffffffff,'amount_float_word':mem[ACCEL_FRAME+12]&0xffffffff if 40333 in t['trace'] else None,'result_velocity_float_words':[mem[PS+32+i*4]&0xffffffff for i in range(3)],**trace_fields(t,False)}
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def accel_probe(ins,velocity,direction,speed,acceleration,dt):
|
| 40 |
+
m={PS+32+i*4:word(v) for i,v in enumerate(velocity)};_,p=accel(ins,m,direction,speed,acceleration,dt);p['initial_velocity_float_words']=[word(v) for v in velocity];return p
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def composed_probe(ins,cmd,buttons,meter,velocity):
|
| 44 |
+
sp=scale_probe(ins,*cmd,buttons,meter);m={35024032:FRAME,FRAME:PS,21200:word(10)};b={FRAME+25+i:v&255 for i,v in enumerate(cmd)}
|
| 45 |
+
for i,v in enumerate([1,0,0]):m[35023892+i*4]=word(v)
|
| 46 |
+
for i,v in enumerate([0,1,0]):m[35023904+i*4]=word(v)
|
| 47 |
+
root=word(math.sqrt(sum(v*v for v in cmd)));t=trace_slice(ins,45647,45813,m,{},byte_memory=b,call_results={45654:sp['result_scale_float_word'],45758:root},local_base=CALLER,limit=512);m=t['memory'];request=t['calls'][-1]
|
| 48 |
+
if request['target']!=40275:raise ValueError('acceleration request')
|
| 49 |
+
direction=[number(m[request['args'][8]+4*i]) for i in range(3)];speed=number(request['args'][12]);coefficient=number(request['args'][16])
|
| 50 |
+
for i,v in enumerate(velocity):m[PS+32+4*i]=word(v)
|
| 51 |
+
m,ap=accel(ins,m,direction,speed,coefficient,.016)
|
| 52 |
+
for i,v in enumerate([10,20,30]):m[PS+20+4*i]=word(v)
|
| 53 |
+
tail=trace_slice(ins,45813,45885,m,{},local_base=CALLER,limit=512)
|
| 54 |
+
return {'commands':cmd,'buttons_word':buttons,'meter_word':meter,'initial_velocity_float_words':[word(v) for v in velocity],'scale_probe':sp,'supplied_wish_sqrt_word':root,'caller_requests':t['calls'],'acceleration_probe':ap,'origin_float_words':[tail['memory'][PS+20+4*i]&0xffffffff for i in range(3)],**trace_fields({'trace':t['trace']+tail['trace']},False)}
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def main():
|
| 58 |
+
r=json.loads(Path('docs/research/qvm/qagame.json').read_text());data=verified(Path(r['source']['member']['output']).read_bytes(),r['sha256']);_,ins=decode(data);scales=[scale_probe(ins,*v) for v in itertools.product([-128,-127,-1,0,1,80,81,127],[0,1,-1,127],[0,1],[0,256],[10,11])];accelerations=[accel_probe(ins,*v) for v in itertools.product([(0,0,0),(50,0,0),(100,0,0),(200,0,0),(-50,0,0),(1,2,3)],[(1,0,0),(0,1,0),(.6,.8,0)],[0,100,220],[0,10],[0,.016,.1])];compositions=[composed_probe(ins,*v) for v in itertools.product([(0,0,0),(127,0,0),(127,127,0),(-128,0,0),(81,0,1),(81,1,0)],[0,256],[10,11],[(0,0,0),(300,0,0)])];out={'source':r['source'],'sha256':r['sha256'],'scale_instructions':ins[40397:40679],'acceleration_instructions':ins[40275:40397],'caller_instructions':ins[45647:45887],'scale_probes':scales,'acceleration_probes':accelerations,'composed_probes':compositions,'limitations':'Synthetic bounded shipped-QVM instruction slices only; no complete QVM/original runtime/native callee/collision/physics system executes. Sqrt results supplied from ordinary-math finite model, not native trap106. Partial caller uses supplied identity forward/right basis and post-friction velocity, evaluated command-scale and acceleration helper slices, explicit disjoint synthetic local frames and evaluated position tail. Earlier friction/speed/collision/other caller effects omitted. Finite nonzero-divisor model only; semantic button/meter/type meanings, legal input ranges, alias/control-state/runtime/platform conformance remain open.'};write_json(Path('docs/research/qvm-acceleration.json'),out);print('Recovered bounded command scale acceleration and partial caller composition')
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_acceleration.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Independent signed-command scaling and projection/acceleration oracles."""
|
| 3 |
+
import hashlib
|
| 4 |
+
import json
|
| 5 |
+
import math
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
import struct
|
| 8 |
+
import unittest
|
| 9 |
+
from analyze_deferred_auth import trace_slice
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def word(v):return struct.unpack('<I',struct.pack('<f',v))[0]
|
| 13 |
+
def n(v):return struct.unpack('<f',struct.pack('<I',v&0xffffffff))[0]
|
| 14 |
+
def f(v):return n(word(v))
|
| 15 |
+
def m(a,b):return f(a*b)
|
| 16 |
+
def add(a,b):return f(a+b)
|
| 17 |
+
def s8(v):return v if v<128 else v-256
|
| 18 |
+
|
| 19 |
+
def scale_oracle(p):
|
| 20 |
+
axes=list(map(s8,p['movement_bytes']));maximum=max(map(abs,axes))
|
| 21 |
+
if not maximum:return 0
|
| 22 |
+
speed=340 if p['buttons_word']&256 and axes[1]==0 and axes[0]>80 and p['meter_word']>10 else 220;return word(f(m(speed,maximum)/m(n(p['supplied_sqrt_word']),127)))
|
| 23 |
+
|
| 24 |
+
def accel_oracle(p,velocity):
|
| 25 |
+
v=list(map(n,velocity));d=list(map(n,p['direction_float_words']));speed=n(p['wish_speed_float_word']);projection=add(add(m(v[0],d[0]),m(v[1],d[1])),m(v[2],d[2]));gap=f(speed-projection);amount=min(m(m(n(p['acceleration_float_word']),n(p['dt_float_word'])),speed),gap) if gap>0 else None;result=[word(add(x,m(amount,y))) for x,y in zip(v,d)] if amount is not None else velocity;return word(projection),word(gap),None if amount is None else word(amount),result
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class QvmAccelerationTests(unittest.TestCase):
|
| 29 |
+
@classmethod
|
| 30 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-acceleration.json').read_text())
|
| 31 |
+
|
| 32 |
+
def test_signed_command_scale_zero_norm_and_sqrt_request(self):
|
| 33 |
+
self.assertEqual(len(self.r['scale_probes']),256)
|
| 34 |
+
for p in self.r['scale_probes']:
|
| 35 |
+
axes=list(map(s8,p['movement_bytes']));self.assertEqual(p['result_scale_float_word'],scale_oracle(p));self.assertEqual(p['supplied_sqrt_word'],word(math.sqrt(sum(v*v for v in axes))));expected=[] if not any(axes) else [{'instruction':40655,'target':-107,'args':{'8':word(sum(v*v for v in axes))}}];self.assertEqual(p['calls'],expected)
|
| 36 |
+
|
| 37 |
+
def test_boost_strict_thresholds_strafe_and_negative_endpoint(self):
|
| 38 |
+
rows=self.r['scale_probes']
|
| 39 |
+
for forward,meter,expected_speed in [(80,11,220),(81,10,220),(81,11,340),(-128,11,220)]:
|
| 40 |
+
p=next(x for x in rows if list(map(s8,x['movement_bytes']))==[forward,0,0] and x['buttons_word']==256 and x['meter_word']==meter);self.assertAlmostEqual(n(p['result_scale_float_word']),expected_speed/127,places=5)
|
| 41 |
+
p=next(x for x in rows if list(map(s8,x['movement_bytes']))==[81,1,0] and x['buttons_word']==256 and x['meter_word']==11);self.assertEqual(p['result_scale_float_word'],scale_oracle(p))
|
| 42 |
+
|
| 43 |
+
def test_projection_gap_amount_and_complete_velocity(self):
|
| 44 |
+
self.assertEqual(len(self.r['acceleration_probes']),324)
|
| 45 |
+
for p in self.r['acceleration_probes']:
|
| 46 |
+
projection,gap,amount,result=accel_oracle(p,p['initial_velocity_float_words']);self.assertEqual(p['projection_float_word'],projection);self.assertEqual(p['gap_float_word'],gap);self.assertEqual(p['amount_float_word'],amount);self.assertEqual(p['result_velocity_float_words'],result)
|
| 47 |
+
|
| 48 |
+
def test_above_target_projection_retains_velocity_instead_of_speed_clamp(self):
|
| 49 |
+
rows=[p for p in self.r['acceleration_probes'] if n(p['projection_float_word'])>=n(p['wish_speed_float_word'])];self.assertTrue(rows)
|
| 50 |
+
for p in rows:self.assertIsNone(p['amount_float_word']);self.assertEqual(p['result_velocity_float_words'],p['initial_velocity_float_words'])
|
| 51 |
+
|
| 52 |
+
def test_partial_caller_composes_scale_normalization_acceleration_and_position(self):
|
| 53 |
+
self.assertEqual(len(self.r['composed_probes']),48)
|
| 54 |
+
for p in self.r['composed_probes']:
|
| 55 |
+
self.assertEqual(p['scale_probe']['result_scale_float_word'],scale_oracle(p['scale_probe']));length=n(p['supplied_wish_sqrt_word']);self.assertEqual(p['supplied_wish_sqrt_word'],word(math.sqrt(sum(v*v for v in p['commands']))));direction=[word(m(v,f(1/length))) if length else word(v) for v in p['commands']];ap=p['acceleration_probe'];self.assertEqual(ap['direction_float_words'],direction);self.assertEqual(ap['wish_speed_float_word'],word(m(length,n(p['scale_probe']['result_scale_float_word']))));self.assertEqual(ap['result_velocity_float_words'],accel_oracle(ap,p['initial_velocity_float_words'])[3]);vel=list(map(n,ap['result_velocity_float_words']));self.assertEqual(p['origin_float_words'],[word(add(pos,m(v,n(ap['dt_float_word'])))) for pos,v in zip([10,20,30],vel)]);self.assertEqual([c['target'] for c in p['caller_requests']],[40397,-107,40275]);self.assertEqual(p['caller_requests'][0]['args'],{'8':0x30004});self.assertEqual(p['caller_requests'][-1]['args']['8'],0x40000014)
|
| 56 |
+
|
| 57 |
+
def test_source_and_complete_helper_partitions(self):
|
| 58 |
+
r=json.loads(Path('docs/research/qvm/qagame.json').read_text());raw=Path(r['source']['member']['output']).read_bytes();self.assertEqual(hashlib.sha256(raw).hexdigest(),self.r['sha256']);self.assertEqual(r['source'],self.r['source']);self.assertEqual(self.r['scale_instructions'][0]['index'],40397);self.assertEqual(self.r['scale_instructions'][-1]['index'],40678);self.assertEqual(self.r['acceleration_instructions'][-1]['index'],40396)
|
| 59 |
+
|
| 60 |
+
def test_disjoint_local_frame_preserves_caller_words(self):
|
| 61 |
+
rows=[{'index':0,'opcode':'LOCAL','operand':8},{'index':1,'opcode':'CONST','operand':7},{'index':2,'opcode':'STORE4','operand':None}];t=trace_slice(rows,0,3,{0x40000008:99},{},local_base=0x41000000);self.assertEqual(t['memory'][0x41000008],7);self.assertEqual(t['memory'][0x40000008],99)
|
| 62 |
+
|
| 63 |
+
def test_finite_division_rejects_zero_and_nonfinite(self):
|
| 64 |
+
rows=[{'index':0,'opcode':'CONST','operand':word(3)},{'index':1,'opcode':'CONST','operand':word(2)},{'index':2,'opcode':'DIVF','operand':None}];self.assertEqual(trace_slice(rows,0,3,{}, {},capture_stack=True)['stack'][0]&0xffffffff,word(1.5));rows[1]['operand']=0
|
| 65 |
+
with self.assertRaisesRegex(ValueError,'zero bounded float divisor'):trace_slice(rows,0,3,{}, {})
|
| 66 |
+
rows[1]['operand']=0x7f800000
|
| 67 |
+
with self.assertRaisesRegex(ValueError,'nonfinite bounded float divide'):trace_slice(rows,0,3,{}, {})
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
if __name__=='__main__':unittest.main()
|