Error codes
Generated by cargo x generate from the code tables of elinvar-logic,
elinvar-engine, elinvar-als, and elinvar; do not edit. Each is specified in LOGIC.md, and every
error carries its code, a message with the names and numbers involved, its
fix, and its place (AGENTS.md law 21).
| Code | When | Fix |
|---|---|---|
universe.empty | a universe with no atoms | give the universe at least one atom |
universe.duplicate_atom | two atoms with one name | give every atom of a universe its own name |
universe.bitwidth | a bitwidth outside 1 to 32 (LOGIC.md 16.1) | give a bitwidth from 1 to 32 |
universe.int | an integer atom whose integer is outside the bitwidth’s range, or two integers for one atom, or two atoms for one integer (LOGIC.md 16.1) | give each integer atom one integer, within the bitwidth’s range, and each integer at most one atom |
universe.unknown_atom | a tuple names an atom the universe lacks | name only atoms of the universe, or add the atom to it |
universe.capacity | the number of tuples of an arity, n^k, is more than 2^64 - 1 | use fewer atoms, or relations and expressions of smaller arity |
tuples.arity | a tuple set is given a tuple of another arity | give a tuple set only tuples of its own arity |
tuples.other_universe | a tuple set is given a tuple, or combined with a tuple set, over a different universe | build every tuple and tuple set from the same universe |
tuples.index | a tuple set is given an index of no tuple of its arity | give an index below n^k for n atoms and arity k |
bounds.arity | a bound whose arity is not the relation’s | give the relation bounds of its own arity |
bounds.lower_outside_upper | a lower bound with a tuple the upper bound lacks | add the tuple to the upper bound, or remove it from the lower bound |
bounds.other_universe | a tuple set over a different universe | build the bounds from tuple sets over the bounds’ own universe |
bounds.duplicate_relation | bounds are given for a relation that has them | bound each relation once |
bounds.duplicate_name | two relations of one bounds have one name | give each relation its own name |
instance.arity | a tuple set whose arity is not the relation’s | give the relation a tuple set of its own arity |
instance.other_universe | a tuple set over a different universe | build the instance from tuple sets over its own universe |
instance.duplicate_relation | a tuple set is given for a relation that has one | give each relation one tuple set |
instance.duplicate_name | two relations of one instance have one name | give each relation its own name |
arity.zero | a relation or a tuple of arity 0 | give it an arity of 1 or more |
arity.mismatch | an operator that needs equal arities is given unequal ones | make both sides the same arity, for example by joining one side with a relation |
arity.join | a join of two expressions of arity 1 | to ask whether two sets meet, write some (a & b) |
arity.not_binary | transpose or closure on an expression of arity other than 2 | apply it to a binary relation |
arity.not_a_set | the set side of a restriction, or a declaration’s expression, of arity other than 1 | use an expression of arity 1 there |
logic.free_variable | a formula with a free variable is evaluated, run, or checked | use the variable only inside the quantifier or comprehension that declares it |
logic.no_declarations | a quantifier or a comprehension with no declarations | declare at least one variable |
logic.rebound_variable | a variable is declared where it is already bound | declare a new variable instead of reusing one that is in scope |
logic.higher_order | a declaration over sets or relations where only atoms are declared: in a comprehension, or in a quantifier skolemization cannot remove | declare atoms there, or move the quantifier over sets to the outside of the formula, where it becomes a relation |
logic.unbound_relation | a formula is run or checked and uses a relation the bounds lack | give the relation bounds |
instance.missing_relation | a formula is evaluated and uses a relation the instance lacks | give the relation a tuple set in the instance |
trace.no_states | a trace with no states | give the trace at least one state |
trace.loop | a loop target that is not a state | loop back to one of the trace’s states, from 0 |
trace.relations | the states disagree about which changing relations they give, or give a fixed one | give every state the same changing relations, and fixed relations in the fixed instance |
enumerate.too_large | brute-force enumeration over more free tuples than its cap | shrink the upper bounds, raise the cap, or use the solver |
model.bitwidth | a command asks for a bitwidth above 16 in a model with integers, whose Int set would have 2^w atoms | give the command a bitwidth from 1 to 16 with bitwidth |
model.no_scope | a command leaves a top-level set without a scope | give the set a scope with scope, scope_of, or exactly |
model.not_a_set | a scope is given for something that is not a top-level set of the model, or an ordering for a set that changes over time | give scopes only to the model’s top-level sets |
model.not_changing | an action’s effect names something that is not a changing relation of the model | name a relation declared with changing_field, changing_relation, or changing_subset |
model.changing_after_action | a changing relation is declared after an action, so that action’s frame misses it | declare every changing relation before the first action |
model.diff_mismatch | two models being compared with diff do not declare the same signatures and fields with the same arities and mutability | compare models that share the same signatures, fields, arities, and var declarations |
model.trivial_holds | a check assertion holds from the bounds alone without using any rule of the model | check whether the promise is a tautology or restates a definition rather than testing a rule |
model.vacuous_premise | an implication promise’s premise is never satisfied in any allowed case within the scope | increase the scope or steps, or inspect why the premise can never happen |
model.premise_unknown | warning: a check of an implication holds, but whether its premise is ever satisfied was not settled within the budget for that question, so the holds may be vacuous | raise --budget or --timeout, or lower the scope, and check again; or run the premise to see a case of it |
model.invalid_steps | a command asks for 0 steps; a trace needs at least 1 state | use at least 1 step (but 1 steps or --steps 1) |
model.scope_too_large | a command asks for more atoms, or more possible tuples, than the bounded checker supports | lower the command’s scope (at most 4096 non-integer atoms, and 16777216 possible tuples over all relations) |
als.syntax | text that is not Alloy, or not this subset’s grammar | write the model in the subset of Alloy 6 that LOGIC.md section 15 lists |
als.unknown_name | a name that is no signature, field, predicate, function, parameter, or variable in scope | declare the name, or fix its spelling |
als.unsupported | a construct outside the subset of LOGIC.md section 15.2 | rewrite the model without it; LOGIC.md section 15.2 lists what is not read |
als.sort | a formula where an expression belongs, or the other way round | write an expression where a set or relation is wanted, and a formula where true or false is |
als.duplicate | two declarations of one name | give each signature, field, predicate, function, and assertion its own name |
als.arguments | a predicate or function called with the wrong number of arguments, or with arguments whose types fit none or more than one of its overloads | pass one argument per parameter, of the types of the declaration meant |
als.no_command | a command name the file does not have | name a command of the file, or give none to run them all |
eval.result | elinvar eval is given a result it cannot read as an instance or trace of the model | give the JSON of one result of elinvar check --json or elinvar run --json for this model |
sql.skipped | SQL import with --strict encountered a statement or constraint it does not read | rewrite or remove the unsupported SQL rule, or drop --strict to inspect the skipped comments |
sql.script | elinvar accepts is given a SQL DML script containing a statement or expression it cannot read | use single-row INSERT INTO t (cols) VALUES (...), UPDATE t SET ... WHERE ..., and DELETE FROM t WHERE ... statements with literal or simple arithmetic values |
sql.database | elinvar fuzz could not run the external database command given to --against or the database rejected the schema | check that --against names an installed database CLI (for example --against sqlite3) and that the schema loads without error |
als.int_wrap | warning: an integer literal written in the model does not fit the command’s Int bitwidth and wraps | increase the command’s Int bitwidth (for example but 6 Int), or use a smaller literal |
als.unframed_var | warning: a step predicate updates some changing (var) relations while leaving others unconstrained | add r' = r (or another constraint) in the step predicate for each changing relation it should leave unchanged |
als.default_command | warning: the file has no run or check command, so Alloy’s default command, run {} named Default, was run, which only shows the rules allow some case | add the command meant, such as check Name for 4 for a promise or run Name for 4 for an example |
als.empty_by_type | warning: a join, intersection, or comparison combines expressions whose column types never overlap | check the column types on both sides; the join or intersection is always empty, or the comparison is trivially decided by types |
cli.usage | a verb was given a flag, argument, or value it does not take, or a verb that does not exist | read the verb’s --help (or elinvar --help for the verbs), and pass what it lists |
cli.steps_ignored | warning: --steps (or the steps argument) was given for a model where nothing changes, so there is no trace for it to bound | drop --steps, or declare what changes with var |
cli.state_past_end | warning: --state K (or state) is at or past the number of states in the trace; the trace loops, so K is read as the state the loop reaches there (LOGIC.md section 13.1) | give a state from 0 to one less than the number of states; a static instance has only state 0 |
cli.input | an input named on the command line cannot be read: a missing or unreadable file, a directory with no .sql files, stdin that fails, or a result that is not JSON | check the path and its permissions; - reads stdin, and a directory is read as its .sql files in name order |
audit.parse | a SQL data dump passed to elinvar audit --data has an unreadable INSERT statement or value | check the SQL dump syntax and pass INSERT statements from sqlite3 .dump or pg_dump --inserts |
audit.dropped_rows | a SQL dump passed to elinvar audit --data inserts rows into a table that is not in the audited schema, or not in its --tables slice; those rows are not audited | add the table to the schema or to --tables, or remove its rows from the dump if they do not belong to this database |
audit.ignored_statement | a SQL dump passed to elinvar audit --data has a statement that is neither an INSERT nor one that carries no rows (such as COPY, UPDATE, or text that is not SQL); it is not read | dump with sqlite3 DB .dump or pg_dump --inserts, which write every row as an INSERT |
audit.no_rows | a SQL dump passed to elinvar audit --data has no INSERT statement, so the audit read no row and its clean says nothing about any data | check that the file is the dump of the database meant; an empty database needs no audit |
ci.manifest | a CI manifest passed to elinvar ci cannot be parsed or has an invalid entry | check the manifest TOML fields ([[check]], [[run]], [[accepts]], [[diff]], [[discover]], [[tests]]) and referenced file paths |