nmarshall commited on
Commit
4a7e291
·
1 Parent(s): e543c57

gameplay: port persistence numeric scanning

Browse files
crates/urt-gameplay/src/bin/urt-native-policy.rs CHANGED
@@ -357,6 +357,32 @@ fn run() -> Result<String, String> {
357
  hex(&out.value)
358
  ))
359
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  _ => Err("unknown command".into()),
361
  }
362
  }
 
357
  hex(&out.value)
358
  ))
359
  }
360
+ "scan" => {
361
+ if w.len() < 3 {
362
+ return Err("missing scanner header".into());
363
+ }
364
+ let kind = if w[0] == 0 {
365
+ NumericKind::Integer
366
+ } else {
367
+ NumericKind::Float
368
+ };
369
+ let n = w[1] as usize;
370
+ if n > 9 {
371
+ return Err("invalid scanner count".into());
372
+ }
373
+ let mut p = 2;
374
+ let text = input_blob(&w, &mut p)?.ok_or("null scan text")?;
375
+ if p != w.len() {
376
+ return Err("trailing scanner words".into());
377
+ }
378
+ let out =
379
+ scan_numeric(&text, kind, &vec![0xaabbccdd; n]).map_err(|e| format!("{e:?}"))?;
380
+ Ok(format!(
381
+ "{{\"result\":{},\"words\":{}}}",
382
+ out.result,
383
+ list(&out.words)
384
+ ))
385
+ }
386
  _ => Err("unknown command".into()),
387
  }
388
  }
crates/urt-gameplay/src/native_policy.rs CHANGED
@@ -764,3 +764,128 @@ mod info_tests {
764
  assert_eq!(r, 1);
765
  }
766
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
764
  assert_eq!(r, 1);
765
  }
766
  }
767
+
768
+ #[derive(Clone, Copy, Debug, PartialEq, Eq)]
769
+ pub enum NumericKind {
770
+ Integer,
771
+ Float,
772
+ }
773
+ #[derive(Clone, Debug, PartialEq, Eq)]
774
+ pub struct NumericScan {
775
+ pub result: i32,
776
+ pub words: Vec<u32>,
777
+ }
778
+ /// Recovered comma-separated %i/%f subset. Integer signs are not consumed.
779
+ /// Destinations are written even without an assignment; a literal mismatch
780
+ /// returns-1 and preserves remaining caller-supplied destination words.
781
+ pub fn scan_numeric(text: &[u8], kind: NumericKind, initial: &[u32]) -> Result<NumericScan, Error> {
782
+ let text = text.split(|v| *v == 0).next().unwrap_or_default();
783
+ if initial.is_empty()
784
+ || initial.len() > 9
785
+ || text.len() > 4096
786
+ || !text.is_ascii()
787
+ || kind == NumericKind::Float && text.contains(&b'E')
788
+ {
789
+ return Err(Error::InvalidInput);
790
+ }
791
+ let mut p = 0;
792
+ let mut assigned = 0;
793
+ let mut words = initial.to_vec();
794
+ for j in 0..words.len() {
795
+ let start = p;
796
+ let value;
797
+ match kind {
798
+ NumericKind::Integer => {
799
+ let mut x = 0u32;
800
+ while p < text.len() && text[p].is_ascii_digit() {
801
+ x = x.wrapping_mul(10).wrapping_add((text[p] - b'0') as u32);
802
+ p += 1;
803
+ }
804
+ value = x;
805
+ }
806
+ NumericKind::Float => {
807
+ while p < text.len() && text[p] <= 32 {
808
+ p += 1;
809
+ }
810
+ if p == text.len() {
811
+ p = start;
812
+ value = 0;
813
+ } else {
814
+ let sign = if text[p] == b'-' { -1.0 } else { 1.0 };
815
+ if matches!(text[p], b'+' | b'-') {
816
+ p += 1;
817
+ }
818
+ let mut x = 0f32;
819
+ while p < text.len() && text[p].is_ascii_digit() {
820
+ let scaled = x * 10.0;
821
+ x = scaled + (text[p] - b'0') as f32;
822
+ p += 1;
823
+ }
824
+ if p < text.len() && text[p] == b'.' {
825
+ p += 1;
826
+ let mut scale = 0.1f32;
827
+ while p < text.len() && text[p].is_ascii_digit() {
828
+ let fraction = (text[p] - b'0') as f32 * scale;
829
+ x += fraction;
830
+ scale *= 0.1;
831
+ p += 1;
832
+ }
833
+ }
834
+ let x = x * sign;
835
+ if !x.is_finite() {
836
+ return Err(Error::NonFinite);
837
+ }
838
+ value = x.to_bits();
839
+ }
840
+ }
841
+ }
842
+ words[j] = value;
843
+ if p > start {
844
+ assigned += 1;
845
+ }
846
+ if j + 1 < words.len() {
847
+ if p >= text.len() || text[p] != b',' {
848
+ return Ok(NumericScan { result: -1, words });
849
+ }
850
+ p += 1;
851
+ }
852
+ }
853
+ Ok(NumericScan {
854
+ result: assigned,
855
+ words,
856
+ })
857
+ }
858
+ #[cfg(test)]
859
+ mod scan_tests {
860
+ use super::*;
861
+ #[test]
862
+ fn signs_fail_integer_and_preserve_later_words() {
863
+ assert_eq!(
864
+ scan_numeric(b"-7,2", NumericKind::Integer, &[99, 88]).unwrap(),
865
+ NumericScan {
866
+ result: -1,
867
+ words: vec![0, 88]
868
+ }
869
+ );
870
+ assert_eq!(
871
+ scan_numeric(b"", NumericKind::Integer, &[99]).unwrap(),
872
+ NumericScan {
873
+ result: 0,
874
+ words: vec![0]
875
+ }
876
+ );
877
+ }
878
+ #[test]
879
+ fn staged_floats_and_unsupported_exponent() {
880
+ assert_eq!(
881
+ scan_numeric(b"-0.5,1.25", NumericKind::Float, &[99; 2])
882
+ .unwrap()
883
+ .words,
884
+ [(-0.5f32).to_bits(), 1.25f32.to_bits()]
885
+ );
886
+ assert_eq!(
887
+ scan_numeric(b"1E2", NumericKind::Float, &[0]),
888
+ Err(Error::InvalidInput)
889
+ );
890
+ }
891
+ }
docs/FINDINGS.md CHANGED
@@ -1688,3 +1688,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1688
 
