btor2rs

Crates.iobtor2rs
lib.rsbtor2rs
version0.1.0
sourcesrc
created_at2023-10-16 21:45:23.885783
updated_at2024-01-06 16:28:37.172317
descriptionSafe-Rust Btor2 parser
homepage
repository
max_upload_size
id1005232
size34,535
(onderjan)

documentation

README

Safe-Rust Btor2 parser

This crate is a lighweight alternative to Btor2Tools and their Rust wrapper btor2tools. Only safe Rust is used in this parser.

Usage

use btor2rs::Btor2;
let path = std::path::Path::new("example.btor2");
let content = std::fs::read_to_string(path).unwrap();
let btor2 = Btor2::parse(content.lines());
println!("Parsed: {:?}", btor2);

Notes on Btor2

The Btor2 format is (incompletely) documented in Niemetz, A., Preiner, M., Wolf, C., Biere, A. (2018). BTOR2, BtorMC and Boolector 3.0. CAV 2018. This crate aims for compatibility with the format as parsed by Btor2Tools and used in Hardware model-checking benchmarks. Specifically, right-side nodes can be immediately bit-inverted by using a minus sign, which is not present in the original paper.

License

This crate is licensed under Apache 2.0 License or MIT License at your discretion.

Commit count: 0

cargo fmt