tiny.smt.BoolValue
Defined in sat.types.
A truth value that may also be unset.
API (5)
Actions
Public operations.
fromBool: Returns.truefor true and.falsefor false.invert: Returns the opposite value, and.unsetfor.unset.
Fields and members
Public fields and members.
Source
Source: lib/smt/src/sat/types.zig:33
zig
/// A truth value that may also be unset. A caller switches on the value `Solver.literalValue`/// returns to read a literal in a satisfying assignment.pub const BoolValue = enum { /// The variable is unassigned, or the literal names a variable at or above the solver's /// variable count. unset, /// The literal or variable is false. false, /// The literal or variable is true. true, /// Returns `.true` for true and `.false` for false. The solver and the proof checker record an /// assigned value through it. pub fn fromBool(value: bool) BoolValue { return if (value) .true else .false; } /// Returns the opposite value, and `.unset` for `.unset`. The solver and the proof checker read /// a negated literal's value from its variable's value through it. pub fn invert(self: BoolValue) BoolValue { return switch (self) { .unset => .unset, .false => .true, .true => .false, }; }};Source: lib/smt/src/root.zig:107
zig
pub const BoolValue = sat.BoolValue;Also reachable as
sat.BoolValue, sat.solver.BoolValue.
Audit
| Definitions | 3 |
|---|---|
| Public names | 12 |
| Members | 3 |
| Version | 26.7.0 |
| Revision | daab053ee433 |