Struct Z3Parser

Source
pub struct Z3Parser {
    pub lits: Literals,
    pub strings: StringTable,
    pub events: EventLog,
    /* private fields */
}
Expand description

A parser for Z3 log files. Use one of the various Z3Parser::from_* methods to construct this parser.

Fields§

§lits: Literals§strings: StringTable§events: EventLog

Implementations§

Source§

impl Z3Parser

Source

pub fn check_eq(&self, from: ENodeIdx, to: ENodeIdx) -> bool

Unused. TODO: this could help us fix the egraph can_mismatch thing

Source§

impl Z3Parser

Source

pub fn errors(&self) -> ParseErrors

Source

pub fn meaning(&self, tidx: TermIdx) -> Option<&Meaning>

Source

pub fn from_to(&self, eq: EqTransIdx) -> (ENodeIdx, ENodeIdx)

Source

pub fn quant_count_incl_theory_solving(&self) -> (usize, bool)

Source

pub fn quantifiers(&self) -> &TiSlice<QuantIdx, Quantifier>

Source

pub fn instantiations(&self) -> &TiSlice<InstIdx, Instantiation>

Source

pub fn instantiations_data(&self) -> impl Iterator<Item = InstData<'_>> + '_

Source

pub fn terms(&self) -> &TiSlice<TermIdx, Term>

Source

pub fn proofs(&self) -> &TiSlice<ProofIdx, ProofStep>

Source

pub fn cdcls(&self) -> &TiSlice<CdclIdx, Cdcl>

Source

pub fn quantifier_body(&self, qidx: QuantIdx) -> Option<TermIdx>

Source

pub fn patterns(&self, q: QuantIdx) -> Option<&TiSlice<PatternIdx, TermIdx>>

Source

pub fn get_inst(&self, iidx: InstIdx) -> InstData<'_>

Source

pub fn get_instantiation_body(&self, iidx: InstIdx) -> Option<TermIdx>

Source

pub fn as_tidx(&self, sidx: SynthIdx) -> Option<TermIdx>

Source

pub fn get_pattern(&self, qpat: QuantPat) -> Option<TermIdx>

Source

pub fn get_pattern_term(&self, qpat: QuantPat) -> Option<&Term>

Source

pub fn get_frame(&self, idx: impl HasFrame) -> &StackFrame

Source

pub fn proves_false(&self, pidx: ProofIdx) -> bool

Does the proof step pidx prove false? This can may be under a hypothesis so might not necessarily imply unsat.

Source

pub fn ast_size( &self, tidx: TermIdx, cached: &mut FxHashMap<TermIdx, AstSize>, ) -> AstSize

Returns the size in AST nodes of the term tidx. Note that z3 eagerly reduces terms such as 1 + 1 to 2 meaning that a matching loop can be constant in this size metric!

Source

pub fn inst_ast_size( &self, iidx: InstIdx, cached: &mut FxHashMap<TermIdx, AstSize>, ) -> Option<NonMaxU64>

Source

pub fn new_quant_pat_vec<T>(&self, f: impl Fn(QuantPat) -> T) -> QuantPatVec<T>

Trait Implementations§

Source§

impl Debug for Z3Parser

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Z3Parser

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Index<CdclIdx> for Z3Parser

Source§

type Output = Cdcl

The returned type after indexing.
Source§

