adds type inference stage

This commit is contained in:
damirka 2021-08-19 10:46:28 +03:00
parent 52b2a4a3cb
commit 2c7a2b804d
2 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ jobs:
do
cd tmp/tgc/$dir; # enter the directory
./../../../acl2/tgc canonicalization initial_ast.json canonicalization_ast.json canonicalization-theorem.lisp > result.out || errors+=("$dir");
./../../../acl2/tgc type-inference canonicalization_ast.json type_inferenced_ast.json type-inference-theorem.lisp || errors+=("$dir");
cd ../../..
done;

View File

@ -97,7 +97,7 @@ fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
.unwrap_or(PathBuf::from(path));
// Write all files into the directory.
let (initial, canonicalized, _type_inferenced) = generate_asts(cwd, text)?;
let (initial, canonicalized, type_inferenced) = generate_asts(cwd, text)?;
target.push("initial_ast.json");
fs::write(target.clone(), initial)?;
@ -105,6 +105,10 @@ fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
target.push("canonicalization_ast.json");
fs::write(target.clone(), canonicalized)?;
target.pop();
target.push("type_inferenced_ast.json");
fs::write(target.clone(), type_inferenced)?;
}
}
@ -133,7 +137,8 @@ fn handle_error(res: Result<(), Box<dyn Error>>) {
match res {
Ok(_) => (),
Err(err) => {
eprintln!("Error: {}", err);
// eprintln!("Error: {}", err);
panic!();
std::process::exit(1);
}
}