Skip to content
Skip to content

RCE language specification, draft 0.9

7. Well-formedness: what requires change at entry

This section is the checklist of rules a program must pass to be accepted (well-formedness). Each rule has a name such as W-TY-1, and a program that requires change is reported with the rule it broke. Example: a function declared -> i64 whose body returns text requires change: W-TY-1.

A program requires change if any rule fails. Every diagnostic names its rule.

Lexical and syntax

  • W-LEX-1 Not UTF-8, BOM, bare CR, or a tab character.
  • W-LEX-2 Inconsistent dedent (2.6).
  • W-LEX-3 A literal outside every possible type range, or an invalid \u{}.
  • W-SYN-1 Not in the language of section 3.
  • W-RES-1 A construct that a rule of this document specifies and this implementation does not implement (a reserved word used as its construct, F.12): requires change, with the words reserved, not implemented.

Names and modules

  • W-NAME-1 Unresolved name, or a name resolved in the wrong namespace.
  • W-NAME-2 Duplicate declaration in one scope; shadowing a parameter, field or module-level name inside the same item.
  • W-MOD-1 use of a private item; W-MOD-2 import cycle. The reference checker reports a private name reached through use as W-VIS-1, which is the same rule.
  • W-MOD-3 An import's name (q of use p.q, r of use p.q as r) that clashes with a declaration of the importing module or names two different modules. The items of an imported module are reached only through that name (4.1), so an item never clashes with the importer's items or with another module's, pub or not; use p.q as r resolves a clash.
  • W-SAFE-1 The identifiers unsafe, Rc, Arc, RefCell, transmute, static: requires change, with "memory safety is by construction" (there are no escape hatches in RCE other than the extern boundary of 5.11).
  • W-FFI-1 An extern declaration whose ABI is not "C", that is comptime or generic, or whose parameter or result types break 5.11; or a foreign function's name used other than as the callee of a direct call.

Types

  • W-TY-1 Any typing rule of section 5 fails.
  • W-TY-2 Nested option τ??; borrow of a borrow &&τ; [τ] not behind a borrow; a borrow, region type or fn type inside a data type.
  • W-TY-3 Integer/float mixing without as; implicit narrowing.
  • W-PAT-1 A binding pattern whose name equals a variant in scope.
  • W-MATCH-1 A non-exhaustive match (5.3 [Match]); W-MATCH-2 an unreachable arm (subsumed by earlier unguarded arms).
  • W-PLACE Left side of an assignment or op= is not a mutable place.

Ownership and borrowing

  • W-OWN-1 Use after move (O1). W-OWN-2 Violating [No-Alias-Write] or [No-Mut-Read]. W-OWN-3 Storing, returning (except R-RET) or capturing a borrow. W-REG-1 A region-typed value escaping its with arena block.
  • W-SPAWN-1 Spawning with a borrow or region-typed argument.

