tests: extend rejection twins across public semantic features
This commit is contained in:
1 parent
272aebfd32
commit
06d8a1a76a
32 files changed
+396
-22
No files matched your search
@@ -1,6 +1,50 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cases": {
|
||||
"buffers/empty_free_leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a726",
|
||||
"rule": "The buffer returned on buffer.free failure is left live at return, regardless of runtime reachability of that outcome.",
|
||||
"required_ops": {
|
||||
"buffer.free": 1
|
||||
}
|
||||
},
|
||||
"buffers/view_mutation.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a726",
|
||||
"rule": "buffer.reserve mutates a buffer with a live buffer.view child; the view is used afterwards."
|
||||
},
|
||||
"generics/recursive_array.air": {
|
||||
"kind": "same_code",
|
||||
"site": "declaration",
|
||||
"spec": "docs/spec/15-source-language.md \u00a715",
|
||||
"rule": "The non-generic Node recursively contains an array of itself by value, retaining E1003 before source lowering.",
|
||||
"lowering": "rejected"
|
||||
},
|
||||
"linear/field.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a725",
|
||||
"rule": "struct.get projects a linear owning field instead of whole unpacking or borrowed exchange."
|
||||
},
|
||||
"linear/leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a725",
|
||||
"rule": "Whole struct.unpack discards an owning field that remains live at return.",
|
||||
"required_ops": {
|
||||
"struct.unpack": 1
|
||||
}
|
||||
},
|
||||
"nominal_queries/cycle.air": {
|
||||
"kind": "same_code",
|
||||
"site": "declaration",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
"rule": "The N0 through N40 by-value cycle is rejected as E1003 at N0 before source lowering. Pure by-value cycles retain E1003 (Q-043/Q-044; AIR type rules in spec 07).",
|
||||
"lowering": "rejected"
|
||||
},
|
||||
"phase0/reject/block_argument_type.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a71",
|
||||
@@ -230,6 +274,12 @@
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md",
|
||||
"rule": "own.new lacks mem.alloc; the missing effect and complete suggested list agree."
|
||||
},
|
||||
"phase2/reject/intrinsic_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a79.3",
|
||||
"rule": "fs.open_read lacks the explicit fs.read effect; intrinsic, effect and complete suggested_effects agree."
|
||||
},
|
||||
"phase2/reject/own_free_while_borrowed.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -302,12 +352,24 @@
|
||||
"spec": "docs/spec/06-resources-and-errors.md",
|
||||
"rule": "A closed/freed resource is borrowed again."
|
||||
},
|
||||
"phase2/reject/unsafe_call_from_safe.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/13-contracts-and-unsafe.md \u00a76",
|
||||
"rule": "A safe function calls an effects [unsafe] function without an unsafe or trusted boundary."
|
||||
},
|
||||
"phase2/reject/unsafe_outside_boundary.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/13-contracts-and-unsafe.md \u00a76",
|
||||
"rule": "borrow.index.unchecked occurs outside an unsafe or trusted function."
|
||||
},
|
||||
"phase2/reject/wrong_capability_kind.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a710.5",
|
||||
"rule": "fs.create receives cap<fs.read> instead of required cap<fs.write>; expected/found authority facts agree."
|
||||
},
|
||||
"phase3/reject/cancel_join_keeps_loans.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -332,6 +394,12 @@
|
||||
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
|
||||
"rule": "A channel receiver remains unclosed at return after its sender is closed. The source success arm passes through a single-predecessor match join; the allocation failure arm traps."
|
||||
},
|
||||
"phase3/reject/channels_recv_without_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a737.4/\u00a738",
|
||||
"rule": "channel.recv lacks task.wait on a borrowed receiver parameter; no allocation adds another missing effect."
|
||||
},
|
||||
"phase3/reject/sync_call_waiting_function.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -344,6 +412,12 @@
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a741",
|
||||
"rule": "A second mutex.lock may wait while the first guard is held."
|
||||
},
|
||||
"phase3/reject/sync_take_while_borrowed.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a740",
|
||||
"rule": "mutex.take consumes a mutex with a live shared borrow, retaining that borrow as the related conflict."
|
||||
},
|
||||
"phase3/reject/sync_wait_while_locked.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -374,42 +448,152 @@
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a733",
|
||||
"rule": "A task scope ends while a child task remains unjoined."
|
||||
},
|
||||
"phase3/reject/tasks_spawn_without_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a733",
|
||||
"rule": "task.spawn lacks the explicit task.spawn effect; the selected missing effect and complete suggested list agree."
|
||||
},
|
||||
"phase4/reject/arc_content_mutex.air": {
|
||||
"kind": "same_code",
|
||||
"site": "block",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a724",
|
||||
"rule": "An arc result contains mutex<u64>, which is Share but not ArcSafe."
|
||||
},
|
||||
"phase4/reject/arc_release_twice.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md",
|
||||
"rule": "The same resource is consumed twice."
|
||||
},
|
||||
"phase4/reject/frozen_borrow_mut.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a78",
|
||||
"rule": "A frozen graph provides immutable access only; source rejects mut frozen.at with E7005 before a store is generated.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/layer9/reject/frozen_mut.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase4/reject/frozen_leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a723",
|
||||
"rule": "An owned frozen graph reaches return without frozen.release."
|
||||
},
|
||||
"phase4/reject/island_content_owner.air": {
|
||||
"kind": "same_code",
|
||||
"site": "block",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a722",
|
||||
"rule": "An island result contains own<u64>, a foreign mutable edge forbidden by IslandSafe."
|
||||
},
|
||||
"phase4/reject/island_destroy_while_borrowed.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a722",
|
||||
"rule": "island.destroy invalidates a live container borrow and its child object borrow; the child is used afterwards.",
|
||||
"required_ops": {
|
||||
"island.borrow": 1,
|
||||
"load": 1
|
||||
}
|
||||
},
|
||||
"phase4/reject/island_two_mut.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a722",
|
||||
"rule": "A second mutable object borrow is created through the same island, using a different iref."
|
||||
},
|
||||
"phase4/reject/island_use_after_freeze.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md",
|
||||
"rule": "An island is borrowed after freezing transferred its ownership."
|
||||
},
|
||||
"phase4/reject/island_use_after_send.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a722",
|
||||
"rule": "An island is borrowed after successful channel.send transferred its ownership."
|
||||
},
|
||||
"phase4/reject/islands_not_declared.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The missing AIR feature header cannot be authored in source, whose lowering generates the full dependency closure."
|
||||
},
|
||||
"phase5/reject/cmpxchg_failure_release.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md",
|
||||
"rule": "The same atomic operation rejects the same ordering and allowed set."
|
||||
},
|
||||
"phase5/reject/cmpxchg_failure_stronger.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a724.1",
|
||||
"rule": "atomic.cmpxchg.relaxed.acquire uses failure ordering acquire, stronger than the success ordering relaxed."
|
||||
},
|
||||
"phase5/reject/fence_relaxed.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md",
|
||||
"rule": "The same atomic operation rejects the same ordering and allowed set."
|
||||
},
|
||||
"phase5/reject/island_content.air": {
|
||||
"kind": "same_code",
|
||||
"site": "block",
|
||||
"spec": "docs/spec/03-memory-model.md \u00a722",
|
||||
"rule": "An island result contains atomic<u64>, a foreign mutable edge forbidden by IslandSafe."
|
||||
},
|
||||
"phase5/reject/leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a723",
|
||||
"rule": "An atomic cell reaches return without being taken, moved or returned."
|
||||
},
|
||||
"phase5/reject/load_release.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md",
|
||||
"rule": "The same atomic operation rejects the same ordering and allowed set."
|
||||
},
|
||||
"phase5/reject/missing_atomic_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a713",
|
||||
"rule": "atomic.load.seq_cst lacks atomic; atomic.new and atomic.take require no effect."
|
||||
},
|
||||
"phase5/reject/missing_weak_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a713",
|
||||
"rule": "atomic.load.acquire lacks atomic.weak; the complete suggested effects are [atomic, atomic.weak]."
|
||||
},
|
||||
"phase5/reject/mut_operand.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a712",
|
||||
"rule": "Atomic cells require shared ref access; spelling a mutable cell borrow is E7005 in source.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/layer10/reject/mut_borrow.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"name": "c"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phase5/reject/not_declared.air": {
|
||||
"kind": "air_only",
|
||||
"spec": "docs/spec/15-source-language.md \u00a79",
|
||||
"rule": "The missing AIR feature header cannot be authored in source, whose lowering generates the full dependency closure."
|
||||
},
|
||||
"phase5/reject/store_acquire.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
@@ -421,6 +605,40 @@
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md",
|
||||
"rule": "The same owning-resource consumption or whole-place borrow conflicts with a live borrow."
|
||||
},
|
||||
"phase5/reject/take_while_lent.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/04-concurrency-and-atomics.md \u00a728",
|
||||
"rule": "atomic.take consumes a cell while a borrow of it is lent to a live task."
|
||||
},
|
||||
"phase5/reject/u128_cell.air": {
|
||||
"kind": "source_error",
|
||||
"spec": "docs/spec/15-source-language.md \u00a710",
|
||||
"rule": "A 128-bit integer cannot be atomic cell content; this source-decided type error uses E7005.",
|
||||
"analogues": [
|
||||
{
|
||||
"source": "source/layer10/reject/wide_cell.aji",
|
||||
"codes": [
|
||||
"E7005"
|
||||
],
|
||||
"fields": {
|
||||
"found": "u128"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"static_functions/missing_effect.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/05-effects-and-capabilities.md \u00a79.3",
|
||||
"rule": "A call to selected lacks io.write; source supplies that same function through an explicit static parameter with its declared contract."
|
||||
},
|
||||
"static_functions/owner_leak.air": {
|
||||
"kind": "same_code",
|
||||
"site": "instruction",
|
||||
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
|
||||
"rule": "selected returns without consuming its owning parameter; source also invokes it through explicit specialization."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user