tiny.smt.smtlib.parse.errors
Defined in smtlib.parse.
The errors of the SMT-LIB reader.
API (2)
Types and contracts
Public types and contracts.
Error: The error set of the reader's functions: any error.ParseError: The errors the reader returns for unreadable or unsupported text.
Source
Source: lib/smt/src/smtlib/parse/error.zig
zig
//! The errors of the SMT-LIB reader. A caller that refuses a script needs to tell a malformed text//! from a well-formed script that uses something unsupported by the reader. The reader's functions//! return `Error`, which is `anyerror`, so the `Context` builders' errors and `error.OutOfMemory`//! pass through beside the tags of `ParseError`./// The errors the reader returns for unreadable or unsupported text. Code that reports why a script/// was refused switches on these tags.pub const ParseError = error{ /// An atom was due, and the text ended or a parenthesis came. ExpectedAtom, /// An opening parenthesis was due. ExpectedList, /// A closing parenthesis was due, as after an operator's last operand: `(= a b c)` fails here /// because `=` takes two operands. ExpectedRightParen, /// A sort is other than `Bool`, `Int`, `(_ BitVec n)` or an `Array` from one bit-vector sort to /// another. ExpectedSort, /// No function of the reader returns it. ExpectedCommand, /// An atom names an undeclared constant or function and is other than `true`, `false` or an /// integer. UnknownSymbol, /// A `declare-const` or `declare-fun` names a constant or function the same script already /// declared. DuplicateSymbol, /// A command other than `set-logic`, `declare-const`, `declare-fun`, `assert` and `check-sat`, /// such as `set-option` or `get-model`. UnsupportedCommand, /// A term whose operator is unsupported by the reader, such as `let` or `ite`, or an indexed /// form other than `(_ bvV W)`, `extract`, `zero_extend`, `sign_extend`, `rotate_left` and /// `rotate_right`. UnsupportedTerm, /// A width, a bit index, a count or a bit-vector value is other than a decimal number that fits /// its type. InvalidNumber,};/// The error set of the reader's functions: any error. Every function of the reader returns it, so/// a caller's own error set has to absorb it. It covers `ParseError`, the errors of the `Context`/// builders, such as `DuplicateFunction` and `FunctionArgumentSortMismatch`, and/// `error.OutOfMemory`. Because it is `anyerror`, the compiler cannot list the errors a call/// returns.pub const Error = anyerror;Source: lib/smt/src/smtlib/parse/root.zig:9
zig
pub const errors = @import("error.zig");Audit
| Definitions | 3 |
|---|---|
| Public names | 7 |
| Members | 10 |
| Version | 26.7.0 |
| Revision | daab053ee433 |