cli: validate exclusive source places before AIR

This commit is contained in:
dev committed 2026-10-08 12:37:22 +03:00
1 parent dcd5f1f702
commit 41f3afbf05
54 files changed
+541 -2

No files matched your search

@@ -0,0 +1,9 @@
// expect: reject E2101
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: mut<Pair>) -> void effects [] { ref q = p; p.a = 42u64; assert(q.a == 42u64); }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(s: slice<u64>) -> void effects [] { s[true] = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn main() -> u64 effects [] { let x = Pair { a: 0u64 }; x.a = 42u64; return x.a; }
@@ -0,0 +1,9 @@
// expect: reject E1001
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: mut<own<u64>>, v: own<u64>) -> void effects [] { *p = move v; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn unused(p: ref<[u64; 2]>) -> void effects [] { write(mut p); }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn update(p: mut<[u64; 2]>) -> void effects [] { write(mut p); }
fn main() -> u64 effects [] { var x: [u64; 2] = [0u64; 2]; update(mut x); return x[0]; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(p: mut<[u64; 2]>) -> void effects [] { mut q = p; q[0] = 42u64; }
fn main() -> u64 effects [] { var x: [u64; 2] = [0u64; 2]; update(mut x); return x[0]; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<[u64; 2]>) -> void effects [] { mut q = *p; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<Box>) -> void effects [] { mut q = p.data; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<u64>) -> void effects [] { mut q = p; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(p: mut<u64>) -> void effects [] { *p = 42u64; }
fn main() -> u64 effects [] { var x: u64 = 0u64; update(mut x); return x; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(p: mut<Pair>) -> void effects [] { p.a = 42u64; }
fn main() -> u64 effects [] { var x: Pair = Pair { a: 0u64 }; update(mut x); return x.a; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn unused(p: ref<Data>) -> void effects [] { write(mut p.a); }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<Pair>) -> void effects [] { mut q = p.a; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice<u64>) -> void effects [] { mut q = s[0]; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(p: mut<Box>) -> void effects [] { { mut q = p.pair.a; *q = 21u64; } { mut q = p.data; q[0] = 21u64; } }
fn main() -> u64 effects [] { var x: Box = Box { pair: Pair { a: 0u64 }, data: [0u64; 2] }; update(mut x); return x.pair.a + x.data[0]; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(p: slice_mut<u64>) -> void effects [] { mut q = p[0..1]; q[0] = 42u64; }
fn main() -> u64 effects [] { var x: [u64; 2] = [0u64; 2]; update(mut x); return x[0]; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn unused(p: slice<u64>) -> void effects [] { write(mut p[0..1]); }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice<u64>) -> void effects [] { mut q = s[0..1]; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn unused(p: ref<[u64; 2]>) -> void effects [] { mut q = p[0..1]; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn update(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn main() -> u64 effects [] { var x: [u64; 2] = [0u64; 2]; update(mut x); return x[0]; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice<u64>) -> void effects [] { mut q = s; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice_mut<u64>) -> void effects [] { *s = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Data { a: [u64; 2] }
fn write(s: slice_mut<u64>) -> void effects [] { s[0] = 42u64; }
fn unused(p: slice<u64>) -> void effects [] { mut unchecked q = p[0]; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// grant: heap=mem.alloc:128
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] { let x = own.array(2usize, 0u64, heap) or trap; x[0] = 42u64; let n = x[0]; own.free(move x); return n; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// grant: heap=mem.alloc:128
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] { let x = own.new(0u64, heap) or trap; { mut p = x; *p = 42u64; } return own.take(move x); }
@@ -0,0 +1,9 @@
// expect: reject E7006
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: Pair) -> void effects [] { p.a = 42u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: ref<u64>) -> void effects [] { *p = stop(); }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: ref<u64>) -> void effects [] { *p = true; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7002
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: ref<u64>) -> void effects [] { *p = missing; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<[u64; 2]>) -> void effects [] { p[0] = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<Box>) -> void effects [] { p.data[0] = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<u64>) -> void effects [] { *p = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<Pair>) -> void effects [] { p.a = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused() -> void effects [] { var x: u64 = 0u64; ref p = x; *p = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused() -> void effects [] { var x: Pair = Pair { a: 0u64 }; ref p = x; p.a = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused() -> void effects [] { var x: [u64; 2] = [0u64; 2]; ref s = x; s[0] = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,6 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
fn unused(p: ref<[u64; 2]>) -> void effects [] { mut q = p; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: ref<Box>) -> void effects [] { p.pair.a = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,7 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] { let x = own.array(2usize, 0u64, heap) or trap; { ref s = x; s[0] = 1u64; } own.free(move x); return 42; }
@@ -0,0 +1,9 @@
// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5/§10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn read(p: mut<Box>) -> u64 effects [] { ref q = p.data; return q[0]; }
fn main() -> u64 effects [] { var x: Box = Box { pair: Pair { a: 0u64 }, data: [42u64; 2] }; return read(mut x); }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(p: mut<Pair>) -> void effects [] { ref q = p; q.a = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice<u64>) -> void effects [] { s[0] = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,8 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn unused(s: slice<u64>) -> void effects [] { *s = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7002
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: ref<Pair>) -> void effects [] { p.missing = 1u64; }
fn main() -> u64 effects [] { return 42; }
@@ -0,0 +1,9 @@
// expect: reject E7006
// phase: 6
// spec: docs/spec/15-source-language.md §10
module test.store_modes
struct Pair { a: u64 }
struct Box { pair: Pair, data: [u64; 2] }
fn stop() -> never effects [] { trap; }
fn unused(p: ref<[u64; 2]>) -> void effects [] { *p = [1u64; 2]; }
fn main() -> u64 effects [] { return 42; }
+121
View File
@@ -0,0 +1,121 @@
#!/usr/bin/env python3
"""Source access modes, exact diagnostics and preserved execution/lowering."""
import json
from pathlib import Path
import subprocess
import tempfile
REPO = Path(__file__).resolve().parents[2]
AJI = REPO / 'zig-out/bin/aji'
CORPUS = REPO / 'tests/conformance/source/store_modes'
checks = 0
def cli(*args, code=0):
global checks
result = subprocess.run([str(AJI), *map(str, args)], capture_output=True, text=True)
assert result.returncode == code, (args, result.returncode, result.stdout, result.stderr)
checks += 1
return result.stdout
def reject(path, token, expected, found, *args, expected_file=None):
error = json.loads(cli('check', *args, code=1))
assert (error['code'], error['expected'], error['found']) == ('E7005', expected, found), error
lines = path.read_text().splitlines()
line = next(i for i, text in enumerate(lines, 1) if token in text and text.startswith('fn '))
assert (error['file'], error['line'], error['col']) == (
expected_file or str(path), line, lines[line - 1].rindex(token) + 1), error
assert 'air_line' not in error and 'air_col' not in error, error
for command in ('lower', 'run', 'report', 'explore'):
assert json.loads(cli(command, *args, code=1)) == error
for name, token in (
('shared_deref', '*p'), ('shared_field', 'p.a'),
('shared_nested_field', 'p.pair.a'), ('shared_slice', 's[0]'),
('shared_array', 'p[0]'), ('shared_array_field', 'p.data[0]'),
('shared_local', '*p'), ('shared_local_field', 'p.a'),
('shared_local_slice', 's[0]'), ('shared_reborrow', 'q.a'),
('shared_own_array', 's[0]'), ('mut_binding', 'p;'),
('mut_field_binding', 'p.a'), ('mut_index_binding', 's[0]'),
('mut_unchecked_binding', 'p[0]'),
):
path = CORPUS / f'{name}.aji'
reject(path, token, 'mut<u64>', 'ref<u64>', path)
for name, token in (
('shared_mut_array_binding', 'p;'), ('mut_array_deref_binding', '*p'),
('mut_array_field_binding', 'p.data'), ('mut_array_argument', 'mut p'),
('mut_field_argument', 'mut p.a'),
):
path = CORPUS / f'{name}.aji'
reject(path, token, 'mut<array<u64, 2>>', 'ref<array<u64, 2>>', path)
for name, token in (
('mut_slice_binding', 's;'), ('mut_range_binding', 's[0..1]'),
('mut_range_argument', 'mut p[0..1]'), ('mut_ref_array_range', 'p[0..1]'),
):
path = CORPUS / f'{name}.aji'
reject(path, token, 'slice_mut<u64>', 'slice<u64>', path)
for name, found in (('slice_deref', 'slice<u64>'), ('mut_slice_deref', 'slice_mut<u64>')):
path = CORPUS / f'{name}.aji'
reject(path, '*s', 'mut<u64>', found, path)
# RHS evaluation still precedes target borrowing; linear/alias restrictions
# remain AIR diagnostics when the place already has the required mode.
for name, code, fields in (
('rhs_never', 'E7005', {'expected': 'u64', 'found': 'never'}),
('rhs_unknown', 'E7002', {'name': 'missing'}),
('whole_array', 'E7006', {'reason': 'invalid_assignment'}),
('unknown_field', 'E7002', {'field': 'missing'}),
('bad_index', 'E7005', {'expected': 'usize', 'found': 'bool'}),
('linear_store', 'E1001', {}), ('alias_store', 'E2101', {}),
('parameter_place', 'E7006', {'reason': 'invalid_place'}),
):
error = json.loads(cli('check', CORPUS / f'{name}.aji', code=1))
assert error['code'] == code, error
assert all(error[key] == value for key, value in fields.items()), error
if code in ('E1001', 'E2101'):
assert 'air_line' in error, error
with tempfile.TemporaryDirectory(prefix='aji-store-modes-') as directory:
root = Path(directory)
for source in sorted(CORPUS.glob('*.aji')):
formatted = root / source.name
formatted.write_text(cli('fmt', source))
cli('fmt', '--check', formatted)
assert cli('fmt', formatted) == formatted.read_text()
if '// expect: run' not in source.read_text():
continue
air = cli('lower', source)
assert cli('lower', formatted) == air
raw = root / f'{source.stem}.air'
raw.write_text(air)
cli('check', raw)
grants = ['--grant', 'heap=mem.alloc:128'] if 'heap: cap' in source.read_text() else []
record = json.loads(cli('run', '--fuel', '100000', *grants, source))
assert record['value'] == 42, record
assert json.loads(cli('run', '--fuel', '100000', *grants, raw)) == record
result = root / f'{source.stem}.json'
cli('run', '--profile', 'hosted', '--fuel', '100000', *grants,
'--result-file', result, source)
assert json.loads(result.read_text())['value'] == 42
entry, library, manifest = (root / name for name in ('main.aji', 'places.aji', 'aji.toml'))
manifest.write_text('[package]\nname = "places"\nversion = "1"\nentry = "main.aji"\n'
'[modules]\nlib.places = "places.aji"\n')
entry.write_text('module app\nimport lib.places;\n'
'fn use(p: ref<u64>) -> void effects [] { lib.places.write::<u64>(p, 1u64); }\n'
'fn main() -> u64 effects [] { return 42; }\n')
library.write_text('module lib.places\n'
'fn write<T: Copy>(p: ref<T>, v: T) -> void effects [] { *p = v; }\n')
reject(library, '*p', 'mut<u64>', 'ref<u64>', '--manifest', manifest,
expected_file='places.aji')
library.write_text(library.read_text().replace('p: ref<T>', 'p: mut<T>'))
entry.write_text('module app\nimport lib.places;\n'
'fn main() -> u64 effects [] { var x: u64 = 0u64; lib.places.write::<u64>(mut x, 42u64); return x; }\n')
assert json.loads(cli('run', '--manifest', manifest))['value'] == 42
print(f'store modes CLI integration passed ({checks} checks)')