Skip to documentation
SLOP

tiny.smt.Sort

Reference tiny.smt Sort

Defined in term.

The sort of a term: Boolean, integer, a bit-vector of a given width, or an array from bit-vectors to bit-vectors.

API (6)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/smt/src/term.zig:51

zig
/// The sort of a term: Boolean, integer, a bit-vector of a given width, or an array from/// bit-vectors to bit-vectors. Code declares every constant and function with a sort, and `sortOf`/// returns one for every term.pub const Sort = union(enum) {    /// The Boolean sort. SMT-LIB writes it `Bool`.    bool,    /// The sort of mathematical integers. SMT-LIB writes it `Int`. The bit-vector encoder refuses    /// terms of this sort with `UnsupportedTerm`.    int,    /// A bit-vector sort, with its width in bits as the payload. SMT-LIB writes it `(_ BitVec n)`.    /// Any width is accepted, 0 and widths above 128 included. A bit-vector constant wider than 128    /// bits makes the encoder panic. A named constant wider than 128 bits encodes, and    /// `Encoder.model` returns `ModelValueTooWide` for it.    bitvec: u32,    /// An array sort, with its index and element widths as the payload. SMT-LIB writes it    /// `(Array (_ BitVec i) (_ BitVec e))`.    array: ArraySort,    /// Writes the sort in SMT-LIB syntax: `Bool`, `Int`, `(_ BitVec n)` or    /// `(Array (_ BitVec i) (_ BitVec e))`. The SMT-LIB writer calls it to print the sort of every    /// declaration. The function returns only the writer's errors.    pub fn write(self: Sort, writer: *std.Io.Writer) std.Io.Writer.Error!void {        switch (self) {            .bool => try writer.writeAll("Bool"),            .int => try writer.writeAll("Int"),            .bitvec => |width| try writer.print("(_ BitVec {d})", .{width}),            .array => |array| try writer.print(                "(Array (_ BitVec {d}) (_ BitVec {d}))",                .{ array.index_width, array.element_width },            ),        }    }    /// Returns true when the two sorts have the same kind and the same widths. `sortOf` and    /// `function` call it to compare the sort an operator needs with the sort it got.    pub fn eql(self: Sort, other: Sort) bool {        return std.meta.eql(self, other);    }};

Source: lib/smt/src/root.zig:115

zig
pub const Sort = term.Sort;
Called byCallsNo direct callerstiny.simdalignedArraySortwrite
Static calls · unresolved targets: 1 · external targets: 1.

Audit

Definitions3
Public names6
Members4
Version26.7.0
Revisiondaab053ee433