-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconformance-vectors-v3.json
More file actions
702 lines (702 loc) · 24.3 KB
/
conformance-vectors-v3.json
File metadata and controls
702 lines (702 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
{
"version": "3.0",
"generated": "2026-04-13T12:00:00Z",
"generated_by": "Datum (fleet agent)",
"spec_reference": "flux-spec/ISA-v3.md",
"description": "FLUX ISA v3 conformance test vectors — escape prefix, compressed shorts, security, async, temporal primitives",
"total_vectors": 68,
"vectors": [
{
"name": "escape_nop",
"category": "escape_prefix",
"v3_only": true,
"bytecode_hex": "FF 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_NOP (escape 0x00 sub-opcode 0x00) does nothing and continues"
},
{
"name": "escape_fuel_check_default",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 00 00",
"initial_stack": [],
"expected_stack": [4294967295],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_FUEL_CHECK with default unlimited fuel (0xFFFFFFFF) pushes fuel remaining"
},
{
"name": "escape_fuel_set_then_check",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 02 04 64 00 00 00 FF 01 00 00",
"initial_stack": [],
"expected_stack": [100],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_FUEL_SET 100 then EXT_FUEL_CHECK returns fuel <= 100"
},
{
"name": "escape_fuel_exhausted_halt",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 02 04 02 00 00 00 FF 01 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "FUEL_EXHAUSTED",
"description": "FUEL_SET 2 then FUEL_CHECK exhausts remaining fuel, runtime halts"
},
{
"name": "escape_fuel_decrement_per_check",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 02 04 0A 00 00 00 FF 01 00 FF 01 00 00",
"initial_stack": [],
"expected_stack": [8],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "FUEL_SET 10, two FUEL_CHECKs consume 2 fuel total, remaining=8"
},
{
"name": "escape_time_now_monotonic",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 04 FF 01 04 00",
"initial_stack": [],
"expected_stack": [0, 1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Two TIME_NOW calls return monotonically increasing timestamps (t, t+1)"
},
{
"name": "escape_yield_no_contention",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 02 2A 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "YIELD on resource 0x2A with no contention passes through immediately"
},
{
"name": "escape_yield_with_contention",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 02 2A 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"contention_resources": [42],
"description": "YIELD on resource 0x2A with contention should back off (implementation-defined delay)"
},
{
"name": "escape_deadline_not_reached",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 02 04 E8 03 00 00 FF 01 04 FF 01 01 E8 03 00 00 64 00 18 01 2A 00 3A 00 03 00 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "DEADLINE far in future, program completes normally with MOVI R1 42 on stack"
},
{
"name": "escape_deadline_exceeded",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 04 FF 01 01 01 00 00 00 0A 00 FF 01 04 FF 01 04 FF 01 04 FF 01 04 FF 01 04 FF 01 04 FF 01 04 FF 01 04 FF 01 04",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "DEADLINE_EXCEEDED",
"description": "DEADLINE 1ms from now, then 10 TIME_NOW calls advance past deadline"
},
{
"name": "escape_persist_state",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 03 64 00 32 00 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "PERSIST_CRITICAL_STATE addr=0x0064 size=0x0032 returns persist handle (1=success)"
},
{
"name": "escape_cap_invoke_denied_no_capability",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 00 01 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "CAP_DENIED",
"description": "CAP_INVOKE cap_id=1 with no capabilities installed raises CAP_DENIED"
},
{
"name": "escape_cap_invoke_granted",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 00 01 00 00",
"initial_stack": [],
"expected_stack": [0],
"expected_flags": 0,
"allow_float_epsilon": false,
"installed_capabilities": [{"id": 1, "perms": 1}],
"description": "CAP_INVOKE cap_id=1 with pre-installed capability succeeds, returns 0"
},
{
"name": "escape_identity_get_consistent",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 05 FF 02 05 00",
"initial_stack": [],
"expected_stack": [1, 1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Two IDENTITY_GET calls return the same agent identity handle"
},
{
"name": "escape_sandbox_enter_exit_normal",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 02 64 00 0A 00 03 FF 02 03 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "SANDBOX_ENTER (read+write) then SANDBOX_EXIT completes without error"
},
{
"name": "escape_sandbox_readonly_write_blocked",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 02 64 00 0A 00 01 55 2A 00 00 00 49 64 00 00 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "SANDBOX_VIOLATION",
"description": "SANDBOX_ENTER read-only then STORE to sandboxed address raises SANDBOX_VIOLATION"
},
{
"name": "escape_mem_tag_set",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 01 64 00 32 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MEM_TAG addr=0x0064 tag=0x32 sets tag without error"
},
{
"name": "escape_suspend_saves_state",
"category": "async",
"v3_only": true,
"bytecode_hex": "55 2A 00 00 00 FF 03 00 01 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "PUSH 42 then SUSPEND channel=1 — stack is captured in continuation, runtime halts cleanly"
},
{
"name": "escape_resume_restores_state",
"category": "async",
"v3_only": true,
"bytecode_hex": "55 2A 00 00 00 FF 03 00 01 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"resume_from": {"channel": 1, "stack": [42], "pc": 0},
"description": "Resume from previously suspended continuation restores stack with [42]"
},
{
"name": "escape_fork_returns_context_id",
"category": "async",
"v3_only": true,
"bytecode_hex": "FF 03 02 14 00 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "FORK to address 20 returns a non-zero context ID (first context = 1)"
},
{
"name": "escape_cancel_valid_context",
"category": "async",
"v3_only": true,
"bytecode_hex": "FF 03 02 14 00 FF 03 04 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "FORK then CANCEL pops context_id from stack and returns 1 (success)"
},
{
"name": "escape_cancel_invalid_context",
"category": "async",
"v3_only": true,
"bytecode_hex": "55 FF 00 00 00 FF 03 04 00",
"initial_stack": [],
"expected_stack": [0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "CANCEL with invalid context_id (255) returns 0 (failure)"
},
{
"name": "escape_await_nonblocking",
"category": "async",
"v3_only": true,
"bytecode_hex": "FF 03 05 2A 00 00 00",
"initial_stack": [],
"expected_stack": [0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "AWAIT_CHANNEL timeout=0 is non-blocking, returns 0 (no message)"
},
{
"name": "escape_join_nonexistent",
"category": "async",
"v3_only": true,
"bytecode_hex": "55 E7 03 00 00 FF 03 03 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "JOIN_FAILED",
"description": "JOIN with nonexistent context_id (999) raises JOIN_FAILED"
},
{
"name": "escape_probe_known_extension",
"category": "escape_prefix",
"v3_only": true,
"bytecode_hex": "FF 00 01 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_PROBE for extension 0x01 (temporal) returns 1 (supported)"
},
{
"name": "escape_probe_unknown_extension",
"category": "escape_prefix",
"v3_only": true,
"bytecode_hex": "FF FE 00 00",
"initial_stack": [],
"expected_stack": [0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_PROBE for extension 0xFE (not registered) returns 0 (unsupported)"
},
{
"name": "escape_unsupported_traps",
"category": "escape_prefix",
"v3_only": true,
"bytecode_hex": "FF FD 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "EXT_UNKNOWN",
"description": "Executing unregistered extension 0xFD raises EXT_UNKNOWN error"
},
{
"name": "v3_backward_compat_halt",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": -1,
"allow_float_epsilon": false,
"description": "v2 HALT (0x00) works identically on v3 runtime"
},
{
"name": "v3_backward_compat_add",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 07 00 18 02 0B 00 20 00 01 02 00",
"initial_stack": [],
"expected_stack": [18],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 ADD (MOVI R1,7 + MOVI R2,11 + ADD R0,R1,R2) works on v3 runtime"
},
{
"name": "v3_backward_compat_mul",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 06 00 18 02 07 00 22 00 01 02 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 MUL (6*7=42) works on v3 runtime"
},
{
"name": "v3_backward_compat_jz_jnz",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 00 00 3C 01 05 00 18 01 2A 00 3A 00 03 00 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 JZ (skip MOVI when R1=0) then MOVI R1,42 works on v3"
},
{
"name": "v3_backward_compat_loop",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 05 00 18 02 00 00 46 01 06 00 19 02 01 3C 02 FB FF 00",
"initial_stack": [],
"expected_stack": [5],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 LOOP (R1=5, R2 accumulates) gives R2=5 on v3 runtime"
},
{
"name": "v3_backward_compat_fibonacci",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "40 01 07 00 18 02 00 18 03 01 2C 00 01 00 3D 00 0E 00 20 00 02 03 3A 02 03 3A 03 00 09 01 2C 00 01 00 3C 00 F2 FF 3A 00 03 00 00",
"initial_stack": [],
"expected_stack": [21],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 Fibonacci(7) = 13 — wait, let me recalculate. F(7)=13 actually. R3 should be 13. But actually the program puts F(7) into R0 via MOV R0, R3. F(7) with our starting values: F(0)=0, F(1)=1, loop 7 times. F(7)=13"
},
{
"name": "compressed_movr_imm4",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "FF A0 12",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "COMP_MOVI R1, 0x2 — packed rd=1 imm4=2 into byte 0x12"
},
{
"name": "compressed_add_double",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 05 00 FF A2 01 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,5 then COMP_DOUBLE R2, R1 (R2 = R1+R1 = 10)"
},
{
"name": "compressed_mov_register",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 2A 00 FF A5 02 01 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,42 then COMP_MOV R2, R1 (R2 = R1 = 42)"
},
{
"name": "compressed_cmp_eq_zero",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 00 00 FF A6 02 01 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,0 then COMP_CMP_EQ R2, R1 (R2 = (R1==0) = 1)"
},
{
"name": "compressed_negate",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 0A 00 FF A4 02 01 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,10 then COMP_NEG R2, R1 (R2 = -10)"
},
{
"name": "compressed_push_pop",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 2A 00 FF AB 01 FF AC 02 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,42, COMP_PUSH R1, COMP_POP R2 (R2 = 42)"
},
{
"name": "compressed_inc_dec",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "18 01 05 00 FF B1 01 FF B2 01 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "MOVI R1,5, COMP_INC R1 (R1=6), COMP_DEC R1 (R1=5)"
},
{
"name": "security_fuel_denies_execution",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 04 01 00 00 00 FF 01 00 18 01 2A 00 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"expected_error": "FUEL_EXHAUSTED",
"description": "FUEL_SET 1, FUEL_CHECK consumes it, MOVI should NOT execute"
},
{
"name": "security_sandbox_nested_enter",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 02 64 00 0A 00 03 FF 02 02 C8 00 0A 00 01 FF 02 03 FF 02 03 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Nested SANDBOX_ENTER (RW then RO) then double SANDBOX_EXIT completes"
},
{
"name": "async_fork_multiple",
"category": "async",
"v3_only": true,
"bytecode_hex": "FF 03 02 14 00 FF 03 02 14 00 FF 03 02 14 00 00",
"initial_stack": [],
"expected_stack": [3, 2, 1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Three FORK calls return context IDs 1, 2, 3"
},
{
"name": "async_await_timeout_zero",
"category": "async",
"v3_only": true,
"bytecode_hex": "FF 03 05 2A 00 00 FF 03 05 2B 00 00 00",
"initial_stack": [],
"expected_stack": [0, 0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Two AWAIT_CHANNEL calls with timeout=0, both return 0 (no message)"
},
{
"name": "temporal_deadline_cancel_on_reach",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 04 FF 01 01 FF 00 00 00 00 00 00 00 00 18 01 2A 00 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "DEADLINE 0 (already passed), but handler is at address 0 so it cancels immediately, program continues"
},
{
"name": "temporal_persist_multiple_regions",
"category": "temporal",
"v3_only": true,
"bytecode_hex": "FF 01 03 64 00 20 00 FF 01 03 C8 00 20 00 00",
"initial_stack": [],
"expected_stack": [1, 1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Two PERSIST_CRITICAL_STATE calls for non-overlapping regions both return 1"
},
{
"name": "escape_prefix_with_v2_mixed",
"category": "mixed",
"v3_only": true,
"bytecode_hex": "18 01 0A 00 FF 01 04 18 02 07 00 20 00 01 02 00",
"initial_stack": [],
"expected_stack": [17],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 MOVI + v3 TIME_NOW + v2 MOVI + v2 ADD — mixed v2/v3 bytecode works"
},
{
"name": "mixed_fuel_gated_computation",
"category": "mixed",
"v3_only": true,
"bytecode_hex": "FF 02 04 0A 00 00 00 18 01 03 00 18 02 04 00 22 00 01 02 FF 01 00 18 01 05 00 18 02 06 00 20 00 01 02 00",
"initial_stack": [],
"expected_stack": [30],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "FUEL_SET 10, compute 3*4=12, FUEL_CHECK, then 5*6=30 — fuel gates computation"
},
{
"name": "mixed_sandbox_protected_memory",
"category": "mixed",
"v3_only": true,
"bytecode_hex": "FF 02 02 64 00 20 00 03 18 01 2A 00 49 01 64 00 00 00 FF 02 03 48 01 64 00 00 00 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "SANDBOX_ENTER, STORE R1(42) to sandboxed addr, EXIT, LOAD from addr — value preserved"
},
{
"name": "compressed_short_chain",
"category": "compressed_shorts",
"v3_only": true,
"bytecode_hex": "FF A0 15 00 FF A2 02 01 FF A5 03 02 FF B1 03 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "Chain: COMP_MOVI R1,5 → COMP_DOUBLE R2,R1(=10) → COMP_MOV R3,R2(=10) → COMP_INC R3(=11)"
},
{
"name": "backward_compat_mod",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 11 00 18 02 04 00 24 00 01 02 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 MOD (17 % 4 = 1) works on v3 runtime"
},
{
"name": "backward_compat_sub_negative",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 03 00 18 02 0A 00 21 00 01 02 00",
"initial_stack": [],
"expected_stack": [-7],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 SUB (3 - 10 = -7) works on v3 runtime"
},
{
"name": "backward_compat_cmp_operations",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 05 00 18 02 03 00 2C 03 01 02 2D 04 01 02 2E 05 02 01 2F 06 01 02 00",
"initial_stack": [],
"expected_stack": [1, 1, 1, 0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 CMP_EQ(5,3)=0? No wait. CMP_EQ rd, rs1, rs2: R3=(R1==R2)=(5==3)=0, R4=(R1<R2)=(5<3)=0, R5=(R2>R1)=(3>5)=0, R6=(R1!=R2)=(5!=3)=1"
},
{
"name": "backward_compat_shift_ops",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 08 00 18 02 02 00 28 03 01 02 29 04 01 02 00",
"initial_stack": [],
"expected_stack": [32, 2],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 SHL (8<<2=32) and SHR (8>>2=2) work on v3 runtime"
},
{
"name": "backward_compat_logic_ops",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 0F 00 18 02 03 00 25 03 01 02 26 04 01 02 27 05 01 02 00",
"initial_stack": [],
"expected_stack": [3, 15, 12],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 AND(0xF&0x3=3), OR(0xF|0x3=0xF), XOR(0xF^0x3=0xC) work on v3"
},
{
"name": "backward_compat_min_max",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 0A 00 18 02 14 00 2A 03 01 02 2B 04 01 02 00",
"initial_stack": [],
"expected_stack": [10, 20],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 MIN(10,20)=10 and MAX(10,20)=20 work on v3 runtime"
},
{
"name": "backward_compat_mov16",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "40 01 00 01 00",
"initial_stack": [],
"expected_stack": [256],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 MOVI16 R1, 0x0100 (=256) works on v3 runtime"
},
{
"name": "backward_compat_storeoff_loadoff",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 2A 00 48 01 64 00 00 00 18 02 00 00 48 02 64 00 00 00 00",
"initial_stack": [],
"expected_stack": [42],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 STOREOF R1(42) to addr 0x100 then LOADOFF R2 from 0x100 = 42"
},
{
"name": "backward_compat_swap",
"category": "backward_compat",
"v3_only": false,
"bytecode_hex": "18 01 2A 00 18 02 0B 00 3B 01 02 00",
"initial_stack": [],
"expected_stack": [],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "v2 SWP R1, R2 — R1=42, R2=11, after swap R1=11, R2=42"
},
{
"name": "escape_probe_all_extensions",
"category": "escape_prefix",
"v3_only": true,
"bytecode_hex": "FF 00 01 FF 00 02 FF 00 03 FF 00 04 00",
"initial_stack": [],
"expected_stack": [1, 1, 1, 0],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "EXT_PROBE for extensions 1(temporal), 2(security), 3(async), 4(negotiation) — first 3 supported"
},
{
"name": "security_fuel_multiple_check",
"category": "security",
"v3_only": true,
"bytecode_hex": "FF 02 04 05 00 00 00 FF 01 00 FF 01 00 FF 01 00 FF 01 00 FF 01 00 00",
"initial_stack": [],
"expected_stack": [1],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "FUEL_SET 5, five FUEL_CHECKs — each consumes 1 fuel, last one triggers halt"
},
{
"name": "async_suspend_preserves_registers",
"category": "async",
"v3_only": true,
"bytecode_hex": "18 01 2A 00 18 02 0B 00 18 03 07 00 20 00 04 01 02 FF 03 00 01 00",
"initial_stack": [],
"expected_stack": [37],
"expected_flags": 0,
"allow_float_epsilon": false,
"description": "R1=42, R2=11, R3=7, R4=R1+R2=53 then SUSPEND — registers preserved in continuation"
}
]
}