The Form

  • W-STATE-1 A state with no fields; W-STATE-2 a field initializer that is not a comptime constant; W-STATE-3 a field type that is not an owned data type.
  • W-STEP-1 A step naming an undeclared region or matching an undeclared event. W-STEP-2 Totality: an event that no step and no actor handler can ever match. W-STEP-3 The arrow form on a region with more than one field. W-STEP-4 Within one region, two unguarded steps whose patterns overlap (the second is unreachable).
  • W-EFF-1 emit, spawn, channel operations or select in a pure fn; reading another region's fields in a step; calling a foreign function anywhere but fn main or a task function.
  • W-REC-1 A cycle in the call graph, including through trait methods after monomorphization, other than a cycle of plain functions (one function calling itself included) whose calls are done by layered summed measures, or each of whose cycles of calls passes through a function declared with bound (6.7); par or for … par in a function of a cycle with a bounded function; bound on an iterator, a foreign function or a trait signature.
  • W-CT-1 Comptime code that calls a non-comptime-safe function or traps or exceeds fuel.
  • W-INT-1 An example or check that does not hold.
  • W-INT-2 (recommended; never requires change) A module with a step and example lines, whose obligations its lookup-table control meets (6.9): rce check admits it and prints the recommendation (10.2).
  • W-LAW-1 A law (6.11) that fails, or that is undecided and not attested (its alphabet is incomplete or the bound LAW_FUEL is reached), or an attest line that is not WHO;YYYY-MM-DD;COVER. The report of a failing law ends with its counterexample as an example line. The trait laws of F.6.6 fall under the same rule once they are implemented.
  • W-MUT-1 An example, check or law that is measured and holds on every in-Form mutant of its reach (6.12): no single edit of the program makes it fail.
  • W-MUT-2 (recommended; never requires change) A mutant of the program that no obligation kills and that rce equiv does not judge equivalent (6.12): rce mutants reports it with its diff and a witness (10.14).
  • W-UI-1 A module that emits frames (Appendix E, HC-29) whose frames do not meet ui.rules: the frames each example's run derives, judged as one trace, leave a success criterion of WCAG 2.2 level A or AA failing or undecided, or they cannot be judged (no example derives a frame, an emitted Frame is not a frame, or judging them exceeds the fuel bound). No example or check line names ui.rules; each finding is one report that names its criterion (E.4f).
  • W-SIMD-1 A lane-wise operator on arrays of different lengths, of an unfixed length, or with non-numeric lanes (5.1).
  • W-GRAPH-1 A tensor operation or a lane-wise operator inside a graph term on operands of shapes it does not take: a matrix product whose inner lengths differ, an operand of the wrong rank, two tensors of different shapes or of shapes that do not broadcast, an attention whose keys and queries differ in width or whose heads do not divide, a reshape that changes the element count, an axis beyond the rank, a list that is not a permutation of the axes, a block format whose length is not a multiple of 32 (6.13, GT-4).
  • W-GRAPH-2 An operand of a graph term that is not a tensor of f32, f64, i8 or i32 with every length at least 1, operands of two element types, an operation of floats on integers, ids that are not i32, a quantized product whose operands are not f32, i8 and f32, a name std.tensor does not define, the wrong number of operands, a labelled operand, an axis, epsilon, shape or permutation that is not a literal of its kind, or a tensor.within bound that is not an integer literal from 1 to 2^31 − 1 (6.13, GT-1 to GT-4).
  • W-GRAPH-3 An operation whose level is weaker than the level in force where it stands, that is, a level the program does not declare: a tensor.round_bf16, tensor.round_q8_0, tensor.round_q4_0, tensor.round_q4_k, tensor.round_q5_k or tensor.round_q6_k outside a tensor.lossy (6.13, GT-3).
  • W-LIN-1 A linear value not consumed exactly once on every path, copied, moved inside a loop, or placed in a collection, field, payload, channel or iterator (5.12).
  • W-DEV-1 A growable value (List, Map, Set, text, slice, channel, iterator) bound in a device region, or emit, spawn, send, select, yield or a foreign call inside one (5.13).
  • W-ITER-1 An iterator function that is not pure or has an arrow body; yield outside an iterator function; an iter τ value used other than as a for operand or .collect() receiver (5.14).
  • W-REF-1 A refined type (5.1) that is generic, refines a type other than an integer type, text or a collection, or whose predicate is outside the decidable fragment (a term other than self, self.len() or an integer literal, an operator other than a comparison, and, or, not, or a call other than a text character class).
  • W-LOOP-1 A LOOP_LIMIT declaration that is not const LOOP_LIMIT: u64 = n with a positive literal n (6.7).
  • W-TRAIT-1 An impl not matching its trait; W-TRAIT-2 incoherent or orphan impls; W-TRAIT-3 a type used with ==, !=, an ordering operator or a generic bound without implementing the trait it needs.

Indexed values (5.16)

  • W-CTX-1 Context text made other than by C.lit of a string literal or C.encode; joined with another context or plain text; carried by an event payload; an unknown context.
  • W-SEC-1 An operator or method on a secret other than ==/!=; a secret in an emitted value, a channel, an error payload or a foreign call.
  • W-CAP-1 A capability outside an event payload field or a parameter; Guarded outside a state field; an authority that is not a declared struct.
  • W-CAP-2 A step that writes a Guarded[τ, A] field on an event without a Cap[A] field. (A declaration named after a 5.16 type or context requires change: W-NAME-2.)

Appendix F (specified and implemented in part, F.12): the rules of F.3 to F.8 under which a text requires change, among them unused values, dropped results and shadowing (F.3), World and information-flow labels (F.4), transactional calls (F.4), capabilities, typed output, pinned builds, constant-time functions and budgets (F.5), and templates, contracts, ghost code, written measures, if let and trait laws (F.6). Their names and rules are listed where each is defined and are not repeated here, so that this list names only rules the reference checker implements.

Concurrency (Appendix C): W-PAR-1 to W-PAR-4, W-DL-1, W-ND-1, W-GRP-1 to W-GRP-3, W-SES-1 to W-SES-5, W-SCOPE-1, W-ATOM-1, W-ATOM-2, W-CRDT-1, W-LVAR-1, W-LVAR-2, W-NODE-1, W-SUP-1, W-SUP-2, W-INTR-1 and W-RT-1.

7.1 How a rule guides a program into Form

