Expand description
§Overview
Library for converting and serializing any symbolic circuit into AIGER format. It can also be used to query and iterate over the AIGER inputs, gates, and outputs which could be used to generate an AST for a solver.
§Using Aiger
// Output is the output value of a complex circuit
let aiger = Aiger::with_output(&output);
let serialized = aiger.serialize_binary();§Iterating over circuit components
let aiger = Aiger::with_output(&output);
for input in aiger.inputs() {
// Iterate over all variables used in the circuit
}
for gate in aiger.gates() {
// Iterate over all unique gates in the circuit
}
for output in aiger.outputs() {
// Iterate over all circuit outputs
}§Simple Circuit
The SimpleCircuit object can be used to build circuits for Aiger.
let output = !SimpleCircuit::var(0) & SimpleCircuit::lit(true);
let aiger = Aiger::with_output(&output);
let serialized = aiger.serialize_binary();§Circuit Conversion
This library does not prescribe a circuit representation. Simply implement the AsAigerCircuit trait to enable support for your own custom circuit type.
impl<'a> AsAigerCircuit<'a> for YourCircuitType {
type Inner = YourCircuitType;
fn as_aiger_circuit(&'a self) -> AigerCircuit<'a, Self::Inner> {
// Generate approprite AigerCircuit type (And, Not, Variable, Literal)
todo!();
}
}Modules§
Structs§
- Aiger
- The core object for generating AIGER formatted data. For inspecting the AST see Aiger::inputs, Aiger::gates, and Aiger::outputs.