Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
check:
uses: Emerging-Patterns/actions/.github/workflows/nix-flake-check.yml@feaa011dafd85fecb67aa058fbcf6424cf605e86
uses: Emerging-Patterns/actions/.github/workflows/nix-flake-check.yml@4ea982dc3e7839b05bc0bd65a3e4a2868d44e1a1

# The README's install, followed without nix on a fresh checkout: bend,
# `sh bootstrap.sh`, the build, then the proof gate with the built ez.
Expand Down
15 changes: 0 additions & 15 deletions bolt.bend
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,3 @@ def coverage() -> String:
# law claims one computed case and no guarantee, and nothing exempts one.
def closed() -> String:
"error"

# Rules bolt 1.23 to 1.27 added or widened, which fire on code that predates
# them: `pick` (C003, a search bound above its pick: src/ws/joint.bend,
# src/ws/workspace.bend), `concat` (U004, an append passed through a
# continuation: src/check/serve.bend, src/io/file.bend) and `prefix` (U017, a
# take compared to a literal: src/tool/run.bend). They are advice until those
# six findings are fixed, and go back to their groups' level then.
def pick() -> String:
"warn"

def concat() -> String:
"warn"

def prefix() -> String:
"warn"
6 changes: 3 additions & 3 deletions ez.lock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ LICENSE = "309f5aae946e4db157750e002fb179a74ed0fe27fce09a7be68a6977b14f205f"
[tools]
[tools.bolt]
git = "https://github.com/Emerging-Patterns/bolt"
rev = "9700daf3a447089a8795d311912014382a74a2a9"
tag = "v1.27.0"
rev = "26391508a28b69077aaf59b75a80f774a455bca5"
tag = "v1.66.0"
root = "."
narHash = "sha256-0S48j2dongVcvP5Oms5a+s5I12sIy91KAgwW0bP7pxM="
narHash = "sha256-gldg9U4c/Rq1W/9sdhxSPCbujQ8LpHR8edQwbM3tNXM="
entry = "main.bend"
6 changes: 3 additions & 3 deletions ez.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ entry = "main.bend"
[tools]
[tools.bolt]
git = "https://github.com/Emerging-Patterns/bolt"
rev = "9700daf3a447089a8795d311912014382a74a2a9"
tag = "v1.27.0"
rev = "26391508a28b69077aaf59b75a80f774a455bca5"
tag = "v1.66.0"
root = "."
narHash = "sha256-0S48j2dongVcvP5Oms5a+s5I12sIy91KAgwW0bP7pxM="
narHash = "sha256-gldg9U4c/Rq1W/9sdhxSPCbujQ8LpHR8edQwbM3tNXM="
entry = "main.bend"
2 changes: 1 addition & 1 deletion laws/LicenseGoesAlong.bend
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ law license_goes_along:
for rest: List<&2, K.Task>
for lic: String
for here: {K.Here{lic} == K.find(tree, K.beside(file)) : K.Look}
{K.visit.put(K.Going{}, tree, sc, text, file, ns, eb, seen, out, rest)
{K.visit.put(K.Going{}, tree, K.Opened{file, ns, text, sc}, eb, seen, out, rest)
== K.State{file <> seen,
K.Hit{K.raw_of(ns, eb), text} <> K.Hit{K.beside(K.raw_of(ns, eb)), lic}
<> List.append(&2, K.Hit,
Expand Down
2 changes: 1 addition & 1 deletion laws/NoLicenseAsBefore.bend
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ law no_license_as_before:
for out: List<&2, K.Hit>
for rest: List<&2, K.Task>
for none: {K.Absent{} == K.find(tree, K.beside(file)) : K.Look}
{K.visit.put(K.Going{}, tree, sc, text, file, ns, eb, seen, out, rest)
{K.visit.put(K.Going{}, tree, K.Opened{file, ns, text, sc}, eb, seen, out, rest)
== K.State{file <> seen,
K.Hit{K.raw_of(ns, eb), text} <> List.append(&2, K.Hit,
K.foreigns(tree, Path.dir(file), K.nsdir(ns), K.scan.foreign(sc)), out),
Expand Down
2 changes: 1 addition & 1 deletion proofs/LicenseAsked.bend
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def Laws.license_asked(tree, text, file, ns, eb, seen, out, rest, unasked):
%unasked : {K.visit.put(K.asked(_, K.beside(file),
_u => K.named.check(K.unnamed(K.scan.mods(K.scan(text))),
_v => K.foreign.check(tree, Path.dir(file), K.nsdir(ns), K.scan.foreign(K.scan(text))))),
tree, K.scan(text), text, file, ns, eb, seen, out, rest)
tree, K.Opened{file, ns, text, K.scan(text)}, eb, seen, out, rest)
== K.State{seen, out, K.Asking{K.beside(file)}, K.Task{file, ns} <> rest}
: K.State}
{==}
10 changes: 5 additions & 5 deletions proofs/NamedImportIsHubDependency.bend
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ law unnamed_at:
{K.visit.put(K.asked(l, K.beside(file),
_u => K.named.check(K.unnamed(K.scan.mods(K.scan(text))),
_v => K.foreign.check(tree, Path.dir(file), K.nsdir(ns), K.scan.foreign(K.scan(text))))),
tree, K.scan(text), text, file, ns, eb, seen, out, rest)
tree, K.Opened{file, ns, text, K.scan(text)}, eb, seen, out, rest)
== K.State{seen, out, K.Unnamed{K.unnamed(K.scan.mods(K.scan(text)))}, K.Task{file, ns} <> rest}
: K.State}

Expand All @@ -53,20 +53,20 @@ def unnamed_at(l, tree, text, file, ns, eb, seen, out, rest, g, n):
case K.Here{_x}:
%n : {K.visit.put(K.named.check.at(_, K.unnamed(K.scan.mods(K.scan(text))),
_v => K.foreign.check(tree, Path.dir(file), K.nsdir(ns), K.scan.foreign(K.scan(text)))),
tree, K.scan(text), text, file, ns, eb, seen, out, rest)
tree, K.Opened{file, ns, text, K.scan(text)}, eb, seen, out, rest)
== K.State{seen, out, K.Unnamed{K.unnamed(K.scan.mods(K.scan(text)))}, K.Task{file, ns} <> rest}
: K.State}
{==}
case K.Absent{}:
%n : {K.visit.put(K.named.check.at(_, K.unnamed(K.scan.mods(K.scan(text))),
_v => K.foreign.check(tree, Path.dir(file), K.nsdir(ns), K.scan.foreign(K.scan(text)))),
tree, K.scan(text), text, file, ns, eb, seen, out, rest)
tree, K.Opened{file, ns, text, K.scan(text)}, eb, seen, out, rest)
== K.State{seen, out, K.Unnamed{K.unnamed(K.scan.mods(K.scan(text)))}, K.Task{file, ns} <> rest}
: K.State}
{==}
case K.Unasked{}:
Eq.bit.absurd2(&2, {K.visit.put(K.Asking{K.beside(file)}, tree, K.scan(text), text, file, ns,
eb, seen, out, rest)
Eq.bit.absurd2(&2, {K.visit.put(K.Asking{K.beside(file)},
tree, K.Opened{file, ns, text, K.scan(text)}, eb, seen, out, rest)
== K.State{seen, out, K.Unnamed{K.unnamed(K.scan.mods(K.scan(text)))}, K.Task{file, ns} <> rest}
: K.State}, g)

Expand Down
4 changes: 2 additions & 2 deletions proofs/lemmas/DistinctWalkSteps.bend
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ law pick_distinct:
for bad: String
for e: {D1.packs.distinct(packs) == True{} : Bool}
for hs: {Bool.or(L.has(packs, hash), L.seen.holds(asks, hash)) == seen : Bool}
{D1.packs.distinct(P.walk.packs(P.step.pick(seen, orgs, ns, js, hash, rest, packs,
asks, bad))) == True{} : Bool}
{D1.packs.distinct(P.walk.packs(P.step.pick(seen, orgs, ns, js, hash,
P.Walk{rest, packs, asks, bad}))) == True{} : Bool}

def pick_distinct(ns, seen, orgs, js, hash, rest, packs, asks, bad, e, hs):
match seen:
Expand Down
22 changes: 11 additions & 11 deletions proofs/lemmas/LockPlannerFacts.bend
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,9 @@ law pick_pins:
for asks: List<&2, String>
for bad: String
for e: {D1.pinned.all(orgs, packs) == packs : List<&2, L.Pack>}
{D1.pinned.all(orgs, P.walk.packs(P.step.pick(seen, orgs, ns, js, hash, rest,
packs, asks, bad)))
== P.walk.packs(P.step.pick(seen, orgs, ns, js, hash, rest, packs, asks, bad))
{D1.pinned.all(orgs, P.walk.packs(P.step.pick(seen, orgs, ns, js, hash,
P.Walk{rest, packs, asks, bad})))
== P.walk.packs(P.step.pick(seen, orgs, ns, js, hash, P.Walk{rest, packs, asks, bad}))
: List<&2, L.Pack>}

def pick_pins(ns, seen, orgs, js, hash, rest, packs, asks, bad, e):
Expand Down Expand Up @@ -1501,7 +1501,7 @@ law mv.fine_hub:
for +man: String
for srcs: List<&2, String>
for +br: String
{mv.fine(Up.dep.hub(hb, M.Dep{hn, hh, he, src}, hash, r, root2, nar2, man, srcs, br), hn)
{mv.fine(Up.dep.hub(hb, M.Dep{hn, hh, he, src}, hash, Up.Moved{r, root2, nar2, man, srcs}, br), hn)
== (hn, True{}) : String & Bool}

def mv.fine_hub(hb, _hn, _hh, _he, src, _hash, _r, _root2, _nar2, _man, _srcs, _br):
Expand Down Expand Up @@ -2167,12 +2167,12 @@ law a.hub:
for ea: {U.aim(True{}, M.Git{url, r0, tg, rt0, nr0, vd}) == am : U.Aim}
for et: {up.tip(am, rs, url) == Up.At{tip, tag, br} : Up.Tip}
for eco: {Up.checkout(rs, Up.Tree{url, tip, he}) == Up.Co{nar1, root1, man1, srcs1} : Up.Co}
{again(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1), tip, root1, nar1, man1,
srcs1, br), g, rs, only, hub)
== M1.still(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1), tip, root1, nar1,
man1, srcs1, br),
fsays(again(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1), tip, root1,
nar1, man1, srcs1, br), g, rs, only, hub))) : Up.Fate}
{again(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1),
Up.Moved{tip, root1, nar1, man1, srcs1}, br), g, rs, only, hub)
== M1.still(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1),
Up.Moved{tip, root1, nar1, man1, srcs1}, br),
fsays(again(Up.dep.hub(hb, M.Dep{hn, hh, he, M.Git{url, r0, tg, rt0, nr0, vd}}, Up.hash.of(man1),
Up.Moved{tip, root1, nar1, man1, srcs1}, br), g, rs, only, hub))) : Up.Fate}