Each rule of this section, of Appendix C and of Appendix F guides a program that does not meet it into Form by exactly one of three methods:

  • Altered. The rule has one rewrite, determined by the text, that keeps the program's meaning. rce fmt FILE writes it and rce fmt check FILE lists it (10.6). Until it is written the text requires change, and rce check ends the report with [altered by rce fmt] (10.2). A rewrite that would add or change another report is not written; rce fmt then prints the report as requiring change.
  • Recommended. The program is admitted, and rce check prints a recommended line that names the rule and the change (10.2); for W-MUT-2, which needs every mutant judged, rce mutants prints it (10.14). A recommended rule has no rewrite to write, so it is reported and never applied, and it has no mode.
  • Requires change. The program is not admitted until its author changes it, because the change has more than one reading or states something only the author can state (a type, a declaration, a bound, an authority). rce check ends the report with [requires change].

A rule is altered only when the reference rce fmt writes its rewrite. The table gives every rule its method; the checker reads it from spec/data/spec-data.json (w_methods), and tests/three_methods.rs checks that every rule of the three lists has exactly one row and that the altered rows are the rules rce fmt rewrites. Name independence (T7, section 8) is the ground of a rewrite that renames.

Modes of the altered rules (RM-1 to RM-3). Every rule whose method is altered has one mode, given by the second table below: off, observe or auto. A mode is part of the rule set, which is data: the checker reads it from spec/data/spec-data.json (w_modes), and no program text, comment or command word sets it. Example: W-UNUSED-1 is auto, so rce fmt renames an unread b to _b; were it observe, rce fmt would print that rename as a diff and leave the file as it is.

  • RM-1 (modes belong to altered rules). Only a rule whose method is altered has a mode. A rule that requires change has none, so no table, program or command can switch it off; a recommended rule is already reported and never applied, which is what observe adds to an altered rule. tests/rule_modes.rs checks that the modes table names exactly the altered rules.
  • RM-2 (what each mode does). auto: the rewrite is written by rce fmt (10.6), and until it is written the text requires change ([altered by rce fmt], 10.2). observe: rce fmt, and every path that applies altered rules, records each rewrite it would write as a canonical diff with its rule, in a deterministic report, and changes nothing; the report does not block admission, and rce check prints it as an observed line. off: the rule is not judged and nothing is printed. The rewrites of the observe rules are worked out on the text as the auto rewrites leave it, so applying the recorded diffs in order gives the text that auto would write for those rules after the others.
  • RM-3 (promotion is a change of the rule set). A rule that becomes altered enters the modes table as observe (the checker reads an altered rule with no row as observe), and is promoted to auto once the recorded rewrites have been reviewed. A change of mode is a change of the modes table, so it changes the rule-set hash that every admission receipt records (10.15): a receipt written before a promotion reports the rule as changed, and whether the program is still admitted.
Rule Mode Reason
W-UNUSED-1 auto Altered before modes existed; auto keeps what rce fmt writes, and the rename carries no meaning (T7).
W-DROP-1 auto Altered before modes existed; auto keeps what rce fmt writes, and let _ = e evaluates e as the statement did.

What needs a person (AC-1). A finding needs a person when it requires change or is recommended; an alteration written by rce fmt and one recorded in observe mode need none until someone reads the record. Every run of rce check and rce fmt ends with one deterministic line on standard error that counts them, attention: R requires change, C recommended, A altered, O observed: R the findings that require change (one per report), C the recommended findings, A the rewrites written and O the rewrites recorded in observe mode (or, for rce check, the reports of rules in observe mode). The exit status is 1 exactly when R is not 0. A recommended finding, an alteration written and one recorded never change it.

