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 / core / rsi / tests / reuse-eval / judge-protocol.om

175 lines · 2427 bytes Raw Blame History
1note units: sha256 ref judge
2note needs: arm
3note SPDX-License-Identifier: Apache-2.0
4text JPMODES "fullwrongechobadqshortstall"
5fn jpset off ulong n ulong rep ulong a ulong to void
6jdsclr 8
7for i ulong n
8jdsc 8 get JPMODES add off i
9end
10put JDC 10 a
11put JDC 11 0
12put JDC 12 rep
13put JDC 16 JDNONE
14put JDC 17 JDNONE
15put JDC 19 1
16jdcnt0
17jdctsyn 16 1
18end
19fn jpviolation off ulong n ulong rep ulong code ulong to int
20jpset off n rep 1
21e = jdpgroup 0 get JDK 0
22if ne e 0
23ret 21
24end
25if ne get JDA 15 1
26ret 22
27end
28if ne get JDC 9 code
29ret 23
30end
31if ne get JDC 18 add 512 code
32ret 24
33end
34if ne get JDA 1 get JDK 0
35ret 25
36end
37x = jdcload 1 rep 0
38if ne x mul get JDK 0 16
39ret 26
40end
41if ne get JDM add JDLOGW 5 JDNONE
42ret 27
43end
44if ne get JDM add JDLOGW 21 sub JDNONE 1
45ret 28
46end
47if ne get JDM add JDLOGW 28 0
48ret 29
49end
50ret 0
51end
52fn main to int
53if ne argcnt 3
54ret 2
55end
56b = jdsarg 4 1
57b = jdsarg 5 2
58jdsdsh 7
59jdsdsh 9
60jdsdsh 10
61jdsdsh 11
62jdsdsh 12
63jdsdsh 13
64jpset 0 4 0 1
65e = jdpgroup 0 get JDK 0
66if ne e 0
67ret 1
68end
69if ne get JDA 1 0
70ret 3
71end
72if ne get JDA 0 10
73ret 4
74end
75x = jdcload 1 0 0
76if ne x mul get JDK 0 16
77ret 5
78end
79if ne get JDM add JDLOGW 15 2
80ret 6
81end
82if ne get JDM add JDLOGW 31 1
83ret 7
84end
85if ne get JDM add JDLOGW 24 1
86ret 8
87end
88if eq get JDM add JDLOGW 28 0
89ret 9
90end
91jdspath 0 4 JWPLOG 8
92y = jdldw 0 JDLOGW 16
93if ne y 16
94ret 10
95end
96if ne get JDM add JDLOGW 10 0
97ret 11
98end
99if ne get JDM add JDLOGW 11 get JDK 0
100ret 12
101end
102if eq get JDM add JDLOGW 8 0
103ret 13
104end
105jdscp 0 4
106jdsc 0 47
107textpath = new uchar 16 0
108put textpath 0 115
109put textpath 1 116
110put textpath 2 97
111put textpath 3 116
112put textpath 4 115
113put textpath 5 45
114put textpath 6 49
115put textpath 7 45
116put textpath 8 48
117put textpath 9 45
118put textpath 10 103
119put textpath 11 48
120put textpath 12 48
121put textpath 13 46
122put textpath 14 99
123put textpath 15 116
124for i ulong 16
125jdsc 0 get textpath i
126end
127jdsc 0 114
128y = jdldw 0 JDLOGW 34
129if ne y 34
130ret 14
131end
132if ne get JDM add JDLOGW 1 2
133ret 15
134end
135if ne get JDM add JDLOGW 2 17
136ret 16
137end
138if ne get JDM add JDLOGW 3 23
139ret 17
140end
141for i ulong 30
142if ne get JDM add add JDLOGW 4 i 0
143ret 18
144end
145end
146jpset 4 5 1 1
147e = jdpgroup 0 get JDK 0
148if ne e 0
149ret 30
150end
151if ne get JDA 14 10
152ret 31
153end
154jpset 9 4 2 0
155e = jdpgroup 0 get JDK 0
156if ne e 0
157ret 32
158end
159if ne get JDA 1 0
160ret 33
161end
162e = jpviolation 13 4 3 2
163if ne e 0
164ret e
165end
166e = jpviolation 17 5 4 1
167if ne e 0
168ret e
169end
170e = jpviolation 22 5 5 3
171if ne e 0
172ret e
173end
174ret 0
175end