[][src]Crate btor2tools

The Btor2Tools package provides a generic parser and tools for the BTOR2 format.

This crate provides high-level FFI bindings for the C Btor2Tools package. For a more detailed description of the BTOR2 format, refer to BTOR2, BtorMC and Boolector 3.0. Aina Niemetz, Mathias Preiner, Clifford Wolf, and Armin Biere. CAV 2018.

Example

use std::path::Path;
use btor2tools::Btor2Parser;

let btor2_file = Path::new("example.btor2");

Btor2Parser::new()
    .read_lines(&btor2_file)
    .unwrap() // ignore parser error
    .for_each(|line| {
        // print every parsed line
        println!("{:?}", line);
    });

Structs

Btor2Line
Btor2LineIterator
Btor2Parser
Btor2Sort

Enums

Btor2ParserError
Btor2SortContent
Btor2SortTag
Btor2Tag

BTOR2 tags can be used for fast(er) traversal and operations on BTOR2 format lines, e.g., in a switch statement in client code. Alternatively, client code can use the name of the BTOR2 tag, which is a C string (redundantly) contained in the format line. Note that this requires string comparisons and is therefore slower even if client code uses an additional hash table.