diff --git a/src/main.rs b/src/main.rs index 0005856..5594f90 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,21 +2,31 @@ use structopt::StructOpt as _; #[derive(Debug, structopt::StructOpt)] #[structopt(name = "anthem", about = "Use first-order theorem provers with answer set programs.")] -struct Options +enum Command { - #[structopt(parse(from_os_str))] - input: Vec, + #[structopt(about = "Verifies a logic program against a specification")] + VerifyProgram + { + #[structopt(parse(from_os_str))] + input: Vec, + } } fn main() { pretty_env_logger::init(); - let options = Options::from_args(); + let command = Command::from_args(); - if let Err(error) = anthem::translate::verify_properties::translate(&options.input) + match command { - log::error!("could not translate input program: {}", error); - std::process::exit(1) + Command::VerifyProgram{input} => + { + if let Err(error) = anthem::translate::verify_properties::translate(&input) + { + log::error!("could not translate input program: {}", error); + std::process::exit(1) + } + }, } }