1689
 
1690
  **RE-896:** 72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. [Evidence](research/QVM_NUMERIC_SCAN.md).
 
 
 
 
1688
 
1689
 
1690
  **RE-896:** 72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. [Evidence](research/QVM_NUMERIC_SCAN.md).
1691
+
1692
+
1693
+ **RE-897:** Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open. [Evidence](research/RUST_NUMERIC_SCAN.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1722,3 +1722,6 @@ RE-895: Rust matches96 original70503 key/value and selector cases, preserving fi
1722
 
1723
 
1724
  RE-896: 72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. Full runtime completion remains open. [Evidence](research/QVM_NUMERIC_SCAN.md).
 
 
 
 
1722
 
1723
 
1724
  RE-896: 72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. Full runtime completion remains open. [Evidence](research/QVM_NUMERIC_SCAN.md).
1725
+
1726
+
1727
+ RE-897: Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open. Full runtime completion remains open. [Evidence](research/RUST_NUMERIC_SCAN.md).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2195,3 +2195,8 @@ Rust matches96 original70503 key/value and selector cases, preserving first-matc
2195
  ## 2026-10-28 — RE-896 Original integer and float comma scanner
2196
 
2197
  72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. Focused `cargo xtask test-group qvm-numeric-scan` passes (4 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
 
 
 
 
 
 
2195
  ## 2026-10-28 — RE-896 Original integer and float comma scanner
2196
 
2197
  72 actual38326/38355/37159/36779 cases recover comma-template numeric scanning with partial writes. Integer conversions accept leading digits only, including wrapping overflow; signs/leading spaces write0 without assignment. Floats use staged f32 accumulation, sign/whitespace and decimal scaling; lowercase e terminates the number. Literal mismatch returns-1 even after assignments. Empty/unparsed final fields still write0. Uppercase exponent, other scanf conversions and unsafe destinations remain open. Focused `cargo xtask test-group qvm-numeric-scan` passes (4 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
2198
+
2199
+
2200
+ ## 2026-10-28 — RE-897 Rust original comma numeric scanner
2201
+
2202
+ Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open. Focused `cargo xtask test-group rust-numeric-scan` passes (9 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1759,3 +1759,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1759
 
1760
 
1761
  - [x] RE-896 Original integer and float comma scanner ([evidence](research/QVM_NUMERIC_SCAN.md)).
 
 
 
 
1759
 
1760
 
1761
  - [x] RE-896 Original integer and float comma scanner ([evidence](research/QVM_NUMERIC_SCAN.md)).
1762
+
1763
+
1764
+ - [x] RE-897 Rust original comma numeric scanner ([evidence](research/RUST_NUMERIC_SCAN.md)).
docs/research/README.md CHANGED
@@ -1294,3 +1294,6 @@ The extension collector adds five focused tests for native tail calls, command-r
1294
 
1295
 
1296
  [RE-896: Original integer and float comma scanner](QVM_NUMERIC_SCAN.md).
 
 
 
 
1294
 
1295
 
1296
  [RE-896: Original integer and float comma scanner](QVM_NUMERIC_SCAN.md).
1297
+
1298
+
1299
+ [RE-897: Rust original comma numeric scanner](RUST_NUMERIC_SCAN.md).
docs/research/RUST_NUMERIC_SCAN.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Rust original comma numeric scanner
2
+
3
+ RE-897. Reproduce with `python3 scripts/analyze_rust_numeric_scan.py`; focused validation: `cargo xtask test-group rust-numeric-scan`. [Machine report](rust-numeric-scan.json).
4
+
5
+ Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open.
6
+
7
+ Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
docs/research/rust-health-impulse.json CHANGED
@@ -2985,7 +2985,7 @@
2985
  "exit_code": 2
2986
  }
2987
  ],
2988
- "rust_unit_tests": 150,
2989
  "source_report": "docs/research/qvm-health-impulse.json",
2990
  "source_report_sha256": "625fd8064004ea6dbdf398d51d0af844d9c635ff04c0a0790886dddb6ab81e71"
2991
  }
 
2985
  "exit_code": 2
2986
  }
2987
  ],
2988
+ "rust_unit_tests": 152,
2989
  "source_report": "docs/research/qvm-health-impulse.json",
2990
  "source_report_sha256": "625fd8064004ea6dbdf398d51d0af844d9c635ff04c0a0790886dddb6ab81e71"
2991
  }
