Minor refactoring
This commit is contained in:
parent
1b827edd45
commit
fe277b6773
@ -20,63 +20,42 @@ where
|
||||
};
|
||||
|
||||
// TODO: rename to read_specification
|
||||
match crate::input::parse_specification(&specification_content, &mut problem)
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(error) =>
|
||||
if let Err(error) = crate::input::parse_specification(&specification_content, &mut problem)
|
||||
{
|
||||
log::error!("could not read specification: {}", error);
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
log::info!("read specification “{}”", specification_path.as_ref().display());
|
||||
|
||||
log::info!("reading input program “{}”", program_path.as_ref().display());
|
||||
|
||||
// TODO: make consistent with specification call (path vs. content)
|
||||
match crate::translate::verify_properties::Translator::new(&mut problem).translate(program_path)
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(error) =>
|
||||
if let Err(error) = crate::translate::verify_properties::Translator::new(&mut problem)
|
||||
.translate(program_path)
|
||||
{
|
||||
log::error!("could not translate input program: {}", error);
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
match problem.check_consistency(proof_direction)
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(error) =>
|
||||
if let Err(error) = problem.check_consistency(proof_direction)
|
||||
{
|
||||
log::error!("{}", error);
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
if !no_simplify
|
||||
{
|
||||
match problem.simplify()
|
||||
{
|
||||
Ok(_) => (),
|
||||
Err(error) =>
|
||||
if let Err(error) = problem.simplify()
|
||||
{
|
||||
log::error!("could not simplify translated program: {}", error);
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
match problem.prove(proof_direction)
|
||||
{
|
||||
Ok(()) => (),
|
||||
Err(error) =>
|
||||
if let Err(error) = problem.prove(proof_direction)
|
||||
{
|
||||
log::error!("could not verify program: {}", error);
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
log::info!("done");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user