aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/045-proof-compiler/variants
diff options
context:
space:
mode:
Diffstat (limited to 'research/experiments/045-proof-compiler/variants')
-rw-r--r--research/experiments/045-proof-compiler/variants/v0-empty.patch34
-rw-r--r--research/experiments/045-proof-compiler/variants/v1-lists.patch14
-rw-r--r--research/experiments/045-proof-compiler/variants/v2-text.patch12
3 files changed, 60 insertions, 0 deletions
diff --git a/research/experiments/045-proof-compiler/variants/v0-empty.patch b/research/experiments/045-proof-compiler/variants/v0-empty.patch
new file mode 100644
index 0000000..de5b3fc
--- /dev/null
+++ b/research/experiments/045-proof-compiler/variants/v0-empty.patch
@@ -0,0 +1,34 @@
+--- linebreak.aup
++++ v0-empty.aup
+@@ -153,30 +153,6 @@
+ }
+
+ on line {
+- let codes, cls, eff, start, nonspace, ri, at: list of number
+- let joined, numeric: list of bool
+- for p in line.points {
+- let i = codes.count
+- let r = range(p.code)
+- let c = ranges[r].class
+- let mark = c == CM || c == ZWJ
+- let previous = if i > 0 { eff[i - 1] } else { SP }
+- let joins = mark && i > 0 && !end(previous) && previous != SP && previous != ZW # LB9, LB10
+- let e = if joins { previous } else if mark { AL } else { c }
+- codes.append(p.code)
+- cls.append(c)
+- at.append(r)
+- joined.append(joins)
+- eff.append(e)
+- start.append(if joins { start[i - 1] } else { i })
+- nonspace.append(if e != SP { start[i] } else if i > 0 { nonspace[i - 1] } else { -1 })
+- numeric.append(if joins { numeric[i - 1] } else { e == NU || ((e == SY || e == IS) && i > 0 && numeric[i - 1]) })
+- ri.append(if joins { ri[i - 1] } else if e == RI { (if i > 0 { ri[i - 1] } else { 0 }) + 1 } else { 0 })
+- }
+- let t = Text { codes: codes, cls: cls, eff: eff, joined: joined, start: start, nonspace: nonspace, numeric: numeric, ri: ri,
+- at: at }
+- let out: list of i64 = [0] # LB2
+- for i in 1 .. codes.count { out.append(i64(decide(t, i))) }
+- if codes.count > 0 { out.append(2) } # LB3
++ let out: list of i64 = [0]
+ breaks = bytes(out)
+ }
diff --git a/research/experiments/045-proof-compiler/variants/v1-lists.patch b/research/experiments/045-proof-compiler/variants/v1-lists.patch
new file mode 100644
index 0000000..6b73004
--- /dev/null
+++ b/research/experiments/045-proof-compiler/variants/v1-lists.patch
@@ -0,0 +1,14 @@
+--- linebreak.aup
++++ v1-lists.aup
+@@ -173,10 +173,6 @@
+ numeric.append(if joins { numeric[i - 1] } else { e == NU || ((e == SY || e == IS) && i > 0 && numeric[i - 1]) })
+ ri.append(if joins { ri[i - 1] } else if e == RI { (if i > 0 { ri[i - 1] } else { 0 }) + 1 } else { 0 })
+ }
+- let t = Text { codes: codes, cls: cls, eff: eff, joined: joined, start: start, nonspace: nonspace, numeric: numeric, ri: ri,
+- at: at }
+- let out: list of i64 = [0] # LB2
+- for i in 1 .. codes.count { out.append(i64(decide(t, i))) }
+- if codes.count > 0 { out.append(2) } # LB3
++ let out: list of i64 = [0]
+ breaks = bytes(out)
+ }
diff --git a/research/experiments/045-proof-compiler/variants/v2-text.patch b/research/experiments/045-proof-compiler/variants/v2-text.patch
new file mode 100644
index 0000000..2539f0c
--- /dev/null
+++ b/research/experiments/045-proof-compiler/variants/v2-text.patch
@@ -0,0 +1,12 @@
+--- linebreak.aup
++++ v2-text.aup
+@@ -175,8 +175,6 @@
+ }
+ let t = Text { codes: codes, cls: cls, eff: eff, joined: joined, start: start, nonspace: nonspace, numeric: numeric, ri: ri,
+ at: at }
+- let out: list of i64 = [0] # LB2
+- for i in 1 .. codes.count { out.append(i64(decide(t, i))) }
+- if codes.count > 0 { out.append(2) } # LB3
++ let out: list of i64 = [0]
+ breaks = bytes(out)
+ }