Rule Method Reason
W-LEX-1 requires change A tab, a bare CR or bytes that are not UTF-8 have more than one reading (an indentation width, a line end, an encoding).
W-LEX-2 requires change An inconsistent dedent has two block readings.
W-LEX-3 requires change The type or the character the literal was meant to name is the author's.
W-SYN-1 requires change A text outside the grammar of section 3 has no one reading.
W-RES-1 requires change The construct is specified and not implemented; the author writes it with implemented constructs.
W-NAME-1 requires change The author declares or imports the name, or names another.
W-NAME-2 requires change Which declaration takes another name, and which name, is the author's choice.
W-MOD-1 requires change A module's pub surface is its owner's to change.
W-VIS-1 requires change It is the checker's name for W-MOD-1.
W-MOD-2 requires change Which import breaks the cycle is the author's choice.
W-MOD-3 requires change Which name changes is the author's choice.
W-SAFE-1 requires change Each identifier has several forms in RCE (an owned value, a state field, the extern boundary).
W-FFI-1 requires change A foreign boundary is declared by its author.
W-TY-1 requires change A typing rule that fails has no one repair.
W-TY-2 requires change The type that replaces the nested or borrowed one is the author's choice.
W-TY-3 requires change The conversion and its rounding are the author's choice.
W-PAT-1 requires change Whether the name was meant as the variant or as a binding is the author's statement.
W-MATCH-1 requires change What the missing arms do is the author's statement.
W-MATCH-2 requires change An unreachable arm marks an arm the author meant to reach, or one to remove.
W-PLACE requires change Declaring the place with var, or writing another place, is the author's choice.
W-OWN-1 requires change A copy, a borrow or another order of uses is the author's choice.
W-OWN-2 requires change A copy in and out, or a snapshot, is the author's choice.
W-OWN-3 requires change Owning a copy, or passing a handle or an index, is the author's choice.
W-REG-1 requires change Owning a copy, or passing a handle or an index, is the author's choice.
W-SPAWN-1 requires change Owning a copy, or passing a handle or an index, is the author's choice.
W-STATE-1 requires change The region's fields are the author's to declare.
W-STATE-2 requires change A constant initializer, or a computation moved to an input, is the author's choice.
W-STATE-3 requires change The owned type of the field is the author's choice.
W-STEP-1 requires change The author declares the region or the event, or names another.
W-STEP-2 requires change A step for the event, or no such event, is the author's choice.
W-STEP-3 requires change The field the block form names is the author's choice.
W-STEP-4 requires change Which step was meant to run is the author's statement.
W-EFF-1 requires change Moving the effect to a task, a step or fn main is a choice of structure.
W-REC-1 requires change A measure or a bound is the author's statement.
W-CT-1 requires change The comptime expression is the author's to change.
W-INT-1 requires change An example or check that does not hold states another behaviour than the program has; which of the two is meant is the author's statement.
W-INT-2 recommended The module is admitted; the report recommends obligations beyond the listed examples (6.9).
W-LAW-1 requires change A law that fails or is undecided states a property the program does not show; whether the program, the law or an attestation changes is the author's statement.
W-MUT-1 requires change An obligation that no single edit makes fail carries zero bits about the program within the edits; whether it is strengthened or removed is the author's statement.
W-MUT-2 recommended The program is admitted; which of the two behaviours is meant is a choice of intent only the author can make, so rce mutants recommends an obligation that tells the survivor apart (it judges the whole mutant set, which rce check does not).
W-UI-1 requires change A frame is the program's output to a person; where its nodes, names, keys and colours go has more than one answer, and the part of a criterion no rule decides is a person's statement (an attest-ID attribute), so the program or its view changes.
W-SIMD-1 requires change The lengths and lane types are the author's.
W-GRAPH-1 requires change Which shapes the operation was meant to take is the author's statement.
W-GRAPH-2 requires change The tensor type of the operand, or a conversion, is the author's choice.
W-GRAPH-3 requires change Declaring the weaker level, or another operation, is the author's statement.
W-LIN-1 requires change Where the linear value is consumed is the author's statement.
W-DEV-1 requires change Splitting the host and device parts is a choice of structure.
W-ITER-1 requires change Collecting the iterator, or another structure, is the author's choice.
W-REF-1 requires change The predicate is the author's statement.
W-LOOP-1 requires change The bound n is the author's statement.
W-TRAIT-1 requires change The missing or differing methods are the author's to write.
W-TRAIT-2 requires change Which impl remains, or a newtype, is the author's choice.
W-TRAIT-3 requires change Implementing the trait, or another use, is the author's choice.
W-CTX-1 requires change The context of a text is declared by its author.
W-SEC-1 requires change A digest, an equality bit or a release is the author's choice.
W-CAP-1 requires change Authority is placed by the author; a tool never adds it.
W-CAP-2 requires change Authority is placed by the author; a tool never adds it.
W-PAR-1 requires change Separating the branches' footprints is a choice of structure.
W-PAR-2 requires change Moving the effect or the exit out of the par is a choice of structure.
W-PAR-3 requires change Writing the body as a reduction or by slot is a choice of structure.
W-PAR-4 requires change Moving the effect or the exit out of the loop body is a choice of structure.
W-DL-1 requires change Moving the construct into fn main or a task function is a choice of structure.
W-ND-1 requires change Moving the construct into fn main or a task function is a choice of structure.
W-GRP-1 requires change Where the group runs is the author's choice.
W-GRP-2 requires change Where the barrier stands is the author's choice.
W-GRP-3 requires change Which lane writes which slot in which phase is the author's choice.
W-SES-1 requires change The protocol and its uses are the author's statement.
W-SES-2 requires change The protocol and its uses are the author's statement.
W-SES-3 requires change The protocol and its uses are the author's statement.
W-SES-4 requires change The protocol and its uses are the author's statement.
W-SES-5 requires change Which body passes which endpoint is the author's choice.
W-SCOPE-1 requires change The scope of a task is a choice of structure.
W-ATOM-1 requires change Moving the wait out of atomic is a choice of structure.
W-ATOM-2 requires change The placement of the actors is the author's choice.
W-CRDT-1 requires change The join's laws are the author's to meet.
W-LVAR-1 requires change The order of put and freeze is the author's statement.
W-LVAR-2 requires change The thresholds are the author's statement.
W-NODE-1 requires change Placement is declared by the author.
W-SUP-1 requires change Supervision is declared by the author.
W-SUP-2 requires change Supervision is declared by the author.
W-INTR-1 requires change The priority is the author's statement.
W-RT-1 requires change The deadline is the author's statement.
W-BUD-1 requires change The budget is the author's statement.
W-UNUSED-1 altered An unread binding x is named _x, a binding _x that is read is named x, and an unread use takes a name that begins with _ and links the same module; names carry no meaning (T7).
W-UNUSED-2 requires change Which branch the constant condition was meant to choose is the author's statement.
W-DROP-1 altered let _ = e evaluates e and drops its value, as the expression statement did; an arm P -> e becomes a block arm holding let _ = e.
W-ASSIGN-1 requires change Which of the two stores was meant is the author's statement.
W-LEX-4 requires change The rule shows the author a character the text hides; what to write instead is the author's choice.
W-NAME-3 requires change The new name is the author's choice.
W-WORLD-1 requires change Where the &World handle comes from is a choice of structure.
W-IFC-1 requires change A label is lowered only by its author's release; a tool never lowers one.
W-IFC-2 requires change A label is lowered only by its author's release; a tool never lowers one.
W-IFC-3 requires change A label is lowered only by its author's release; a tool never lowers one.
W-IFC-4 requires change A label is lowered only by its author's release; a tool never lowers one.
W-IFC-5 requires change A release is the author's statement.
W-IFC-6 requires change The label is declared by its author.
W-IFC-7 requires change Endorsing a model answer is the author's statement.
W-TX-1 requires change The order of effects and failures is the author's statement.
W-CAP-3 requires change Authority is placed by the author; a tool never adds it.
W-CAP-4 requires change Authority is placed by the author; a tool never adds it.
W-CAP-5 requires change Authority is placed by the author; a tool never adds it.
W-PIN-1 requires change A pin or a dependency is changed by its owner.
W-CTFN-1 requires change Constant-time code is restructured by its author.
W-CTFN-2 requires change The emitter target is the author's choice.
W-CTX-2 requires change The context of a text is declared by its author.
W-CTX-3 requires change Where a model call stands is a choice of structure.
W-TPL-1 requires change How a template is rendered is the author's statement.
W-TPL-2 requires change The template's text is the author's.
W-CON-1 requires change A contract is the author's statement.
W-CON-2 requires change A contract is the author's statement.
W-GHOST-1 requires change Where a ghost value flows is the author's statement.
W-DEC-1 requires change A measure is the author's statement.
W-IFLET-1 requires change The comparison is the author's statement.
W-LEN-1 requires change len_bytes or len_chars is a choice of unit.
W-TRI-1 requires change A release path is the author's statement.

