interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / omc / om2 / hex / hex.cases

110 lines · 7482 bytes Raw Blame History
1# SPDX-License-Identifier: Apache-2.0
2# seed/omc/om2/hex/hex.cases: OM-2 hex literal coverage for #745 (spec/omegese-om2.md section 2,
3# lines 53-58), run by seed/qualification/om2/gate.om. Every expected value comes from Wolfram
4# (wolfram.txt); every expected error is the spec code (6 malformed, 8 range, 23 arrlen as decimal)
5# on the literal's line. seed/host/check.sh requires OM2GATE PASS.
6# ---- values: 64 literals over the eight integer types, decimal twin byte-identical
7# pairs: hex spelling prints the Wolfram decimals, exit 0
8hex-pairs-run run seed/omc/om2/hex/pairs-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/pairs.out - 0
9# pairs: decimal spelling prints the same
10hex-pairs-dec-run run seed/omc/om2/hex/pairs-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/pairs.out - 0
11# pairs: line 58 "0x2a and 42 compile identically", for every literal in the file
12hex-pairs-same same seed/omc/om2/hex/pairs-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om seed/omc/om2/hex/pairs-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om
13# floatlike: hex spelling prints the Wolfram decimals, exit 0
14hex-floatlike-run run seed/omc/om2/hex/floatlike-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/floatlike.out - 0
15# floatlike: decimal spelling prints the same
16hex-floatlike-dec-run run seed/omc/om2/hex/floatlike-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/floatlike.out - 0
17# floatlike: line 58 "0x2a and 42 compile identically", for every literal in the file
18hex-floatlike-same same seed/omc/om2/hex/floatlike-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om seed/omc/om2/hex/floatlike-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om
19# places: hex spelling prints the Wolfram decimals, exit 32
20hex-places-run run seed/omc/om2/hex/places-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/places.out - 32
21# places: decimal spelling prints the same
22hex-places-dec-run run seed/omc/om2/hex/places-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om - file:seed/omc/om2/hex/exp/places.out - 32
23# places: line 58 "0x2a and 42 compile identically", for every literal in the file
24hex-places-same same seed/omc/om2/hex/places-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om seed/omc/om2/hex/places-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om
25# function mode: hex in const, new, put, while bound, trap code; byte-identical to decimal
26hex-fnmode-same same seed/omc/om2/hex/fnmode-hex.om seed/omc/om2/hex/fnmode-dec.om
27# x86linux target: the same 64 literals, byte-identical to decimal
28hex-x86-pairs-same same seed/omc/om2/hex/target.txt+seed/omc/om2/hex/pairs-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om seed/omc/om2/hex/target.txt+seed/omc/om2/hex/pairs-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om
29# x86linux target: every place, byte-identical to decimal
30hex-x86-places-same same seed/omc/om2/hex/target.txt+seed/omc/om2/hex/places-hex.om+seed/qualification/om2/sec/s0s2/lib/putu.om seed/omc/om2/hex/target.txt+seed/omc/om2/hex/places-dec.om+seed/qualification/om2/sec/s0s2/lib/putu.om
31# signed minima in decimal against hex operands, exit 0
32hex-signed-min run seed/omc/om2/hex/signed-min.om - - - 0
33# ---- refusals: the hex literal gets the decimal twin's code on the same line (decimal range rule)
34# const value 0x100 outside uchar
35hex-r8-const emit seed/omc/om2/hex/ref/r8-const.om - err:4:8 8
36# decimal twin of r8-const
37hex-r8-const-dec emit seed/omc/om2/hex/ref/r8-const-dec.om - err:4:8 8
38# global length 0x0 (1..16777216)
39hex-r8-global0 emit seed/omc/om2/hex/ref/r8-global0.om - err:4:8 8
40# decimal twin of r8-global0
41hex-r8-global0-dec emit seed/omc/om2/hex/ref/r8-global0-dec.om - err:4:8 8
42# while bound 0x8000000000000000 = 2^63 past 2^63-1 (#848; was 0xf4240 past 999999)
43hex-r8-bound emit seed/omc/om2/hex/ref/r8-bound.om - err:6:8 8
44# decimal twin of r8-bound
45hex-r8-bound-dec emit seed/omc/om2/hex/ref/r8-bound-dec.om - err:6:8 8
46# unroll count 0x41 = 65 past 64
47hex-r8-unroll emit seed/omc/om2/hex/ref/r8-unroll.om - err:5:8 8
48# decimal twin of r8-unroll
49hex-r8-unroll-dec emit seed/omc/om2/hex/ref/r8-unroll-dec.om - err:5:8 8
50# unroll count 0x0
51hex-r8-unroll0 emit seed/omc/om2/hex/ref/r8-unroll0.om - err:5:8 8
52# decimal twin of r8-unroll0
53hex-r8-unroll0-dec emit seed/omc/om2/hex/ref/r8-unroll0-dec.om - err:5:8 8
54# trap code 0xf = 15 past 14
55hex-r8-trap emit seed/omc/om2/hex/ref/r8-trap.om - err:7:8 8
56# decimal twin of r8-trap
57hex-r8-trap-dec emit seed/omc/om2/hex/ref/r8-trap-dec.om - err:7:8 8
58# trap code 0x0
59hex-r8-trap0 emit seed/omc/om2/hex/ref/r8-trap0.om - err:7:8 8
60# decimal twin of r8-trap0
61hex-r8-trap0-dec emit seed/omc/om2/hex/ref/r8-trap0-dec.om - err:7:8 8
62# put value 0x100 into a uchar array (no truncation)
63hex-r8-put emit seed/omc/om2/hex/ref/r8-put.om - err:6:8 8
64# decimal twin of r8-put
65hex-r8-put-dec emit seed/omc/om2/hex/ref/r8-put-dec.om - err:6:8 8
66# new fill 0x100 for uchar (no truncation)
67hex-r8-fill emit seed/omc/om2/hex/ref/r8-fill.om - err:5:8 8
68# decimal twin of r8-fill
69hex-r8-fill-dec emit seed/omc/om2/hex/ref/r8-fill-dec.om - err:5:8 8
70# call argument 0x100 for a uchar parameter (no truncation)
71hex-r8-arg emit seed/omc/om2/hex/ref/r8-arg.om - err:8:8 8
72# decimal twin of r8-arg
73hex-r8-arg-dec emit seed/omc/om2/hex/ref/r8-arg-dec.om - err:8:8 8
74# comparison operand 0x100 against uchar (no truncation)
75hex-r8-cmp emit seed/omc/om2/hex/ref/r8-cmp.om - err:6:8 8
76# decimal twin of r8-cmp
77hex-r8-cmp-dec emit seed/omc/om2/hex/ref/r8-cmp-dec.om - err:6:8 8
78# sub operand 0x80 for byte (no two s-complement reinterpretation)
79hex-r8-sub emit seed/omc/om2/hex/ref/r8-sub.om - err:6:8 8
80# decimal twin of r8-sub
81hex-r8-sub-dec emit seed/omc/om2/hex/ref/r8-sub-dec.om - err:6:8 8
82# 0x0100: leading zeros do not change the value 256, out of uchar
83hex-r8-lead0 emit seed/omc/om2/hex/ref/r8-lead0.om - err:5:8 8
84# decimal twin of r8-lead0
85hex-r8-lead0-dec emit seed/omc/om2/hex/ref/r8-lead0-dec.om - err:5:8 8
86# a - before a hex literal: signed minima have no hex spelling
87hex-r6-negbyte emit seed/omc/om2/hex/ref/r6-negbyte.om - err:5:6 6
88# a - before a hex literal (long minimum)
89hex-r6-neglong emit seed/omc/om2/hex/ref/r6-neglong.om - err:5:6 6
90# 17 digits, error 6 before any truncation to 64 bits
91hex-r6-17trunc emit seed/omc/om2/hex/ref/r6-17trunc.om - err:5:6 6
92# 00x1 is not a hex literal
93hex-r6-lead00x emit seed/omc/om2/hex/ref/r6-lead00x.om - err:5:6 6
94# -0X1: minus and uppercase X
95hex-r6-negX emit seed/omc/om2/hex/ref/r6-negX.om - err:5:6 6
96# 0x1.8: no hex fraction
97hex-r6-dot emit seed/omc/om2/hex/ref/r6-dot.om - err:5:6 6
98# 0x-1: digit outside 0-9a-f
99hex-r6-xneg emit seed/omc/om2/hex/ref/r6-xneg.om - err:5:6 6
100# global length 0x1000001 past 16777216 (arrlen, error 23 as decimal)
101hex-r23-globalbig emit seed/omc/om2/hex/ref/r23-globalbig.om - err:4:23 23
102# decimal twin of r23-globalbig
103hex-r23-globalbig-dec emit seed/omc/om2/hex/ref/r23-globalbig-dec.om - err:4:23 23
104# ---- versioning: no hex literal outside an OM-2 unit (OMEGESE 9.13)
105# an OM-1 unit (no om2 line) has no hex literal: const value
106hex-om1-const emit seed/omc/om2/hex/om1/om1-const.om - err:3:6 6
107# an OM-1 unit has no hex literal, including 0x1e that the decimal path reads as a float
108hex-om1-floatlike emit seed/omc/om2/hex/om1/om1-floatlike.om - err:4:6 6
109# IR mode is OM-1 only: no hex literal
110hex-om1-ir emit seed/omc/om2/hex/om1/om1-ir.om - err:5:6 6