Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fblanqui committed Jan 28, 2025
1 parent ead8c85 commit 7392193
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/handle/why3_tactic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ let rec translate_prop : config -> l2y -> term -> l2y * Why3.Term.term =
let default m t =
try
let sym = List.assoc_eq (Eval.eq_modulo []) t m.t2ls in
(m, Why3.Term.ps_app sym [])
m, Why3.Term.ps_app sym []
with Not_found ->
let sym = Why3.Term.create_psymbol (Why3.Ident.id_fresh "X") [] in
if Logger.log_enabled() then
log "abstract [%a] as psymbol %a" term t Why3.Pretty.print_ls sym;
({m with t2ls = (t,sym)::m.t2ls}, Why3.Term.ps_app sym [])
{m with t2ls = (t,sym)::m.t2ls}, Why3.Term.ps_app sym []
in
fun cfg m t ->
if Logger.log_enabled() then log "translate_prop %a [%a]" l2y m term t;
Expand Down
8 changes: 6 additions & 2 deletions tests/OK/why3.lp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ opaque symbol test9 a p : π (¬ (`∃ x:τ a, p x) ⇔ (`∀ x, ¬ (p x))) ≔

opaque symbol test10 a p x q : π ((`∀ x:τ a, p x ⇒ q) ⇒ p x ⇒ q) ≔ begin why3 end;

//opaque symbol test a p x q : π ((`∀ x:τ a, p x ⇒ (λ y, q y) x) ⇒ p x ⇒ (λ y, q y) x) ≔ begin why3 end;

//opaque symbol test a p x q : π ((`∀ x:τ a, p x ⇒ q ((λ y,y)x)) ⇒ p x ⇒ q ((λ y,y)x)) ≔ begin why3 end;

//constant symbol o:Set;
//rule τ o ↪ Prop;

//opaque symbol test10 a (p:τ(nat ⤳ o)) : π (¬ (`∃ x:τ a, p x) ⇔ (`∀ x, ¬ (p x))) ≔ begin why3 end;
//opaque symbol test a (p:τ(nat ⤳ o)) : π (¬ (`∃ x:τ a, p x) ⇔ (`∀ x, ¬ (p x))) ≔ begin why3 end;

//opaque symbol test10 : π (`∃ p, p ⇒ p) ≔ begin why3 end;
//opaque symbol test : π (`∃ p, p ⇒ p) ≔ begin why3 end;

0 comments on commit 7392193

Please sign in to comment.