summaryrefslogtreecommitdiff
path: root/isabelle-proto/src/main.rs
blob: 1b52e27e1b8c6b7a767bc3010d0ab8aefbbc7dcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
mod session;
mod messages;
mod pipe;


use session::IsabelleSession;




use structopt::StructOpt;



#[derive(StructOpt)]
#[structopt(name = "isabelle-proto-POC", about="proof of concept for communicating with an Isabelle server")]
struct Options {
    theory : String,
    #[structopt(name="directory", default_value=Box::leak(Box::new(std::env::current_dir().unwrap().into_os_string().into_string().unwrap())))]
    directory : String
}



fn main() {
    let options = Options::from_args();
    let mut session = IsabelleSession::start_with_client();

    let started = session.start_session("HOL".to_owned(),vec![]).unwrap();

    println!("{:?}", started);

    let theoryresults = session.load_theory(
        options.theory,
        Some(options.directory)
    );

    println!("loaded theory: {:?}", theoryresults);
}