Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
HanielB committed Oct 13, 2024
1 parent c77cb5c commit fa7bcb4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions carcara/src/ast/polyeq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
use rug::Rational;

use super::{
AnchorArg, BindingList, Constant, Operator, ProofCommand, ProofStep, Rc, Sort,
Subproof, Term,
AnchorArg, BindingList, Constant, Operator, ProofCommand, ProofStep, Rc, Sort, Subproof, Term,
};
use crate::utils::HashMapStack;
use std::time::{Duration, Instant};
Expand Down
3 changes: 1 addition & 2 deletions carcara/src/checker/rules/quantifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ pub fn forall_inst(
QuantifierError::NoBindingMatchesArg(var_name.clone())
);
Ok((var.clone(), value.clone()))
}
else {
} else {
Err(QuantifierError::ArgNotVar(var.clone()).into())
}
})
Expand Down
5 changes: 1 addition & 4 deletions carcara/src/elaborator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ impl<'e> Elaborator<'e> {
clause: vec![term.clone()],
rule: "resolution".to_owned(),
premises: vec![new_assume, equiv1_step],
args: vec![
premise,
self.pool.bool_true(),
],
args: vec![premise, self.pool.bool_true()],
..Default::default()
}))
}
Expand Down
4 changes: 1 addition & 3 deletions carcara/src/elaborator/resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ pub fn resolution(
clause: Vec::new(),
rule: "resolution".to_owned(),
premises: vec![step.premises[0].clone(), true_step],
args: [true, false]
.map(|a| pool.bool_constant(a))
.to_vec(),
args: [true, false].map(|a| pool.bool_constant(a)).to_vec(),
..Default::default()
})));
}
Expand Down
9 changes: 6 additions & 3 deletions carcara/src/parser/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,12 @@ fn test_step() {
premises: Vec::new(),
args: {
vec![
p.add(Term::new_var("a", int_sort.clone())), p.add(Term::new_int(12)),
p.add(Term::new_var("b", real_sort)), p.add(Term::new_real((314, 100))),
p.add(Term::new_var("c", int_sort)), parse_term(&mut p, "(* 6 7)"),
p.add(Term::new_var("a", int_sort.clone())),
p.add(Term::new_int(12)),
p.add(Term::new_var("b", real_sort)),
p.add(Term::new_real((314, 100))),
p.add(Term::new_var("c", int_sort)),
parse_term(&mut p, "(* 6 7)"),
]
},
discharge: Vec::new(),
Expand Down

0 comments on commit fa7bcb4

Please sign in to comment.