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 / native / prefetch / review-nested.om

63 lines · 1845 bytes Raw Blame History
1note Independent mutations of complete native-generated receipt. argv0..9.
2text needles "\"tok_same\":0\n\"tok_same\":0\n\"tok_same\":0\n\"mutant1\":{\"rc\":0\n\"mutant1\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":1\n\"mutant2\":{\"rc\":0\n\"mutant2\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":1\n\"B\":{\"launches\":100,\"submits\":100,\"identical\":1\n\"B\":{\"launches\":100,\"submits\":100,\"identical\":1\n\"B\":{\"launches\":100,\"submits\":100,\"identical\":1\n"
3text repl "\"tok_same\":1\n\"tok_wrong\":0\n\"tok_same\":0,\"tok_same\":0\n\"mutant1\":{\"rc\":1\n\"mutant1\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":0\n\"mutant2\":{\"rc\":1\n\"mutant2\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":0\n\"B\":{\"launches\":100,\"submits\":100,\"identical\":0\n\"B\":{\"launches\":100,\"submits\":100,\"identical\":1,\"identical\":1\n\"B\":{\"launches\":100,\"submits\":100,\"other\":1\n"
4global data uchar 4096
5global mode uchar 1
6global loc ulong 4
7fn matches pos ulong to bool
8for j ulong get loc 1
9if ne get data add pos j get needles add get loc 0 j
10ret false
11end
12end
13ret true
14end
15fn main to int
16if ne argread 1 mode 0 1 1
17ret 64
18end
19m = sub ulong get mode 0 48
20if gt m 9
21ret 64
22end
23begin = ulong 0
24line = ulong 0
25for i ulong len needles
26if eq get needles i 10
27if eq line m
28put loc 0 begin
29put loc 1 sub i begin
30end
31begin = add i 1
32line = add line 1
33end
34end
35begin = 0
36line = 0
37for i ulong len repl
38if eq get repl i 10
39if eq line m
40put loc 2 begin
41put loc 3 sub i begin
42end
43begin = add i 1
44line = add line 1
45end
46end
47n = read 0 data 0 len data
48if le n 0
49ret 65
50end
51for pos ulong ulong n
52if le add pos get loc 1 ulong n
53if matches pos
54r = write 1 data 0 pos
55r = write 1 repl get loc 2 get loc 3
56after = add pos get loc 1
57r = write 1 data after sub ulong n after
58ret 0
59end
60end
61end
62ret 1
63end