Read receipt. Under which rule do two unguarded steps in one region whose patterns overlap require change?

Examples that require change, by rule

Each program below breaks the rule named above it, so it requires change. Run it to see the rule the checker names, or edit it until it is accepted.

W-CT-1 (3)

spec/examples/change/admission/comptime_check.rce

Expected: requires change at the admit stage, rule W-CT-1: line 3: W-CT-1 comptime block in `f`: trap: check failed

spec/examples/change/admission/const_overflow.rce

Expected: requires change at the admit stage, rule W-CT-1: line 1: W-CT-1 const `BIG`: trap: overflow: 300 is outside u8

spec/examples/change/admission/state_init_overflow.rce

Expected: requires change at the admit stage, rule W-CT-1: line 0: W-CT-1 state initializer: trap: overflow: 256 is outside u8

W-DEV-1 (2)

spec/examples/change/types/device_emit.rce

Expected: requires change at the check stage, rule W-DEV-1: line 3: W-DEV-1 emit inside a device region

spec/examples/change/types/device_list.rce

Expected: requires change at the check stage, rule W-DEV-1: line 3: W-DEV-1 a device region holds fixed-size values only, found List[u64]

W-EFF-1 (1)

spec/examples/change/types/pure_send.rce

Expected: requires change at the check stage, rule W-EFF-1: line 2: W-EFF-1 emit in a pure function

W-GRAPH-1 (2)

spec/examples/change/types/graph_attention.rce

Expected: requires change at the check stage, rule W-GRAPH-1: line 13: W-GRAPH-1 `tensor.attention_causal`: q [[f64; 2]; 2], k [[f64; 3]; 2], v [[f64; 2]; 2]: k has q's last length, v as many rows as k, and the heads of q are a multiple of those of k and v

