pub fn read_vpg(manager: &BDDManagerRef, reader: impl Read) -> Result<VariabilityParityGame, MercError> {
let confs_regex = Regex::new(r#"confs\s+([+-01]*)\s*;"#).expect("Regex compilation should not fail");
let header_regex = Regex::new(r#"parity\s+([0-9]+)\s*;"#).expect("Regex compilation should not fail");
let progress = TimeProgress::new(|(amount, total): (usize, usize)| info!("Read {} vertices ({}%)...", amount, amount * 100 / total), 1);
/// Parses a configuration set from a string representation into a BDD function, but also creates the necessary variables.
fn parse_configuration(manager: &BDDManagerRef, config: &str) -> Result<(Vec<BDDFunction>, BDDFunction), MercError> {
/// A configuration is represented as a string \<entry\>+\<entry\>+..., where each entry is either
/// a sequence consisting of '-', '0', and '1', representing don't care, false, and true respectively.
/// The length of the sequence determines the number of boolean variables. So `-1--` represents a boolean
/// The variables must be defined beforehand and are assumed to be in order, i.e., the first character
pub fn write_vpg(writer: &mut impl Write, game: &VariabilityParityGame) -> Result<(), MercError> {
|(index, total): (usize, usize)| info!("Wrote {} vertices ({}%)...", index, index * 100 / total),