docs/research/rust-numeric-scan.json ADDED
@@ -0,0 +1,1351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open.",
3
+ "probes": [
4
+ {
5
+ "rust": {
6
+ "result": 0,
7
+ "words": [
8
+ 0
9
+ ]
10
+ },
11
+ "source": {
12
+ "result": 0,
13
+ "words": [
14
+ 0
15
+ ]
16
+ }
17
+ },
18
+ {
19
+ "rust": {
20
+ "result": 1,
21
+ "words": [
22
+ 1
23
+ ]
24
+ },
25
+ "source": {
26
+ "result": 1,
27
+ "words": [
28
+ 1
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "rust": {
34
+ "result": 0,
35
+ "words": [
36
+ 0
37
+ ]
38
+ },
39
+ "source": {
40
+ "result": 0,
41
+ "words": [
42
+ 0
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "rust": {
48
+ "result": 1,
49
+ "words": [
50
+ 1
51
+ ]
52
+ },
53
+ "source": {
54
+ "result": 1,
55
+ "words": [
56
+ 1
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "rust": {
62
+ "result": 1,
63
+ "words": [
64
+ 1
65
+ ]
66
+ },
67
+ "source": {
68
+ "result": 1,
69
+ "words": [
70
+ 1
71
+ ]
72
+ }
73
+ },
74
+ {
75
+ "rust": {
76
+ "result": 0,
77
+ "words": [
78
+ 0
79
+ ]
80
+ },
81
+ "source": {
82
+ "result": 0,
83
+ "words": [
84
+ 0
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "rust": {
90
+ "result": 1,
91
+ "words": [
92
+ 1
93
+ ]
94
+ },
95
+ "source": {
96
+ "result": 1,
97
+ "words": [
98
+ 1
99
+ ]
100
+ }
101
+ },
102
+ {
103
+ "rust": {
104
+ "result": 1,
105
+ "words": [
106
+ 2147483648
107
+ ]
108
+ },
109
+ "source": {
110
+ "result": 1,
111
+ "words": [
112
+ 2147483648
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ "rust": {
118
+ "result": 1,
119
+ "words": [
120
+ 0
121
+ ]
122
+ },
123
+ "source": {
124
+ "result": 1,
125
+ "words": [
126
+ 0
127
+ ]
128
+ }
129
+ },
130
+ {
131
+ "rust": {
132
+ "result": 0,
133
+ "words": [
134
+ 0
135
+ ]
136
+ },
137
+ "source": {
138
+ "result": 0,
139
+ "words": [
140
+ 0
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "rust": {
146
+ "result": 1,
147
+ "words": [
148
+ 7
149
+ ]
150
+ },
151
+ "source": {
152
+ "result": 1,
153
+ "words": [
154
+ 7
155
+ ]
156
+ }
157
+ },
158
+ {
159
+ "rust": {
160
+ "result": 0,
161
+ "words": [
162
+ 0
163
+ ]
164
+ },
165
+ "source": {
166
+ "result": 0,
167
+ "words": [
168
+ 0
169
+ ]
170
+ }
171
+ },
172
+ {
173
+ "rust": {
174
+ "result": -1,
175
+ "words": [
176
+ 0,
177
+ 2864434397,
178
+ 2864434397
179
+ ]
180
+ },
181
+ "source": {
182
+ "result": -1,
183
+ "words": [
184
+ 0,
185
+ 2864434397,
186
+ 2864434397
187
+ ]
188
+ }
189
+ },
190
+ {
191
+ "rust": {
192
+ "result": 3,
193
+ "words": [
194
+ 1,
195
+ 2,
196
+ 3
197
+ ]
198
+ },
199
+ "source": {
200
+ "result": 3,
201
+ "words": [
202
+ 1,
203
+ 2,
204
+ 3
205
+ ]
206
+ }
207
+ },
208
+ {
209
+ "rust": {
210
+ "result": -1,
211
+ "words": [
212
+ 0,
213
+ 2864434397,
214
+ 2864434397
215
+ ]
216
+ },
217
+ "source": {
218
+ "result": -1,
219
+ "words": [
220
+ 0,
221
+ 2864434397,
222
+ 2864434397
223
+ ]
224
+ }
225
+ },
226
+ {
227
+ "rust": {
228
+ "result": -1,
229
+ "words": [
230
+ 1,
231
+ 2864434397,
232
+ 2864434397
233
+ ]
234
+ },
235
+ "source": {
236
+ "result": -1,
237
+ "words": [
238
+ 1,
239
+ 2864434397,
240
+ 2864434397
241
+ ]
242
+ }
243
+ },
244
+ {
245
+ "rust": {
246
+ "result": -1,
247
+ "words": [
248
+ 1,
249
+ 0,
250
+ 2864434397
251
+ ]
252
+ },
253
+ "source": {
254
+ "result": -1,
255
+ "words": [
256
+ 1,
257
+ 0,
258
+ 2864434397
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ "rust": {
264
+ "result": -1,
265
+ "words": [
266
+ 0,
267
+ 2864434397,
268
+ 2864434397
269
+ ]
270
+ },
271
+ "source": {
272
+ "result": -1,
273
+ "words": [
274
+ 0,
275
+ 2864434397,
276
+ 2864434397
277
+ ]
278
+ }
279
+ },
280
+ {
281
+ "rust": {
282
+ "result": 3,
283
+ "words": [
284
+ 1,
285
+ 2,
286
+ 3
287
+ ]
288
+ },
289
+ "source": {
290
+ "result": 3,
291
+ "words": [
292
+ 1,
293
+ 2,
294
+ 3
295
+ ]
296
+ }
297
+ },
298
+ {
299
+ "rust": {
300
+ "result": 3,
301
+ "words": [
302
+ 2147483648,
303
+ 2,
304
+ 3
305
+ ]
306
+ },
307
+ "source": {
308
+ "result": 3,
309
+ "words": [
310
+ 2147483648,
311
+ 2,
312
+ 3
313
+ ]
314
+ }
315
+ },
316
+ {
317
+ "rust": {
318
+ "result": 3,
319
+ "words": [
320
+ 0,
321
+ 0,
322
+ 0
323
+ ]
324
+ },
325
+ "source": {
326
+ "result": 3,
327
+ "words": [
328
+ 0,
329
+ 0,
330
+ 0
331
+ ]
332
+ }
333
+ },
334
+ {
335
+ "rust": {
336
+ "result": -1,
337
+ "words": [
338
+ 0,
339
+ 2864434397,
340
+ 2864434397
341
+ ]
342
+ },
343
+ "source": {
344
+ "result": -1,
345
+ "words": [
346
+ 0,
347
+ 2864434397,
348
+ 2864434397
349
+ ]
350
+ }
351
+ },
352
+ {
353
+ "rust": {
354
+ "result": -1,
355
+ "words": [
356
+ 7,
357
+ 8,
358
+ 2864434397
359
+ ]
360
+ },
361
+ "source": {
362
+ "result": -1,
363
+ "words": [
364
+ 7,
365
+ 8,
366
+ 2864434397
367
+ ]
368
+ }
369
+ },
370
+ {
371
+ "rust": {
372
+ "result": 2,
373
+ "words": [
374
+ 0,
375
+ 1,
376
+ 2
377
+ ]
378
+ },
379
+ "source": {
380
+ "result": 2,
381
+ "words": [
382
+ 0,
383
+ 1,
384
+ 2
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "rust": {
390
+ "result": -1,
391
+ "words": [
392
+ 0,
393
+ 2864434397,
394
+ 2864434397,
395
+ 2864434397,
396
+ 2864434397,
397
+ 2864434397
398
+ ]
399
+ },
400
+ "source": {
401
+ "result": -1,
402
+ "words": [
403
+ 0,
404
+ 2864434397,
405
+ 2864434397,
406
+ 2864434397,
407
+ 2864434397,
408
+ 2864434397
409
+ ]
410
+ }
411
+ },
412
+ {
413
+ "rust": {
414
+ "result": 6,
415
+ "words": [
416
+ 1,
417
+ 2,
418
+ 3,
419
+ 4,
420
+ 5,
421
+ 6
422
+ ]
423
+ },
424
+ "source": {
425
+ "result": 6,
426
+ "words": [
427
+ 1,
428
+ 2,
429
+ 3,
430
+ 4,
431
+ 5,
432
+ 6
433
+ ]
434
+ }
435
+ },
436
+ {
437
+ "rust": {
438
+ "result": -1,
439
+ "words": [
440
+ 0,
441
+ 2864434397,
442
+ 2864434397,
443
+ 2864434397,
444
+ 2864434397,
445
+ 2864434397
446
+ ]
447
+ },
448
+ "source": {
449
+ "result": -1,
450
+ "words": [
451
+ 0,
452
+ 2864434397,
453
+ 2864434397,
454
+ 2864434397,
455
+ 2864434397,
456
+ 2864434397
457
+ ]
458
+ }
459
+ },
460
+ {
461
+ "rust": {
462
+ "result": -1,
463
+ "words": [
464
+ 1,
465
+ 2864434397,
466
+ 2864434397,
467
+ 2864434397,
468
+ 2864434397,
469
+ 2864434397
470
+ ]
471
+ },
472
+ "source": {
473
+ "result": -1,
474
+ "words": [
475
+ 1,
476
+ 2864434397,
477
+ 2864434397,
478
+ 2864434397,
479
+ 2864434397,
480
+ 2864434397
481
+ ]
482
+ }
483
+ },
484
+ {
485
+ "rust": {
486
+ "result": -1,
487
+ "words": [
488
+ 1,
489
+ 0,
490
+ 2864434397,
491
+ 2864434397,
492
+ 2864434397,
493
+ 2864434397
494
+ ]
495
+ },
496
+ "source": {
497
+ "result": -1,
498
+ "words": [
499
+ 1,
500
+ 0,
501
+ 2864434397,
502
+ 2864434397,
503
+ 2864434397,
504
+ 2864434397
505
+ ]
506
+ }
507
+ },
508
+ {
509
+ "rust": {
510
+ "result": -1,
511
+ "words": [
512
+ 0,
513
+ 2864434397,
514
+ 2864434397,
515
+ 2864434397,
516
+ 2864434397,
517
+ 2864434397
518
+ ]
519
+ },
520
+ "source": {
521
+ "result": -1,
522
+ "words": [
523
+ 0,
524
+ 2864434397,
525
+ 2864434397,
526
+ 2864434397,
527
+ 2864434397,
528
+ 2864434397
529
+ ]
530
+ }
531
+ },
532
+ {
533
+ "rust": {
534
+ "result": -1,
535
+ "words": [
536
+ 1,
537
+ 2,
538
+ 3,
539
+ 2864434397,
540
+ 2864434397,
541
+ 2864434397
542
+ ]
543
+ },
544
+ "source": {
545
+ "result": -1,
546
+ "words": [
547
+ 1,
548
+ 2,
549
+ 3,
550
+ 2864434397,
551
+ 2864434397,
552
+ 2864434397
553
+ ]
554
+ }
555
+ },
556
+ {
557
+ "rust": {
558
+ "result": -1,
559
+ "words": [
560
+ 2147483648,
561
+ 2,
562
+ 3,
563
+ 2864434397,
564
+ 2864434397,
565
+ 2864434397
566
+ ]
567
+ },
568
+ "source": {
569
+ "result": -1,
570
+ "words": [
571
+ 2147483648,
572
+ 2,
573
+ 3,
574
+ 2864434397,
575
+ 2864434397,
576
+ 2864434397
577
+ ]
578
+ }
579
+ },
580
+ {
581
+ "rust": {
582
+ "result": 6,
583
+ "words": [
584
+ 0,
585
+ 0,
586
+ 0,
587
+ 0,
588
+ 0,
589
+ 0
590
+ ]
591
+ },
592
+ "source": {
593
+ "result": 6,
594
+ "words": [
595
+ 0,
596
+ 0,
597
+ 0,
598
+ 0,
599
+ 0,
600
+ 0
601
+ ]
602
+ }
603
+ },
604
+ {
605
+ "rust": {
606
+ "result": -1,
607
+ "words": [
608
+ 0,
609
+ 2864434397,
610
+ 2864434397,
611
+ 2864434397,
612
+ 2864434397,
613
+ 2864434397
614
+ ]
615
+ },
616
+ "source": {
617
+ "result": -1,
618
+ "words": [
619
+ 0,
620
+ 2864434397,
621
+ 2864434397,
622
+ 2864434397,
623
+ 2864434397,
624
+ 2864434397
625
+ ]
626
+ }
627
+ },
628
+ {
629
+ "rust": {
630
+ "result": -1,
631
+ "words": [
632
+ 7,
633
+ 8,
634
+ 2864434397,
635
+ 2864434397,
636
+ 2864434397,
637
+ 2864434397
638
+ ]
639
+ },
640
+ "source": {
641
+ "result": -1,
642
+ "words": [
643
+ 7,
644
+ 8,
645
+ 2864434397,
646
+ 2864434397,
647
+ 2864434397,
648
+ 2864434397
649
+ ]
650
+ }
651
+ },
652
+ {
653
+ "rust": {
654
+ "result": -1,
655
+ "words": [
656
+ 0,
657
+ 1,
658
+ 2,
659
+ 2864434397,
660
+ 2864434397,
661
+ 2864434397
662
+ ]
663
+ },
664
+ "source": {
665
+ "result": -1,
666
+ "words": [
667
+ 0,
668
+ 1,
669
+ 2,
670
+ 2864434397,
671
+ 2864434397,
672
+ 2864434397
673
+ ]
674
+ }
675
+ },
676
+ {
677
+ "rust": {
678
+ "result": 0,
679
+ "words": [
680
+ 0
681
+ ]
682
+ },
683
+ "source": {
684
+ "result": 0,
685
+ "words": [
686
+ 0
687
+ ]
688
+ }
689
+ },
690
+ {
691
+ "rust": {
692
+ "result": 1,
693
+ "words": [
694
+ 1067450368
695
+ ]
696
+ },
697
+ "source": {
698
+ "result": 1,
699
+ "words": [
700
+ 1067450368
701
+ ]
702
+ }
703
+ },
704
+ {
705
+ "rust": {
706
+ "result": 1,
707
+ "words": [
708
+ 1036831949
709
+ ]
710
+ },
711
+ "source": {
712
+ "result": 1,
713
+ "words": [
714
+ 1036831949
715
+ ]
716
+ }
717
+ },
718
+ {
719
+ "rust": {
720
+ "result": 1,
721
+ "words": [
722
+ 1067450368
723
+ ]
724
+ },
725
+ "source": {
726
+ "result": 1,
727
+ "words": [
728
+ 1067450368
729
+ ]
730
+ }
731
+ },
732
+ {
733
+ "rust": {
734
+ "result": 1,
735
+ "words": [
736
+ 1065353216
737
+ ]
738
+ },
739
+ "source": {
740
+ "result": 1,
741
+ "words": [
742
+ 1065353216
743
+ ]
744
+ }
745
+ },
746
+ {
747
+ "rust": {
748
+ "result": 0,
749
+ "words": [
750
+ 0
751
+ ]
752
+ },
753
+ "source": {
754
+ "result": 0,
755
+ "words": [
756
+ 0
757
+ ]
758
+ }
759
+ },
760
+ {
761
+ "rust": {
762
+ "result": 1,
763
+ "words": [
764
+ 0
765
+ ]
766
+ },
767
+ "source": {
768
+ "result": 1,
769
+ "words": [
770
+ 0
771
+ ]
772
+ }
773
+ },
774
+ {
775
+ "rust": {
776
+ "result": 1,
777
+ "words": [
778
+ 1065353216
779
+ ]
780
+ },
781
+ "source": {
782
+ "result": 1,
783
+ "words": [
784
+ 1065353216
785
+ ]
786
+ }
787
+ },
788
+ {
789
+ "rust": {
790
+ "result": 1,
791
+ "words": [
792
+ 1266679808
793
+ ]
794
+ },
795
+ "source": {
796
+ "result": 1,
797
+ "words": [
798
+ 1266679808
799
+ ]
800
+ }
801
+ },
802
+ {
803
+ "rust": {
804
+ "result": 1,
805
+ "words": [
806
+ 0
807
+ ]
808
+ },
809
+ "source": {
810
+ "result": 1,
811
+ "words": [
812
+ 0
813
+ ]
814
+ }
815
+ },
816
+ {
817
+ "rust": {
818
+ "result": 1,
819
+ "words": [
820
+ 1065353216
821
+ ]
822
+ },
823
+ "source": {
824
+ "result": 1,
825
+ "words": [
826
+ 1065353216
827
+ ]
828
+ }
829
+ },
830
+ {
831
+ "rust": {
832
+ "result": 1,
833
+ "words": [
834
+ 0
835
+ ]
836
+ },
837
+ "source": {
838
+ "result": 1,
839
+ "words": [
840
+ 0
841
+ ]
842
+ }
843
+ },
844
+ {
845
+ "rust": {
846
+ "result": -1,
847
+ "words": [
848
+ 0,
849
+ 2864434397,
850
+ 2864434397
851
+ ]
852
+ },
853
+ "source": {
854
+ "result": -1,
855
+ "words": [
856
+ 0,
857
+ 2864434397,
858
+ 2864434397
859
+ ]
860
+ }
861
+ },
862
+ {
863
+ "rust": {
864
+ "result": 3,
865
+ "words": [
866
+ 1067450368,
867
+ 3223322624,
868
+ 0
869
+ ]
870
+ },
871
+ "source": {
872
+ "result": 3,
873
+ "words": [
874
+ 1067450368,
875
+ 3223322624,
876
+ 0
877
+ ]
878
+ }
879
+ },
880
+ {
881
+ "rust": {
882
+ "result": 3,
883
+ "words": [
884
+ 1036831949,
885
+ 1045220557,
886
+ 1050253722
887
+ ]
888
+ },
889
+ "source": {
890
+ "result": 3,
891
+ "words": [
892
+ 1036831949,
893
+ 1045220557,
894
+ 1050253722
895
+ ]
896
+ }
897
+ },
898
+ {
899
+ "rust": {
900
+ "result": 3,
901
+ "words": [
902
+ 1067450368,
903
+ 3223322624,
904
+ 0
905
+ ]
906
+ },
907
+ "source": {
908
+ "result": 3,
909
+ "words": [
910
+ 1067450368,
911
+ 3223322624,
912
+ 0
913
+ ]
914
+ }
915
+ },
916
+ {
917
+ "rust": {
918
+ "result": -1,
919
+ "words": [
920
+ 1065353216,
921
+ 2864434397,
922
+ 2864434397
923
+ ]
924
+ },
925
+ "source": {
926
+ "result": -1,
927
+ "words": [
928
+ 1065353216,
929
+ 2864434397,
930
+ 2864434397
931
+ ]
932
+ }
933
+ },
934
+ {
935
+ "rust": {
936
+ "result": -1,
937
+ "words": [
938
+ 0,
939
+ 2864434397,
940
+ 2864434397
941
+ ]
942
+ },
943
+ "source": {
944
+ "result": -1,
945
+ "words": [
946
+ 0,
947
+ 2864434397,
948
+ 2864434397
949
+ ]
950
+ }
951
+ },
952
+ {
953
+ "rust": {
954
+ "result": 3,
955
+ "words": [
956
+ 0,
957
+ 1056964608,
958
+ 3196059648
959
+ ]
960
+ },
961
+ "source": {
962
+ "result": 3,
963
+ "words": [
964
+ 0,
965
+ 1056964608,
966
+ 3196059648
967
+ ]
968
+ }
969
+ },
970
+ {
971
+ "rust": {
972
+ "result": -1,
973
+ "words": [
974
+ 1065353216,
975
+ 1073741824,
976
+ 2864434397
977
+ ]
978
+ },
979
+ "source": {
980
+ "result": -1,
981
+ "words": [
982
+ 1065353216,
983
+ 1073741824,
984
+ 2864434397
985
+ ]
986
+ }
987
+ },
988
+ {
989
+ "rust": {
990
+ "result": 3,
991
+ "words": [
992
+ 1266679808,
993
+ 0,
994
+ 0
995
+ ]
996
+ },
997
+ "source": {
998
+ "result": 3,
999
+ "words": [
1000
+ 1266679808,
1001
+ 0,
1002
+ 0
1003
+ ]
1004
+ }
1005
+ },
1006
+ {
1007
+ "rust": {
1008
+ "result": 2,
1009
+ "words": [
1010
+ 0,
1011
+ 0,
1012
+ 0
1013
+ ]
1014
+ },
1015
+ "source": {
1016
+ "result": 2,
1017
+ "words": [
1018
+ 0,
1019
+ 0,
1020
+ 0
1021
+ ]
1022
+ }
1023
+ },
1024
+ {
1025
+ "rust": {
1026
+ "result": -1,
1027
+ "words": [
1028
+ 1065353216,
1029
+ 2864434397,
1030
+ 2864434397
1031
+ ]
1032
+ },
1033
+ "source": {
1034
+ "result": -1,
1035
+ "words": [
1036
+ 1065353216,
1037
+ 2864434397,
1038
+ 2864434397
1039
+ ]
1040
+ }
1041
+ },
1042
+ {
1043
+ "rust": {
1044
+ "result": 3,
1045
+ "words": [
1046
+ 0,
1047
+ 0,
1048
+ 0
1049
+ ]
1050
+ },
1051
+ "source": {
1052
+ "result": 3,
1053
+ "words": [
1054
+ 0,
1055
+ 0,
1056
+ 0
1057
+ ]
1058
+ }
1059
+ },
1060
+ {
1061
+ "rust": {
1062
+ "result": -1,
1063
+ "words": [
1064
+ 0,
1065
+ 2864434397,
1066
+ 2864434397,
1067
+ 2864434397,
1068
+ 2864434397,
1069
+ 2864434397
1070
+ ]
1071
+ },
1072
+ "source": {
1073
+ "result": -1,
1074
+ "words": [
1075
+ 0,
1076
+ 2864434397,
1077
+ 2864434397,
1078
+ 2864434397,
1079
+ 2864434397,
1080
+ 2864434397
1081
+ ]
1082
+ }
1083
+ },
1084
+ {
1085
+ "rust": {
1086
+ "result": 6,
1087
+ "words": [
1088
+ 1067450368,
1089
+ 3223322624,
1090
+ 0,
1091
+ 1082130432,
1092
+ 1084227584,
1093
+ 1086324736
1094
+ ]
1095
+ },
1096
+ "source": {
1097
+ "result": 6,
1098
+ "words": [
1099
+ 1067450368,
1100
+ 3223322624,
1101
+ 0,
1102
+ 1082130432,
1103
+ 1084227584,
1104
+ 1086324736
1105
+ ]
1106
+ }
1107
+ },
1108
+ {
1109
+ "rust": {
1110
+ "result": -1,
1111
+ "words": [
1112
+ 1036831949,
1113
+ 1045220557,
1114
+ 1050253722,
1115
+ 2864434397,
1116
+ 2864434397,
1117
+ 2864434397
1118
+ ]
1119
+ },
1120
+ "source": {
1121
+ "result": -1,
1122
+ "words": [
1123
+ 1036831949,
1124
+ 1045220557,
1125
+ 1050253722,
1126
+ 2864434397,
1127
+ 2864434397,
1128
+ 2864434397
1129
+ ]
1130
+ }
1131
+ },
1132
+ {
1133
+ "rust": {
1134
+ "result": -1,
1135
+ "words": [
1136
+ 1067450368,
1137
+ 3223322624,
1138
+ 0,
1139
+ 2864434397,
1140
+ 2864434397,
1141
+ 2864434397
1142
+ ]
1143
+ },
1144
+ "source": {
1145
+ "result": -1,
1146
+ "words": [
1147
+ 1067450368,
1148
+ 3223322624,
1149
+ 0,
1150
+ 2864434397,
1151
+ 2864434397,
1152
+ 2864434397
1153
+ ]
1154
+ }
1155
+ },
1156
+ {
1157
+ "rust": {
1158
+ "result": -1,
1159
+ "words": [
1160
+ 1065353216,
1161
+ 2864434397,
1162
+ 2864434397,
1163
+ 2864434397,
1164
+ 2864434397,
1165
+ 2864434397
1166
+ ]
1167
+ },
1168
+ "source": {
1169
+ "result": -1,
1170
+ "words": [
1171
+ 1065353216,
1172
+ 2864434397,
1173
+ 2864434397,
1174
+ 2864434397,
1175
+ 2864434397,
1176
+ 2864434397
1177
+ ]
1178
+ }
1179
+ },
1180
+ {
1181
+ "rust": {
1182
+ "result": -1,
1183
+ "words": [
1184
+ 0,
1185
+ 2864434397,
1186
+ 2864434397,
1187
+ 2864434397,
1188
+ 2864434397,
1189
+ 2864434397
1190
+ ]
1191
+ },
1192
+ "source": {
1193
+ "result": -1,
1194
+ "words": [
1195
+ 0,
1196
+ 2864434397,
1197
+ 2864434397,
1198
+ 2864434397,
1199
+ 2864434397,
1200
+ 2864434397
1201
+ ]
1202
+ }
1203
+ },
1204
+ {
1205
+ "rust": {
1206
+ "result": -1,
1207
+ "words": [
1208
+ 0,
1209
+ 1056964608,
1210
+ 3196059648,
1211
+ 2864434397,
1212
+ 2864434397,
1213
+ 2864434397
1214
+ ]
1215
+ },
1216
+ "source": {
1217
+ "result": -1,
1218
+ "words": [
1219
+ 0,
1220
+ 1056964608,
1221
+ 3196059648,
1222
+ 2864434397,
1223
+ 2864434397,
1224
+ 2864434397
1225
+ ]
1226
+ }
1227
+ },
1228
+ {
1229
+ "rust": {
1230
+ "result": -1,
1231
+ "words": [
1232
+ 1065353216,
1233
+ 1073741824,
1234
+ 2864434397,
1235
+ 2864434397,
1236
+ 2864434397,
1237
+ 2864434397
1238
+ ]
1239
+ },
1240
+ "source": {
1241
+ "result": -1,
1242
+ "words": [
1243
+ 1065353216,
1244
+ 1073741824,
1245
+ 2864434397,
1246
+ 2864434397,
1247
+ 2864434397,
1248
+ 2864434397
1249
+ ]
1250
+ }
1251
+ },
1252
+ {
1253
+ "rust": {
1254
+ "result": -1,
1255
+ "words": [
1256
+ 1266679808,
1257
+ 0,
1258
+ 0,
1259
+ 2864434397,
1260
+ 2864434397,
1261
+ 2864434397
1262
+ ]
1263
+ },
1264
+ "source": {
1265
+ "result": -1,
1266
+ "words": [
1267
+ 1266679808,
1268
+ 0,
1269
+ 0,
1270
+ 2864434397,
1271
+ 2864434397,
1272
+ 2864434397
1273
+ ]
1274
+ }
1275
+ },
1276
+ {
1277
+ "rust": {
1278
+ "result": -1,
1279
+ "words": [
1280
+ 0,
1281
+ 0,
1282
+ 0,
1283
+ 2864434397,
1284
+ 2864434397,
1285
+ 2864434397
1286
+ ]
1287
+ },
1288
+ "source": {
1289
+ "result": -1,
1290
+ "words": [
1291
+ 0,
1292
+ 0,
1293
+ 0,
1294
+ 2864434397,
1295
+ 2864434397,
1296
+ 2864434397
1297
+ ]
1298
+ }
1299
+ },
1300
+ {
1301
+ "rust": {
1302
+ "result": -1,
1303
+ "words": [
1304
+ 1065353216,
1305
+ 2864434397,
1306
+ 2864434397,
1307
+ 2864434397,
1308
+ 2864434397,
1309
+ 2864434397
1310
+ ]
1311
+ },
1312
+ "source": {
1313
+ "result": -1,
1314
+ "words": [
1315
+ 1065353216,
1316
+ 2864434397,
1317
+ 2864434397,
1318
+ 2864434397,
1319
+ 2864434397,
1320
+ 2864434397
1321
+ ]
1322
+ }
1323
+ },
1324
+ {
1325
+ "rust": {
1326
+ "result": 6,
1327
+ "words": [
1328
+ 0,
1329
+ 0,
1330
+ 0,
1331
+ 0,
1332
+ 0,
1333
+ 0
1334
+ ]
1335
+ },
1336
+ "source": {
1337
+ "result": 6,
1338
+ "words": [
1339
+ 0,
1340
+ 0,
1341
+ 0,
1342
+ 0,
1343
+ 0,
1344
+ 0
1345
+ ]
1346
+ }
1347
+ }
1348
+ ],
1349
+ "source_report": "docs/research/qvm-numeric-scan.json",
1350
+ "source_report_sha256": "175b60c870cb3f3ea430413348010e79fe9e4e6b42bc9ee6e71512d287017b0e"
1351
+ }
scripts/analyze_rust_numeric_scan.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ import hashlib,json
3
+ from pathlib import Path
4
+ from rust_native_policy_support import binary,result,invoke
5
+ from analyze_qvm import write_json
6
+ def encode(s):
7
+ a=s['input'];text=bytes.fromhex(a['text']);return [int(a['kind']=='f'),a['count'],len(text),*text]
8
+ def project(s):return {k:s[k] for k in ['result','words']}
9
+
10
+ def main():
11
+ b=binary();p=Path('docs/research/qvm-numeric-scan.json');data=p.read_bytes();rows=[]
12
+ for s in json.loads(data)['probes']:rows.append({'source':project(s),'rust':result(b,'scan',encode(s))})
13
+ write_json(Path('docs/research/rust-numeric-scan.json'),{'source_report':str(p),'source_report_sha256':hashlib.sha256(data).hexdigest(),'probes':rows,'limits':'Rust matches72 actual38326/38355/37159/36779 cases, preserving digits-only integer entry, wrapping overflow, staged f32 decimal arithmetic, partial destination writes and literal-mismatch return-1. Caller supplies untouched destination words. Uppercase exponent, non-ASCII input and other scanf conversions reject; native ABI and complete scanner semantics remain open.'})
14
+ if __name__=='__main__':main()
scripts/test_rust_numeric_scan.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import hashlib,json,unittest
2
+ from pathlib import Path
3
+ class PortTests(unittest.TestCase):
4
+ def test_all_original_cases(self):
5
+ r=json.loads(Path('docs/research/rust-numeric-scan.json').read_text());src=json.loads(Path(r['source_report']).read_text());self.assertEqual(len(r['probes']),len(src['probes']));self.assertGreater(len(r['probes']),20)
6
+ for p in r['probes']:self.assertEqual(p['rust'],p['source'])
7
+ def test_source_identity(self):
8
+ r=json.loads(Path('docs/research/rust-numeric-scan.json').read_text());self.assertEqual(hashlib.sha256(Path(r['source_report']).read_bytes()).hexdigest(),r['source_report_sha256'])
9
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -2731,3 +2731,16 @@ edge docs/research/qvm-numeric-scan.json scripts/test_qvm_numeric_scan.py
2731
  group qvm-numeric-scan scripts/analyze_qvm_numeric_scan.py
2732
  edge scripts/analyze_qvm_numeric_scan.py scripts/analyze_qvm_resumer_audit.py
2733
  edge scripts/qvm_scan_oracle.py scripts/analyze_qvm_resumer_audit.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2731
  group qvm-numeric-scan scripts/analyze_qvm_numeric_scan.py
2732
  edge scripts/analyze_qvm_numeric_scan.py scripts/analyze_qvm_resumer_audit.py
2733
  edge scripts/qvm_scan_oracle.py scripts/analyze_qvm_resumer_audit.py
2734
+ edge Cargo.toml scripts/analyze_rust_numeric_scan.py
2735
+ edge Cargo.lock scripts/analyze_rust_numeric_scan.py
2736
+ edge crates/urt-gameplay/Cargo.toml scripts/analyze_rust_numeric_scan.py
2737
+ edge crates/urt-gameplay/src/lib.rs scripts/analyze_rust_numeric_scan.py
2738
+ edge crates/urt-gameplay/src/native_policy.rs scripts/analyze_rust_numeric_scan.py
2739
+ edge crates/urt-gameplay/src/bin/urt-native-policy.rs scripts/analyze_rust_numeric_scan.py
2740
+ edge docs/research/qvm-numeric-scan.json scripts/analyze_rust_numeric_scan.py
2741
+ group rust-numeric-scan scripts/analyze_rust_health_impulse.py
2742
+ group gameplay scripts/analyze_rust_numeric_scan.py
2743
+ report scripts/analyze_rust_numeric_scan.py docs/research/rust-numeric-scan.json
2744
+ edge docs/research/rust-numeric-scan.json scripts/test_rust_numeric_scan.py
2745
+ group rust-numeric-scan scripts/analyze_rust_numeric_scan.py
2746
+ edge scripts/analyze_rust_numeric_scan.py scripts/analyze_qvm_resumer_audit.py