spec/examples/change/types/graph_shape.rce

Expected: requires change at the check stage, rule W-GRAPH-1: line 11: W-GRAPH-1 `tensor.matvec`: the matrix [[f64; 3]; 2] has 3 columns and the vector [f64; 2] has 2 elements; they must be equal

W-GRAPH-2 (2)

spec/examples/change/types/graph_integer.rce

Expected: requires change at the check stage, rule W-GRAPH-2: line 12: W-GRAPH-2 `tensor.exp` takes tensors of f32 or f64, found [i32; 3]

spec/examples/change/types/graph_operand.rce

Expected: requires change at the check stage, rule W-GRAPH-2: line 11: W-GRAPH-2 an operand of `tensor.relu` has type List[f64]; a tensor is an array of fixed length, possibly nested, of f32, f64, i8 or i32

W-GRAPH-3 (2)

spec/examples/change/types/graph_level.rce

Expected: requires change at the check stage, rule W-GRAPH-3: line 11: W-GRAPH-3 `tensor.round_bf16` has level lossy, weaker than the level exact in force here; declare it with `tensor.lossy(...)` around the operation

spec/examples/change/types/graph_quantize.rce

Expected: requires change at the check stage, rule W-GRAPH-3: line 12: W-GRAPH-3 `tensor.round_q8_0` has level lossy, weaker than the level exact in force here; declare it with `tensor.lossy(...)` around the operation

W-INT-1 (11)

spec/examples/change/admission/arena_size_limit.rce

Expected: requires change at the admit stage, rule W-INT-1: line 8: W-INT-1 check: trap: size limit

spec/examples/change/admission/bslice_boundary.rce

Expected: requires change at the admit stage, rule W-INT-1: line 1: W-INT-1 check: trap: not a char boundary

spec/examples/change/admission/f32_overflow.rce

Expected: requires change at the admit stage, rule W-INT-1: line 1: W-INT-1 check: trap: non-finite float

spec/examples/change/admission/false_check.rce

Expected: requires change at the admit stage, rule W-INT-1: line 2: W-INT-1 check is false

spec/examples/change/admission/guard_trap.rce

Expected: requires change at the admit stage, rule W-INT-1: line 2: W-INT-1 example does not hold: event 1 (Go) kept: trap(division by zero)

spec/examples/change/admission/iter_unbounded.rce

Expected: requires change at the admit stage, rule W-INT-1: line 9: W-INT-1 check: trap: loop bound

spec/examples/change/admission/loop_limit_low.rce

Expected: requires change at the admit stage, rule W-INT-1: line 9: W-INT-1 check: trap: loop bound

spec/examples/change/admission/u64_underflow.rce

Expected: requires change at the admit stage, rule W-INT-1: line 4: W-INT-1 check: trap: overflow: -1 is outside u64

spec/examples/change/admission/unexpected_kept.rce

Expected: requires change at the admit stage, rule W-INT-1: line 2: W-INT-1 example does not hold: event 1 (Dec) kept: trap(overflow: -1 is outside u64)

spec/examples/change/admission/wrong_example_value.rce

Expected: requires change at the admit stage, rule W-INT-1: line 2: W-INT-1 example does not hold: final value is 2, expected 3

spec/examples/change/admission/wrong_kept_reason.rce

Expected: requires change at the admit stage, rule W-INT-1: line 2: W-INT-1 example does not hold: event 1 (Dec) kept: Underflow

W-ITER-1 (1)

spec/examples/change/types/yield_outside.rce

Expected: requires change at the check stage, rule W-ITER-1: line 2: W-ITER-1 yield outside an iterator function

W-LAW-1 (1)

spec/examples/change/admission/law_fails.rce

Expected: requires change at the admit stage, rule W-LAW-1: line 5: W-LAW-1 law you_cant_win fails after 9 events (exhaustive, alphabet 4 complete, 86 states explored): the claim is false example Up, Up, Up, Up, Right, Right, Right, Right, Right -> won

W-LEN-1 (1)

spec/examples/change/types/use_after_move.rce

Expected: requires change at the check stage, rule W-LEN-1: line 1: W-LEN-1 text has no unqualified `len`: use `len_bytes` or `len_chars` (F.5.2)

W-LEX-1 (1)

spec/examples/change/syntax/tab_indent.rce

Expected: requires change at the parse stage, rule W-LEX-1: line 2: W-LEX-1 tab character

W-LEX-2 (1)

spec/examples/change/syntax/bad_dedent.rce

Expected: requires change at the parse stage, rule W-LEX-2: line 3: W-LEX-2 inconsistent dedent

W-LEX-3 (1)

spec/examples/change/admission/literal_out_of_range.rce