def a.hub(
hb,
Expand Down Expand Up @@ -2684,7 +2684,7 @@ law hub_back:
for manifest: String
for srcs: List<&2, String>
for +branch: String
{M1.back(Up.dep.hub(hubbed, dep, hash, rev, root, nar, manifest, srcs, branch), dep) == dep : M.Dep}
{M1.back(Up.dep.hub(hubbed, dep, hash, Up.Moved{rev, root, nar, manifest, srcs}, branch), dep) == dep : M.Dep}

def hub_back(hubbed, dep, hash, rev, root, nar, manifest, srcs, branch):
match hubbed:
Expand Down
2 changes: 1 addition & 1 deletion proofs/lemmas/UpgradeKeeps.bend
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ law st.hub:
for +man: String
for srcs: List<&2, String>
for +br: String
st.fate(Up.dep.hub(hb, M.Dep{hn, hh, he, src}, hash, r, root2, nar2, man, srcs, br),
st.fate(Up.dep.hub(hb, M.Dep{hn, hh, he, src}, hash, Up.Moved{r, root2, nar2, man, srcs}, br),
M.Dep{hn, hh, he, src})

def st.hub(hb, _hn, _hh, _he, src, _hash, _r, _root2, _nar2, _man, _srcs, _br):
Expand Down
2 changes: 1 addition & 1 deletion proofs/lemmas/UpgradeKeepsNames.bend
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ law hub_name:
for manifest: String
for srcs: List<&2, String>
for +branch: String
{fate.name(Up.dep.hub(hubbed, dep, hash, rev, root, nar, manifest, srcs, branch), M.dep.name(dep))
{fate.name(Up.dep.hub(hubbed, dep, hash, Up.Moved{rev, root, nar, manifest, srcs}, branch), M.dep.name(dep))
== M.dep.name(dep) : String}

def hub_name(hubbed, dep, hash, rev, root, nar, manifest, srcs, branch):
Expand Down
10 changes: 6 additions & 4 deletions proofs/lemmas/UpgradeMoves.bend
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ law mv.ok_hub:
for +man: String
for srcs: List<&2, String>
for e: {Up.onward(rs, Up.Above{url, rev, r}) == Up.Asc{True{}} : Up.Asc}
{mv.ok(Up.dep.hub(hb, mv.git(hn, hh, he, url, rev, tag, root, nar, vend), hash, r, root2,
nar2, man, srcs, br), Up.At{r, tg, br}, rs, mv.git(hn, hh, he, url, rev, tag, root, nar, vend))
{mv.ok(Up.dep.hub(hb, mv.git(hn, hh, he, url, rev, tag, root, nar, vend), hash,
Up.Moved{r, root2, nar2, man, srcs}, br), Up.At{r, tg, br}, rs,
mv.git(hn, hh, he, url, rev, tag, root, nar, vend))
== True{} : Bool}

def mv.ok_hub(
Expand Down Expand Up @@ -1192,8 +1193,9 @@ law mv.live_hub:
for +nar2: String
for +man: String
for srcs: List<&2, String>
{mv.live(Up.dep.hub(hb, mv.git(hn, hh, he, url, rev, tag, root, nar, vend), hash, tip, root2,
nar2, man, srcs, br), tip, mv.git(hn, hh, he, url, rev, tag, root, nar, vend)) == True{} : Bool}
{mv.live(Up.dep.hub(hb, mv.git(hn, hh, he, url, rev, tag, root, nar, vend), hash,
Up.Moved{tip, root2, nar2, man, srcs}, br), tip,
mv.git(hn, hh, he, url, rev, tag, root, nar, vend)) == True{} : Bool}

def mv.live_hub(
hb,
Expand Down
2 changes: 1 addition & 1 deletion src/add/run.bend
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def loop.step(st: AR.Next, +lib: String, world: AR.World, go: AR.World -> IO(Uni
# import graph, as `ez lock` does (`Run.rounds`). This is only a guard against
# a planner that keeps asking, and running out of it dies loudly.
def rounds() -> Nat:
U32.to_nat(100000)
100000n

# the loop, under fuel. Every round adds an answer, since the planner never
# asks what the World answers already, so the fuel is only a guard.
Expand Down
2 changes: 1 addition & 1 deletion src/check/framing.bend
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def loop.on(state: Run, rest: Listener -> IO(Unit)) -> IO(Unit):
# Bend has no unbounded loop, so "forever" is a count no test run will reach, a
# thousand runs of a thousand connections; a server has no input to size it by.
def thousand() -> Nat:
U32.to_nat(1000)
1000n

# connections served for as long as the fuel lasts. Bend has no unbounded loop,
# so "forever" is a count no test run will reach: a thousand runs of a thousand
Expand Down
4 changes: 0 additions & 4 deletions src/check/kit.bend
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ def say(ok: Bool, name: String, got: String, want: String) -> IO(Unit):
# passes when two strings are equal
def eq_str(name: String, +got: String, +want: String) -> IO(Unit):
say(String.eq(got, want), name, got, want)

# passes when two U32 are equal
def eq_u32(name: String, got: U32, want: U32) -> IO(Unit):
eq_str(name, U32.show(got), U32.show(want))
2 changes: 1 addition & 1 deletion src/check/oracle.bend
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def loop.on(state: Run, dir: String, rest: String -> Listener -> IO(Unit)) -> IO
# Bend has no unbounded loop, so "forever" is a count no test run will reach, a
# thousand runs of a thousand connections; a server has no input to size it by.
def thousand() -> Nat:
U32.to_nat(1000)
1000n

# connections served for as long as the fuel lasts. Bend has no unbounded loop,
# so "forever" is a count no test run will reach: a thousand runs of a thousand
Expand Down
Loading
Loading