Skip to documentation
SLOP

tiny.smt.smtlib.parse

Reference tiny.smt smtlib parse

Defined in smtlib.

Reads SMT-LIB text into terms, one command at a time.

API (10)

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

No direct callersNo direct callssmtlibparse
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/smt/src/smtlib/parse/root.zig

zig
//! Reads SMT-LIB text into terms, one command at a time. A caller needs one call that turns a whole//! script into terms and a list of assertions.//!//! The reader reads tokens with `token`, sorts with `sort`, terms with `term` and commands with//! `script`, all over one parser state (`Parser`) from `state`. It descends one call per//! parenthesis, with no depth bound.const smt = @import("../../root.zig");pub const errors = @import("error.zig");pub const script = @import("script.zig");pub const sort = @import("sort.zig");pub const state = @import("state.zig");pub const term = @import("term.zig");pub const token = @import("token.zig");const smt_term = smt.term;pub const Error = errors.Error;pub const ParseError = errors.ParseError;pub const Parser = state.Parser;/// Reads the script `source`, adds its constants, functions and terms to `ctx`, and returns a/// `Script` over `ctx` with the script's logic and assertions. The caller loads an SMT-LIB script/// with it, then solves the assertions of the returned `Script`. The returned `Script` borrows its/// logic name from `source`, so `source` has to outlive it. The caller owns the `Script` and frees/// it with `Script.deinit` before freeing `ctx`. The logic is `ALL` when the script has no/// `set-logic`. On an error the terms already built stay in `ctx`. Each call starts with no/// declared names, so a second script read into the same `ctx` cannot refer to the constants of the/// first. It returns the `ParseError` tags, the errors of the `Context` builders and/// `error.OutOfMemory`, under the error set `Error`, which is `anyerror`.pub fn parseScript(ctx: *smt_term.Context, source: []const u8) Error!smt_term.Script {    var parser = Parser.init(ctx, source);    defer parser.deinit();    return try script.parse(&parser);}

Source: lib/smt/src/smtlib/root.zig:19

zig
pub const parse = @import("parse/root.zig");

Audit

Definitions2
Public names3
Members0
Version26.7.0
Revisiondaab053ee433