Expected: requires change at the check stage, rule W-LEX-3: line 1: W-LEX-3 literal 300 is outside u8

W-LIN-1 (1)

spec/examples/change/types/linear_field.rce

Expected: requires change at the check stage, rule W-LIN-1: line 4: W-LIN-1 struct field `a` cannot hold a linear value

W-LOOP-1 (1)

spec/examples/change/types/loop_limit_type.rce

Expected: requires change at the check stage, rule W-LOOP-1: line 1: W-LOOP-1 LOOP_LIMIT must be declared `const LOOP_LIMIT: u64 = n` with a positive literal n

W-MATCH-1 (1)

spec/examples/change/types/non_exhaustive.rce

Expected: requires change at the check stage, rule W-MATCH-1: line 6: W-MATCH-1 match is not exhaustive: missing Green

W-NAME-1 (1)

spec/examples/change/types/unknown_name.rce

Expected: requires change at the check stage, rule W-NAME-1: line 1: W-NAME-1 unknown name `y`

W-OWN-2 (2)

spec/examples/change/types/let_borrow_write.rce

Expected: requires change at the check stage, rule W-OWN-2: line 7: W-OWN-2 `n` is written while `a` (line 6) borrows `n` with `&mut`, and `a` is used again at line 8: end the borrow before this use (5.6 [No-Alias-Write])

spec/examples/change/types/modify_while_iterating.rce

Expected: requires change at the check stage, rule W-OWN-2: line 3: W-OWN-2 `xs` is borrowed by the for loop and cannot be modified inside it

W-OWN-3 (1)

spec/examples/change/types/borrow_escape.rce

Expected: requires change at the check stage, rule W-OWN-3: line 1: W-OWN-3 a returned borrow must derive from a borrowed parameter (R-RET)

W-REC-1 (2)

spec/examples/change/types/rec_not_structural.rce

Expected: requires change at the check stage, rule W-REC-1: line 4: W-REC-1 recursion through countdown has no decreasing measure (6.7): no layers of summed measures, each kept by every call not yet done and shrunk by at least one, leave the remaining calls without a cycle, and a cycle of its calls passes through no function declared with `bound`

spec/examples/change/types/recursion.rce

Expected: requires change at the check stage, rule W-REC-1: line 1: W-REC-1 recursion through f, g has no decreasing measure (6.7): no layers of summed measures, each kept by every call not yet done and shrunk by at least one, leave the remaining calls without a cycle, and a cycle of its calls passes through no function declared with `bound`

W-REG-1 (1)

spec/examples/change/types/arena_escape.rce

Expected: requires change at the check stage, rule W-REG-1: line 5: W-REG-1 a value in arena `a` escapes into `out`

W-SAFE-1 (1)

spec/examples/change/types/unsafe_name.rce

Expected: requires change at the check stage, rule W-SAFE-1: line 2: W-SAFE-1 `unsafe` is not admitted

W-SIMD-1 (2)

spec/examples/change/types/simd_len.rce

Expected: requires change at the check stage, rule W-SIMD-1: line 2: W-SIMD-1 lane-wise `+` needs two arrays of one fixed length, found [i32; 3] and [i32; 4]

spec/examples/change/types/simd_text.rce

Expected: requires change at the check stage, rule W-SIMD-1: line 2: W-SIMD-1 lane-wise `*` needs numeric lanes, found text

W-STATE-2 (1)

spec/examples/change/types/state_no_init.rce

Expected: requires change at the check stage, rule W-STATE-2: line 2: W-STATE-2 field `n` needs a comptime initial value

W-STEP-2 (1)

spec/examples/change/types/unhandled_event.rce

Expected: requires change at the check stage, rule W-STEP-2: line 5: W-STEP-2 event `Dec` is handled by no step or actor: δ would not be total

W-STEP-4 (1)

spec/examples/change/types/unreachable_step.rce

Expected: requires change at the check stage, rule W-STEP-4: line 7: W-STEP-4 unreachable: the unguarded step at line 6 already handles S on E

W-SYN-1 (11)

spec/examples/change/syntax/assign_in_expr.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 expected `)` (found `=`)

spec/examples/change/syntax/chained_compare.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 expected end of line (found `<`)

spec/examples/change/syntax/class_keyword.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 expected a declaration (found `class`)

spec/examples/change/syntax/if_expr_no_else.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 expected `else` (found end of line)

spec/examples/change/syntax/kind_empty.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 2: W-SYN-1 expected indented block (found `fn`)

spec/examples/change/syntax/law_two_claims.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 12: W-SYN-1 a law has exactly one `always` or `every step` line (found `always`)

spec/examples/change/syntax/missing_arrow_example.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 2: W-SYN-1 expected `->` (found integer `1`)

