tests: audit task argument identities and source error boundaries
This commit is contained in:
1 parent
fd92604f36
commit
2742867ef7
18 files changed
+344
-20
No files matched your search
@@ -101,6 +101,40 @@
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "Source does not declare an AIR features header; lowering generates its closure."
|
||||
},
|
||||
"phase0/reject/duplicate_function.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "A duplicate function declaration rejects before AIR with the duplicate_declaration reason registered by spec 15 \u00a710 in reference/error-codes.md.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_duplicate_function.aji",
|
||||
"codes": [
|
||||
"E7006"
|
||||
],
|
||||
"fields": {
|
||||
"name": "f",
|
||||
"reason": "duplicate_declaration"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase0/reject/literal_out_of_range.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "The integer literal 256 cannot fit u8; source checks its typed range before AIR under the general source-decided type rule.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_literal_out_of_range.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"type": "u8",
|
||||
"literal": "256"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase0/reject/lossy_widen.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
@@ -125,6 +159,22 @@
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
"rule": "Block terminators are generated, and malformed lowered CFG is a compiler defect."
|
||||
},
|
||||
"phase0/reject/non_exhaustive_enum_switch.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a76/\u00a710",
|
||||
"rule": "An enum match missing a variant is E7004 in source; lowered invalid CFG would be E7900, not a source E5002.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/layer2/reject/not_exhaustive.aji",
|
||||
"codes": [
|
||||
"E7004"
|
||||
],
|
||||
"fields": {
|
||||
"missing": "State::Done"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase0/reject/operand_type_mismatch.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
@@ -160,6 +210,23 @@
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "This legacy heap header now rejects missing_dependency (capabilities), not a reserved feature. Source generates the full dependency closure and cannot spell the faulty header."
|
||||
},
|
||||
"phase0/reject/return_type_mismatch.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "u64 cannot be returned from a u32 function; this type-decided error is E7005.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_return_type_mismatch.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"expected": "u32",
|
||||
"found": "u64"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase0/reject/terminator_mid_block.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
@@ -171,6 +238,11 @@
|
||||
"spec": "docs/spec/08-verifier.md",
|
||||
"rule": "The same deterministic budget is exceeded, with identical limit/max/found/type facts."
|
||||
},
|
||||
"phase0/reject/undefined_value.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71/\u00a710",
|
||||
"rule": "An undefined SSA operand is malformed generated AIR and becomes E7900. Source unknown-name resolution is a different rule, not an undefined SSA operation."
|
||||
},
|
||||
"phase0/reject/unknown_block.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
@@ -201,6 +273,23 @@
|
||||
"spec": "docs/spec/15-source-language.md \u00a75/\u00a719",
|
||||
"rule": "Borrow-typed branch block arguments require reserved borrow_joins. Source binds borrows only with ref/mut, never in an assignable var, and forbids yielding them from blocks/if/match; branches may return directly. Region allocation outcome parameters do not request borrow_joins."
|
||||
},
|
||||
"phase1/reject/borrow_in_struct.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "A borrow constructor in a struct field violates member-position rules; source rejects E7005. Content width u8/u64 does not decide this rule.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/type_positions/field.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"position": "member",
|
||||
"type_constructor": "ref"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase1/reject/borrow_not_ended.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
@@ -293,6 +382,22 @@
|
||||
"spec": "docs/spec/08-verifier.md",
|
||||
"rule": "The same deterministic budget is exceeded, with identical limit/max/found/type facts."
|
||||
},
|
||||
"phase1/reject/zero_enum.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a74/\u00a710",
|
||||
"rule": "zero initialization requires a zeroable type; an enum rejects with registered zero_not_zeroable.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_zero_enum.aji",
|
||||
"codes": [
|
||||
"E7006"
|
||||
],
|
||||
"fields": {
|
||||
"reason": "zero_not_zeroable"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/alloc_without_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -305,6 +410,22 @@
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a710.5",
|
||||
"rule": "own.new receives cap<fs.read> instead of mem.alloc authority; ok consumes the owner and err returns normally."
|
||||
},
|
||||
"phase2/reject/capability_not_zeroable.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a74/\u00a710",
|
||||
"rule": "A struct containing capability authority cannot be zero initialized, using zero_not_zeroable.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/reject_twins/analogue_capability_not_zeroable.aji",
|
||||
"codes": [
|
||||
"E7006"
|
||||
],
|
||||
"fields": {
|
||||
"reason": "zero_not_zeroable"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/flat_effects.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -409,6 +530,23 @@
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a79.3",
|
||||
"rule": "A call lacks the callee io.write effect; callee identities may differ but declared effect sets agree."
|
||||
},
|
||||
"phase2/reject/unknown_effect.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "An unregistered effect atom rejects E7002 before the function body; the source position is the function start.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/effect_names/ordinary_unused.aji",
|
||||
"codes": [
|
||||
"E7002"
|
||||
],
|
||||
"fields": {
|
||||
"name": "unknown",
|
||||
"effect": "unknown"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase2/reject/unsafe_call_from_safe.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -445,6 +583,23 @@
|
||||
"task.join.cancel": 2
|
||||
}
|
||||
},
|
||||
"phase3/reject/channels_borrow_element.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "A channel element cannot contain a borrow. Source checks the constructor type argument once (E7005), while AIR rejects both annotated endpoint parameters (two E1001); this is an analogue, not a same-code/count twin.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/typecheck/channel_borrow_element.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"position": "member",
|
||||
"type_constructor": "ref"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase3/reject/channels_receiver_leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -496,12 +651,41 @@
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a734",
|
||||
"rule": "The parent indexes an exclusive slice lent to an unjoined task; raw borrow.index/load errors share one source location."
|
||||
},
|
||||
"phase3/reject/tasks_borrow_return.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a719",
|
||||
"rule": "The specific source rule rejects passing a borrow-returning function to task.spawn with E7006 at the spawn, while AIR retains the reserved task_borrow_returns gate.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/borrow_returns/spawn_return.aji",
|
||||
"codes": [
|
||||
"E7006"
|
||||
],
|
||||
"fields": {
|
||||
"function": "first",
|
||||
"reason": "invalid_borrow_return"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase3/reject/tasks_end_lent_borrow.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md",
|
||||
"rule": "The lent borrow is ended while its task remains unjoined; the creating spawn is retained."
|
||||
},
|
||||
"phase3/reject/tasks_not_send.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a735",
|
||||
"rule": "An exclusive borrow of a live task handle is lent to another task although mut<task<u8>> is not Send; the second task is joined before the borrow ends and the original task is joined last."
|
||||
},
|
||||
"phase3/reject/tasks_not_share.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a735",
|
||||
"rule": "A shared borrow of a region is lent to a task although region is not Share. Worker and argument spellings are identities; the complete rejected parameter type and argument role agree."
|
||||
},
|
||||
"phase3/reject/tasks_same_mut_twice.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -568,6 +752,12 @@
|
||||
"load": 1
|
||||
}
|
||||
},
|
||||
"phase4/reject/island_lend_task.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a735",
|
||||
"rule": "A shared borrow of an island is lent to a task although its mutable graph is not Share. Worker and argument spellings are identities; the complete rejected parameter type and argument role agree."
|
||||
},
|
||||
"phase4/reject/island_two_mut.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
|
||||
Reference in new issue
Block a user