fn index(&self, idx: CdclIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<ENodeIdx> for Z3Parser

Source§

type Output = ENode

The returned type after indexing.
Source§

fn index(&self, idx: ENodeIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<EqGivenIdx> for Z3Parser

Source§

type Output = EqualityExpl

The returned type after indexing.
Source§

fn index(&self, idx: EqGivenIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<EqTransIdx> for Z3Parser

Source§

type Output = TransitiveExpl

The returned type after indexing.
Source§

fn index(&self, idx: EqTransIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IString> for Z3Parser

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, idx: IString) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<InstIdx> for Z3Parser

Source§

type Output = Instantiation

The returned type after indexing.
Source§

fn index(&self, idx: InstIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<LitIdx> for Z3Parser

Source§

type Output = Literal

The returned type after indexing.
Source§

fn index(&self, idx: LitIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<MatchIdx> for Z3Parser

Source§

type Output = Match

The returned type after indexing.
Source§

fn index(&self, idx: MatchIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<ProofIdx> for Z3Parser

Source§

type Output = ProofStep

The returned type after indexing.
Source§

fn index(&self, idx: ProofIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<QuantIdx> for Z3Parser

Source§

type Output = Quantifier

The returned type after indexing.
Source§

fn index(&self, idx: QuantIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<StackIdx> for Z3Parser

Source§

type Output = StackFrame

The returned type after indexing.
Source§

fn index(&self, idx: StackIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<SynthIdx> for Z3Parser

Source§

type Output = AnyTerm

The returned type after indexing.
Source§

fn index(&self, idx: SynthIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<TermIdx> for Z3Parser

Source§

type Output = Term

The returned type after indexing.
Source§

fn index(&self, idx: TermIdx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Z3LogParser for Z3Parser

Source§

fn newline(&mut self)

Source§

fn version_info<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn mk_quant<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn mk_lambda<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn mk_var<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn mk_app<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn mk_proof<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn attach_meaning<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn attach_var_names<'a>( &mut self, l: impl Iterator<Item = &'a str>, ) -> Result<()>

Source§

fn attach_enode<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn eq_expl<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn new_match<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn inst_discovered<'a>( &mut self, l: impl Iterator<Item = &'a str>, ) -> Result<()>

Source§

fn instance<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn end_of_instance<'a>( &mut self, l: impl Iterator<Item = &'a str>, ) -> Result<()>

Source§

fn eof(&mut self)

Source§

fn assign<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn decide_and_or<'a>(&mut self, _l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn conflict<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn push<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn pop<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn begin_check<'a>(&mut self, l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn decide<'a>(&mut self, _l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn query_done<'a>(&mut self, _l: impl Iterator<Item = &'a str>) -> Result<()>

Source§

fn resolve_process<'a>( &mut self, _l: impl Iterator<Item = &'a str>, ) -> Result<()>

Source§

fn resolve_lit<'a>(&mut self, _l: impl Iterator<Item = &'a str>) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> LogParser for T

Source§

fn is_line_start(&mut self, first_byte: u8) -> bool

Can be used to allow for parsing entries across multiple lines.
Source§

fn process_line( &mut self, line: &str, line_no: usize, ) -> Result<bool, FatalError>

Process a single line of the log file. Return true if parsing should continue, or false if parsing should stop.
Source§

fn end_of_file(&mut self)

Source§

fn from<'r, R: BufRead + 'r>(reader: R) -> StreamParser<'r, Self>

Creates a new parser. Only use this if you cannot use the following convenience methods: Read more
Source§

fn from_async<'r, R: AsyncBufRead + Unpin + 'r>( reader: R, ) -> AsyncParser<'r, Self>

Creates a new async parser from an async buffered reader. The parser will read rom the reader line-by-line.
Source§

fn from_str(s: &str) -> StreamParser<'_, Self>

Creates a new parser from the contents of a log file. The string argument must live as long as parsing is ongoing. Release this constraint by using take_parser to end parsing. If you want the parser to take ownership of the string instead (i.e. you are running into lifetime issues), use from_string instead.
Source§

fn from_str_all(s: &str) -> Result<Self, FatalError>

Source§

fn from_string(s: String) -> StreamParser<'static, Self>

Creates a new parser from the contents of a log file. The parser takes ownership over the string.
Source§

fn from_string_all(s: String) -> Result<Self, FatalError>

Source§

fn from_file<P: AsRef<Path>>( p: P, ) -> Result<(Metadata, StreamParser<'static, Self>)>

Creates a new streaming parser from a file. Additionally returns the file metadata so that the progress can be calculated from the file size. Read more
Source§

fn from_file_all<P: AsRef<Path>>(p: P) -> Result<Self, FatalError>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> LogParserHelper for T
where T: Default,