spec/examples/change/syntax/state_no_fields.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 2: W-SYN-1 expected indented block (found `event`)

spec/examples/change/syntax/step_no_on.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 4: W-SYN-1 expected `on` (found `E`)

spec/examples/change/syntax/try_in_then.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 expected an expression (found `try`)

spec/examples/change/syntax/unterminated_string.rce

Expected: requires change at the parse stage, rule W-SYN-1: line 1: W-SYN-1 unterminated string

W-TRAIT-2 (1)

spec/examples/change/types/orphan_impl.rce

Expected: requires change at the check stage, rule W-TRAIT-2: line 1: W-TRAIT-2 orphan impl: neither the trait nor the type is declared in this module

W-TY-1 (9)

spec/examples/change/types/f32_literal.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 `*` on f32 and f64: no implicit conversion

spec/examples/change/types/f32_mixed.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 `+` on f32 and f64: no implicit conversion

spec/examples/change/types/fail_not_error.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 fail needs an error, found ?0

spec/examples/change/types/int_mismatch.rce

Expected: requires change at the check stage, rule W-TY-1: line 1: W-TY-1 `+` on u8 and i64: no implicit conversion

spec/examples/change/types/iter_yield_type.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 expected text, found ?0

spec/examples/change/types/missing_return.rce

Expected: requires change at the check stage, rule W-TY-1: line 1: W-TY-1 `f` can reach its end without returning i64

spec/examples/change/types/text_index_char.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 cannot compare u8 with text

spec/examples/change/types/u64_mixed.rce

Expected: requires change at the check stage, rule W-TY-1: line 2: W-TY-1 `+` on u64 and i64: no implicit conversion

spec/examples/change/types/unchecked_union.rce

Expected: requires change at the check stage, rule W-TY-1: line 6: W-TY-1 expected i64, found i64 ! E

W-UI-1 (1)

spec/examples/change/admission/frame_no_tabindex.rce

Expected: requires change at the admit stage, rule W-UI-1: line 6: W-UI-1 the example's 1 frames: WCAG 1.3.1 undecided: needs human attestation: whether every structure and relationship shown is expressed by roles and states

W-UNUSED-1 (8)

spec/examples/change/types/iter_effect.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 1: W-UNUSED-1 `c` is never read; remove it or name it `_c`

spec/examples/change/types/iter_stored.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 5: W-UNUSED-1 `it` is never read; remove it or name it `_it`

spec/examples/change/types/linear_in_list.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 4: W-UNUSED-1 `hs` is never read; remove it or name it `_hs`

spec/examples/change/types/mut_alias.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 1: W-UNUSED-1 `a` is never read; remove it or name it `_a`

spec/examples/change/types/rec_same_arg.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 8: W-UNUSED-1 `l` is never read; remove it or name it `_l`

spec/examples/change/types/select_after_type.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 2: W-UNUSED-1 `x` is never read; remove it or name it `_x`

spec/examples/change/types/spawn_borrow.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 1: W-UNUSED-1 `xs` is never read; remove it or name it `_xs`

spec/examples/change/admission/loop_bound.rce

Expected: requires change at the check stage, rule W-UNUSED-1: line 5: W-UNUSED-1 `k` is never read; remove it or name it `_k`

W-WORLD-1 (10)

spec/examples/change/types/device_extern.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_tick` must take `&World` as its first parameter, and only there

spec/examples/change/types/extern_abi.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_f` must take `&World` as its first parameter, and only there

spec/examples/change/types/extern_in_pure.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_rand` must take `&World` as its first parameter, and only there

spec/examples/change/types/extern_owned_param.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_take` must take `&World` as its first parameter, and only there

spec/examples/change/types/extern_spawn.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_work` must take `&World` as its first parameter, and only there

spec/examples/change/types/extern_text_result.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 1: W-WORLD-1 the foreign function `c_name` must take `&World` as its first parameter, and only there

spec/examples/change/types/linear_copy.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 4: W-WORLD-1 the foreign function `c_close` must take `&World` as its first parameter, and only there

spec/examples/change/types/linear_loop.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 4: W-WORLD-1 the foreign function `c_close` must take `&World` as its first parameter, and only there

spec/examples/change/types/linear_one_branch.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 4: W-WORLD-1 the foreign function `c_close` must take `&World` as its first parameter, and only there

spec/examples/change/types/linear_unconsumed.rce

Expected: requires change at the check stage, rule W-WORLD-1: line 4: W-WORLD-1 the foreign function `c_close` must take `&World` as its first parameter, and only there

Built from spec commit 1762fb4b. Code cells run the reference checker rce-check, written in Rust and compiled to WebAssembly, inside your browser; nothing is sent to a server. Read-aloud uses the Kokoro-82M model (Apache-2.0), served from this site and run in your browser.