23 lines
709 B
Rust
23 lines
709 B
Rust
use ask_dracula::format_tptp::DisplayTPTP;
|
||
|
||
fn main() -> Result<(), Box<dyn std::error::Error>>
|
||
{
|
||
let matches = clap::App::new("Ask Dracula: Using Vampire as an interactive theorem prover")
|
||
.arg(clap::Arg::with_name("file").long("file").short("f").takes_value(true).required(true))
|
||
.after_help("example: ask_dracula -f program")
|
||
.get_matches();
|
||
|
||
let file = matches.value_of("file").unwrap().to_string();
|
||
let file_path = std::path::Path::new(&file);
|
||
|
||
let file_content = std::fs::read_to_string(&file_path)?;
|
||
let (_, project) = ask_dracula::parse::project(&file_content)
|
||
.map_err(|_| "couldn’t parse input file")?;
|
||
|
||
eprintln!("{}", project);
|
||
|
||
println!("{}", project.display_tptp());
|
||
|
||
Ok(())
|
||
}
|