4 Conformance

(1) A conforming program is a set of sources that keeps all the syntax rules and constraints of this document. A conforming program that stops with a fault while running is still conforming: a fault is part of what a program means (11.3).

(2) A conforming processor:

  1. accepts conforming programs and runs them as this document says;
  2. refuses at load a source that breaks a syntax rule or a constraint, runs none of its code, and leaves the state as it was before the load;
  3. reports the place of the breach as line and column; it may report only the first breach of a source;
  4. reports the kind of a fault (annex B) and the line where it happened;
  5. accepts the minimum sizes of annex C.

(2a) For every source, conforming or not, and for every bytecode container it accepts (pinax_load_bytecode), a conforming processor reads and writes no memory outside the state’s block and the memory the host gave it (strings passed in, bound globals, shared storage), and the run of a word with a budget other than 0 returns after a bounded number of instructions (19.5). A container that could do otherwise is refused at load (PINAX_ERR_FORMAT). Images (19.9), share files (19.7) and bound memory are data the host vouches for: the processor checks their shape, not every byte.

(3) The sentences of the diagnostics (the English messages in the tables of this document) are those of this implementation. Another processor may word them differently. What it refuses shall be the same, and the place it points at shall lie inside the offending token (this implementation points at the start of the token, or at the byte inside it where the error shows). Lines and columns count from 1; columns count bytes.

(4) A processor may add words, modules and host functions not in this document. What it adds shall not change the meaning of a conforming program, and shall not use the reserved words (6.6) or the names this document defines.

(5) What this document says it does not define (speed, the shape of instructions) is up to the processor. What it says differs between processors (default capacities, for example) the processor shall document.

Note

The line between refusing at load and faulting while running is the centre of the language. Types, the depth of the stack, names, whether a failure is handled and whether an owned value is handed over exactly once are all settled at load. Only what can be known while running — does a value overflow, is an index in range — becomes a fault.