Commit 520e0f12 authored by MARCHE Claude's avatar MARCHE Claude

prover example: fixed all warnings (sometimes with wrong variants...)

parent 46e48687
...@@ -847,8 +847,7 @@ module Impl ...@@ -847,8 +847,7 @@ module Impl
use import Firstorder_formula_spec.Spec use import Firstorder_formula_spec.Spec
use import Types use import Types
use import Logic use import Logic
let rec bind_var_symbol_in_fo_formula "W:diverges:N" let rec bind_var_symbol_in_fo_formula (t:nl_fo_formula int int) (x:int)
(t:nl_fo_formula int int) (x:int)
(i:int) (ghost fr0:func int (symbol 'b0)) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1)) (ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1))
(ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula int int (ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula int int
...@@ -1031,8 +1030,7 @@ module Impl ...@@ -1031,8 +1030,7 @@ module Impl
((rename_subst_fo_term bnd1 identity identity))) ((rename_subst_fo_term bnd1 identity identity)))
end end
with bind_var_fo_term_in_fo_formula "W:diverges:N" with bind_var_fo_term_in_fo_formula (t:nl_fo_formula int int) (x:int)
(t:nl_fo_formula int int) (x:int)
(i:int) (ghost fr0:func int (symbol 'b0)) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1)) (ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1))
(ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula int int (ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula int int
...@@ -1248,8 +1246,7 @@ module Impl ...@@ -1248,8 +1246,7 @@ module Impl
((rename_subst_fo_term bnd1 identity identity))) ((rename_subst_fo_term bnd1 identity identity)))
end end
let rec unbind_var_symbol_in_fo_formula "W:diverges:N" let rec unbind_var_symbol_in_fo_formula (t:nl_fo_formula int int) (i:int)
(t:nl_fo_formula int int) (i:int)
(x:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
...@@ -1510,8 +1507,7 @@ module Impl ...@@ -1510,8 +1507,7 @@ module Impl
((rename_subst_symbol bnd20 identity))) ((rename_subst_symbol bnd20 identity)))
end end
with unbind_var_fo_term_in_fo_formula "W:diverges:N" with unbind_var_fo_term_in_fo_formula (t:nl_fo_formula int int) (i:int)
(t:nl_fo_formula int int) (i:int)
(x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0)) (x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
......
...@@ -367,8 +367,7 @@ module Impl ...@@ -367,8 +367,7 @@ module Impl
use import Firstorder_formula_list_spec.Spec use import Firstorder_formula_list_spec.Spec
use import Types use import Types
use import Logic use import Logic
let rec bind_var_symbol_in_fo_formula_list "W:diverges:N" let rec bind_var_symbol_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(x:int) (i:int) (ghost fr0:func int (symbol 'b0)) (x:int) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1)) (ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1))
(ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula_list int int (ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula_list int int
...@@ -421,8 +420,7 @@ module Impl ...@@ -421,8 +420,7 @@ module Impl
((rename_subst_fo_term bnd1 identity identity))) ((rename_subst_fo_term bnd1 identity identity)))
end end
with bind_var_fo_term_in_fo_formula_list "W:diverges:N" with bind_var_fo_term_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(x:int) (i:int) (ghost fr0:func int (symbol 'b0)) (x:int) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1)) (ghost bnd0:func int (symbol 'b0)) (ghost fr1:func int (fo_term 'b0 'b1))
(ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula_list int int (ghost bnd1:func int (fo_term 'b0 'b1)) : nl_fo_formula_list int int
...@@ -481,8 +479,7 @@ module Impl ...@@ -481,8 +479,7 @@ module Impl
((rename_subst_fo_term bnd1 identity identity))) ((rename_subst_fo_term bnd1 identity identity)))
end end
let rec unbind_var_symbol_in_fo_formula_list "W:diverges:N" let rec unbind_var_symbol_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(i:int) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (i:int) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
...@@ -557,8 +554,7 @@ module Impl ...@@ -557,8 +554,7 @@ module Impl
((rename_subst_symbol bnd20 identity))) ((rename_subst_symbol bnd20 identity)))
end end
with unbind_var_fo_term_in_fo_formula_list "W:diverges:N" with unbind_var_fo_term_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(i:int) (x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0)) (i:int) (x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
...@@ -657,8 +653,7 @@ module Impl ...@@ -657,8 +653,7 @@ module Impl
((rename_subst_fo_term bnd21 identity identity))) ((rename_subst_fo_term bnd21 identity identity)))
end end
let rec subst_base_symbol_in_fo_formula_list "W:diverges:N" let rec subst_base_symbol_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(x:int) (u:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (x:int) (u:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
...@@ -733,8 +728,7 @@ module Impl ...@@ -733,8 +728,7 @@ module Impl
((rename_subst_symbol bnd20 identity))) ((rename_subst_symbol bnd20 identity)))
end end
with subst_base_fo_term_in_fo_formula_list "W:diverges:N" with subst_base_fo_term_in_fo_formula_list (t:nl_fo_formula_list int int)
(t:nl_fo_formula_list int int)
(x:int) (u:nl_fo_term int int) (ghost fr0:func int (symbol 'b0)) (x:int) (u:nl_fo_term int int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr1:func int (fo_term 'b0 'b1)) (ghost fr1:func int (fo_term 'b0 'b1))
......
...@@ -156,8 +156,10 @@ module Impl ...@@ -156,8 +156,10 @@ module Impl
use import Logic use import Logic
let rec bind_var_symbol_in_symbol (t:nl_symbol int) (x:int) (i:int) let rec bind_var_symbol_in_symbol (t:nl_symbol int) (x:int) (i:int)
(ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0)) : (ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0)) :
nl_symbol int requires { correct_indexes_symbol t } nl_symbol int
requires { correct_indexes_symbol t }
requires { bound_depth_of_symbol_in_symbol t <= i } requires { bound_depth_of_symbol_in_symbol t <= i }
variant { nlsize_symbol t }
ensures { bound_depth_of_symbol_in_symbol result <= i + 1 } ensures { bound_depth_of_symbol_in_symbol result <= i + 1 }
ensures { correct_indexes_symbol result } ensures { correct_indexes_symbol result }
ensures { nlmodel_symbol result fr0 bnd0 = ensures { nlmodel_symbol result fr0 bnd0 =
...@@ -172,10 +174,13 @@ module Impl ...@@ -172,10 +174,13 @@ module Impl
let rec unbind_var_symbol_in_symbol (t:nl_symbol int) (i:int) let rec unbind_var_symbol_in_symbol (t:nl_symbol int) (i:int)
(x:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd20:func int (symbol 'b0)) : (ghost bnd10:func int (symbol 'b0)) (ghost bnd20:func int (symbol 'b0)) :
nl_symbol int requires { i >= 0 } requires { correct_indexes_symbol t } nl_symbol int
requires { i >= 0 }
requires { correct_indexes_symbol t }
requires { bound_depth_of_symbol_in_symbol t <= i + 1 } requires { bound_depth_of_symbol_in_symbol t <= i + 1 }
requires { correct_indexes_symbol x } requires { correct_indexes_symbol x }
requires { bound_depth_of_symbol_in_symbol x = 0 } requires { bound_depth_of_symbol_in_symbol x = 0 }
variant { nlsize_symbol t }
ensures { correct_indexes_symbol result } ensures { correct_indexes_symbol result }
ensures { bound_depth_of_symbol_in_symbol result <= i } ensures { bound_depth_of_symbol_in_symbol result <= i }
ensures { nlmodel_symbol result fr0 bnd10 = ensures { nlmodel_symbol result fr0 bnd10 =
...@@ -190,11 +195,12 @@ module Impl ...@@ -190,11 +195,12 @@ module Impl
let subst_base_symbol_in_symbol (t:nl_symbol int) (x:int) let subst_base_symbol_in_symbol (t:nl_symbol int) (x:int)
(u:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (u:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd20:func int (symbol 'b0)) : (ghost bnd10:func int (symbol 'b0)) (ghost bnd20:func int (symbol 'b0)) :
nl_symbol int requires { correct_indexes_symbol t } nl_symbol int
requires { correct_indexes_symbol t }
requires { correct_indexes_symbol u } requires { correct_indexes_symbol u }
requires { bound_depth_of_symbol_in_symbol u = 0 } requires { bound_depth_of_symbol_in_symbol u = 0 }
ensures { correct_indexes_symbol result } ensures { correct_indexes_symbol result }
ensures { bound_depth_of_symbol_in_symbol result = ensures { bound_depth_of_symbol_in_symbol result =
bound_depth_of_symbol_in_symbol t } bound_depth_of_symbol_in_symbol t }
ensures { nlmodel_symbol result fr0 bnd10 = ensures { nlmodel_symbol result fr0 bnd10 =
nlmodel_symbol t (update fr0 x (nlmodel_symbol u fr0 bnd20)) bnd10 } nlmodel_symbol t (update fr0 x (nlmodel_symbol u fr0 bnd20)) bnd10 }
......
...@@ -576,6 +576,7 @@ module Impl ...@@ -576,6 +576,7 @@ module Impl
requires { bound_depth_of_symbol_in_tableau t <= i + 1 } requires { bound_depth_of_symbol_in_tableau t <= i + 1 }
requires { correct_indexes_symbol x } requires { correct_indexes_symbol x }
requires { bound_depth_of_symbol_in_symbol x = 0 } requires { bound_depth_of_symbol_in_symbol x = 0 }
variant { nlsize_tableau t }
ensures { correct_indexes_tableau result } ensures { correct_indexes_tableau result }
ensures { bound_depth_of_symbol_in_tableau result <= i } ensures { bound_depth_of_symbol_in_tableau result <= i }
ensures { bound_depth_of_fo_term_in_tableau result = ensures { bound_depth_of_fo_term_in_tableau result =
...@@ -677,6 +678,7 @@ module Impl ...@@ -677,6 +678,7 @@ module Impl
requires { correct_indexes_fo_term x } requires { correct_indexes_fo_term x }
requires { bound_depth_of_symbol_in_fo_term x = 0 } requires { bound_depth_of_symbol_in_fo_term x = 0 }
requires { bound_depth_of_fo_term_in_fo_term x = 0 } requires { bound_depth_of_fo_term_in_fo_term x = 0 }
variant { nlsize_tableau t }
ensures { correct_indexes_tableau result } ensures { correct_indexes_tableau result }
ensures { bound_depth_of_fo_term_in_tableau result <= i } ensures { bound_depth_of_fo_term_in_tableau result <= i }
ensures { bound_depth_of_symbol_in_tableau result = ensures { bound_depth_of_symbol_in_tableau result =
...@@ -808,8 +810,9 @@ module Impl ...@@ -808,8 +810,9 @@ module Impl
requires { correct_indexes_tableau t } requires { correct_indexes_tableau t }
requires { correct_indexes_symbol u } requires { correct_indexes_symbol u }
requires { bound_depth_of_symbol_in_symbol u = 0 } requires { bound_depth_of_symbol_in_symbol u = 0 }
variant { nlsize_tableau t }
ensures { correct_indexes_tableau result } ensures { correct_indexes_tableau result }
ensures { bound_depth_of_symbol_in_tableau result = ensures { bound_depth_of_symbol_in_tableau result =
bound_depth_of_symbol_in_tableau t } bound_depth_of_symbol_in_tableau t }
ensures { bound_depth_of_fo_term_in_tableau result = ensures { bound_depth_of_fo_term_in_tableau result =
bound_depth_of_fo_term_in_tableau t } bound_depth_of_fo_term_in_tableau t }
...@@ -909,8 +912,9 @@ module Impl ...@@ -909,8 +912,9 @@ module Impl
requires { correct_indexes_fo_term u } requires { correct_indexes_fo_term u }
requires { bound_depth_of_symbol_in_fo_term u = 0 } requires { bound_depth_of_symbol_in_fo_term u = 0 }
requires { bound_depth_of_fo_term_in_fo_term u = 0 } requires { bound_depth_of_fo_term_in_fo_term u = 0 }
variant { nlsize_tableau t }
ensures { correct_indexes_tableau result } ensures { correct_indexes_tableau result }
ensures { bound_depth_of_symbol_in_tableau result = ensures { bound_depth_of_symbol_in_tableau result =
bound_depth_of_symbol_in_tableau t } bound_depth_of_symbol_in_tableau t }
ensures { bound_depth_of_fo_term_in_tableau result = ensures { bound_depth_of_fo_term_in_tableau result =
bound_depth_of_fo_term_in_tableau t } bound_depth_of_fo_term_in_tableau t }
......
...@@ -604,8 +604,7 @@ module Impl ...@@ -604,8 +604,7 @@ module Impl
use import Firstorder_term_spec.Spec use import Firstorder_term_spec.Spec
use import Types use import Types
use import Logic use import Logic
let rec bind_var_symbol_in_fo_term_list "W:diverges:N" let rec bind_var_symbol_in_fo_term_list (t:nl_fo_term_list int int) (x:int)
(t:nl_fo_term_list int int) (x:int)
(i:int) (ghost fr0:func int (symbol 'b0)) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr3:func int (fo_term 'b0 'b3)) (ghost bnd0:func int (symbol 'b0)) (ghost fr3:func int (fo_term 'b0 'b3))
(ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term_list int int (ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term_list int int
...@@ -658,8 +657,7 @@ module Impl ...@@ -658,8 +657,7 @@ module Impl
((rename_subst_fo_term bnd3 identity identity))) ((rename_subst_fo_term bnd3 identity identity)))
end end
with bind_var_fo_term_in_fo_term_list "W:diverges:N" with bind_var_fo_term_in_fo_term_list (t:nl_fo_term_list int int) (x:int)
(t:nl_fo_term_list int int) (x:int)
(i:int) (ghost fr0:func int (symbol 'b0)) (i:int) (ghost fr0:func int (symbol 'b0))
(ghost bnd0:func int (symbol 'b0)) (ghost fr3:func int (fo_term 'b0 'b3)) (ghost bnd0:func int (symbol 'b0)) (ghost fr3:func int (fo_term 'b0 'b3))
(ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term_list int int (ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term_list int int
...@@ -718,8 +716,7 @@ module Impl ...@@ -718,8 +716,7 @@ module Impl
((rename_subst_fo_term bnd3 identity identity))) ((rename_subst_fo_term bnd3 identity identity)))
end end
with bind_var_symbol_in_fo_term "W:diverges:N" with bind_var_symbol_in_fo_term (t:nl_fo_term int int) (x:int) (i:int)
(t:nl_fo_term int int) (x:int) (i:int)
(ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0)) (ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
(ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term int int (ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term int int
...@@ -771,8 +768,7 @@ module Impl ...@@ -771,8 +768,7 @@ module Impl
((rename_subst_fo_term bnd3 identity identity))) ((rename_subst_fo_term bnd3 identity identity)))
end end
with bind_var_fo_term_in_fo_term "W:diverges:N" with bind_var_fo_term_in_fo_term (t:nl_fo_term int int) (x:int) (i:int)
(t:nl_fo_term int int) (x:int) (i:int)
(ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0)) (ghost fr0:func int (symbol 'b0)) (ghost bnd0:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
(ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term int int (ghost bnd3:func int (fo_term 'b0 'b3)) : nl_fo_term int int
...@@ -814,8 +810,7 @@ module Impl ...@@ -814,8 +810,7 @@ module Impl
((rename_subst_fo_term bnd3 identity identity))) ((rename_subst_fo_term bnd3 identity identity)))
end end
let rec unbind_var_symbol_in_fo_term_list "W:diverges:N" let rec unbind_var_symbol_in_fo_term_list (t:nl_fo_term_list int int)
(t:nl_fo_term_list int int)
(i:int) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (i:int) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
...@@ -890,8 +885,7 @@ module Impl ...@@ -890,8 +885,7 @@ module Impl
((rename_subst_symbol bnd20 identity))) ((rename_subst_symbol bnd20 identity)))
end end
with unbind_var_fo_term_in_fo_term_list "W:diverges:N" with unbind_var_fo_term_in_fo_term_list (t:nl_fo_term_list int int) (i:int)
(t:nl_fo_term_list int int) (i:int)
(x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0)) (x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
...@@ -990,8 +984,7 @@ module Impl ...@@ -990,8 +984,7 @@ module Impl
((rename_subst_fo_term bnd23 identity identity))) ((rename_subst_fo_term bnd23 identity identity)))
end end
with unbind_var_symbol_in_fo_term "W:diverges:N" with unbind_var_symbol_in_fo_term (t:nl_fo_term int int) (i:int)
(t:nl_fo_term int int) (i:int)
(x:nl_symbol int) (ghost fr0:func int (symbol 'b0)) (x:nl_symbol int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
...@@ -1065,8 +1058,7 @@ module Impl ...@@ -1065,8 +1058,7 @@ module Impl
((rename_subst_symbol bnd20 identity))) ((rename_subst_symbol bnd20 identity)))
end end
with unbind_var_fo_term_in_fo_term "W:diverges:N" with unbind_var_fo_term_in_fo_term (t:nl_fo_term int int) (i:int)
(t:nl_fo_term int int) (i:int)
(x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0)) (x:nl_fo_term int int) (ghost fr0:func int (symbol 'b0))
(ghost bnd10:func int (symbol 'b0)) (ghost bnd10:func int (symbol 'b0))
(ghost fr3:func int (fo_term 'b0 'b3)) (ghost fr3:func int (fo_term 'b0 'b3))
......
This diff is collapsed.
module Types module Types
end end
module Impl module Impl
use import Firstorder_semantics.Sem use import Firstorder_semantics.Sem
use import Firstorder_term_spec.Spec use import Firstorder_term_spec.Spec
use import Firstorder_formula_spec.Spec use import Firstorder_formula_spec.Spec
...@@ -35,12 +35,13 @@ module Impl ...@@ -35,12 +35,13 @@ module Impl
use import list.List use import list.List
use import set.Set as S use import set.Set as S
use import BacktrackArray.Impl as BA use import BacktrackArray.Impl as BA
val ghost sdata_inv_hack (u:unit) : pred sdata val ghost sdata_inv_hack (u:unit) : pred sdata
ensures { result = sdata_inv } ensures { result = sdata_inv }
let main (base:nlimpl_fo_formula_list) (gnum:int) : unit let main (base:nlimpl_fo_formula_list) (gnum:int) : unit
requires { nlimpl_fo_formula_list_ok base } requires { nlimpl_fo_formula_list_ok base }
diverges
ensures { forall m:model int 'st,rho:func int 'st. ensures { forall m:model int 'st,rho:func int 'st.
not(formula_list_conj_semantic base.model_fo_formula_list_field m rho) } not(formula_list_conj_semantic base.model_fo_formula_list_field m rho) }
raises { Sat -> forall m:model int 'st,rho:func int 'st. raises { Sat -> forall m:model int 'st,rho:func int 'st.
...@@ -53,6 +54,7 @@ module Impl ...@@ -53,6 +54,7 @@ module Impl
assert { root.model_tableau_field = Root } ; assert { root.model_tableau_field = Root } ;
let gnum = phip.final_goals_number in let gnum = phip.final_goals_number in
let rec aux (n:int) : prover_return let rec aux (n:int) : prover_return
diverges
returns { { contradictory_assignment = s } -> returns { { contradictory_assignment = s } ->
forall m:model int 'st,rho:func int 'st. forall m:model int 'st,rho:func int 'st.
let rhos = semantic_subst s m rho in let rhos = semantic_subst s m rho in
...@@ -88,7 +90,5 @@ module Impl ...@@ -88,7 +90,5 @@ module Impl
not(formula_list_conj_semantic basem m rho) } not(formula_list_conj_semantic basem m rho) }
with Unsat -> () with Unsat -> ()
end end
end
end
module Types module Types
end end
module Impl module Impl
use import ProverMain.Impl use import ProverMain.Impl
use import Firstorder_symbol_impl.Types use import Firstorder_symbol_impl.Types
use import Firstorder_term_impl.Types use import Firstorder_term_impl.Types
...@@ -19,7 +19,7 @@ module Impl ...@@ -19,7 +19,7 @@ module Impl
use import Firstorder_formula_impl.Impl use import Firstorder_formula_impl.Impl
use import Firstorder_formula_list_impl.Impl use import Firstorder_formula_list_impl.Impl
use import int.Int use import int.Int
let imply (a b:nlimpl_fo_formula) : nlimpl_fo_formula let imply (a b:nlimpl_fo_formula) : nlimpl_fo_formula
requires { nlimpl_fo_formula_ok a } requires { nlimpl_fo_formula_ok a }
requires { nlimpl_fo_formula_ok b } requires { nlimpl_fo_formula_ok b }
...@@ -27,14 +27,14 @@ module Impl ...@@ -27,14 +27,14 @@ module Impl
= =
construct_fo_formula (NLC_Or construct_fo_formula (NLC_Or
(construct_fo_formula (NLC_Not a)) b) (construct_fo_formula (NLC_Not a)) b)
let equiv (a b:nlimpl_fo_formula) : nlimpl_fo_formula let equiv (a b:nlimpl_fo_formula) : nlimpl_fo_formula
requires { nlimpl_fo_formula_ok a } requires { nlimpl_fo_formula_ok a }
requires { nlimpl_fo_formula_ok b } requires { nlimpl_fo_formula_ok b }
ensures { nlimpl_fo_formula_ok result } ensures { nlimpl_fo_formula_ok result }
= =
construct_fo_formula (NLC_And (imply a b) (imply b a)) construct_fo_formula (NLC_And (imply a b) (imply b a))
let drinker () : nlimpl_fo_formula_list let drinker () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -51,7 +51,7 @@ module Impl ...@@ -51,7 +51,7 @@ module Impl
(* exists x, (c0 x -> forall x,c0 x) *) (* exists x, (c0 x -> forall x,c0 x) *)
let phi4 = construct_fo_formula (NLC_Not phi3) in let phi4 = construct_fo_formula (NLC_Not phi3) in
construct_fo_formula_list (NLC_FOFCons phi4 fonil) construct_fo_formula_list (NLC_FOFCons phi4 fonil)
let group () : nlimpl_fo_formula_list let group () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -60,7 +60,7 @@ module Impl ...@@ -60,7 +60,7 @@ module Impl
let c0 = construct_symbol (NLCVar_symbol 0) in (* c0 *) let c0 = construct_symbol (NLCVar_symbol 0) in (* c0 *)
let c1 = construct_symbol (NLCVar_symbol 1) in (* e *) let c1 = construct_symbol (NLCVar_symbol 1) in (* e *)
let neutral = construct_fo_term (NLC_App c1 fotnil) in let neutral = construct_fo_term (NLC_App c1 fotnil) in
let rec aux (v1 v2 v3:nlimpl_fo_term) : nlimpl_fo_formula let aux (v1 v2 v3:nlimpl_fo_term) : nlimpl_fo_formula
requires { nlimpl_fo_term_ok v1 } requires { nlimpl_fo_term_ok v1 }
requires { nlimpl_fo_term_ok v2 } requires { nlimpl_fo_term_ok v2 }
requires { nlimpl_fo_term_ok v3 } requires { nlimpl_fo_term_ok v3 }
...@@ -77,13 +77,13 @@ module Impl ...@@ -77,13 +77,13 @@ module Impl
let v3 = construct_fo_term (NLCVar_fo_term 3) in (* t *) let v3 = construct_fo_term (NLCVar_fo_term 3) in (* t *)
let v4 = construct_fo_term (NLCVar_fo_term 4) in (* u *) let v4 = construct_fo_term (NLCVar_fo_term 4) in (* u *)
let v5 = construct_fo_term (NLCVar_fo_term 5) in (* v *) let v5 = construct_fo_term (NLCVar_fo_term 5) in (* v *)
(* forall x y, exists z. c0(x,y,z) *) (* forall x y, exists z. c0(x,y,z) *)
let phimul = aux v0 v1 v2 in (* c0(x,y,z) *) let phimul = aux v0 v1 v2 in (* c0(x,y,z) *)
let phimul = construct_fo_formula (NLC_Exists 2 phimul) in (* exists z,c0(x,y,z) *) let phimul = construct_fo_formula (NLC_Exists 2 phimul) in (* exists z,c0(x,y,z) *)
let phimul = construct_fo_formula (NLC_Forall 1 phimul) in (* forall y,exists z. c0(x,y,z) *) let phimul = construct_fo_formula (NLC_Forall 1 phimul) in (* forall y,exists z. c0(x,y,z) *)
let phimul = construct_fo_formula (NLC_Forall 0 phimul) in (* forall x y,exists z.c0(x,y,z) *) let phimul = construct_fo_formula (NLC_Forall 0 phimul) in (* forall x y,exists z.c0(x,y,z) *)
(* forall x y z t u v. (* forall x y z t u v.
(* xy = t /\ yz = v -> (tz = u <-> xv = u) *) (* xy = t /\ yz = v -> (tz = u <-> xv = u) *)
c0(x,y,t) /\ c0(y,z,v) -> (c0(t,z,u) <-> c0(x,v,u)) *) c0(x,y,t) /\ c0(y,z,v) -> (c0(t,z,u) <-> c0(x,v,u)) *)
...@@ -104,18 +104,18 @@ module Impl ...@@ -104,18 +104,18 @@ module Impl
let phiass = construct_fo_formula (NLC_Forall 2 phiass) in let phiass = construct_fo_formula (NLC_Forall 2 phiass) in
let phiass = construct_fo_formula (NLC_Forall 1 phiass) in let phiass = construct_fo_formula (NLC_Forall 1 phiass) in
let phiass = construct_fo_formula (NLC_Forall 0 phiass) in let phiass = construct_fo_formula (NLC_Forall 0 phiass) in
(* forall x. c0(e,x,x) /\ c0(x,e,x) *) (* forall x. c0(e,x,x) /\ c0(x,e,x) *)
let phin0 = aux neutral v0 v0 in let phin0 = aux neutral v0 v0 in
let phin1 = aux v0 neutral v0 in let phin1 = aux v0 neutral v0 in
let phin = construct_fo_formula (NLC_And phin0 phin1) in let phin = construct_fo_formula (NLC_And phin0 phin1) in
let phin = construct_fo_formula (NLC_Forall 0 phin) in let phin = construct_fo_formula (NLC_Forall 0 phin) in
(* forall x. c0(x,x,e) *) (* forall x. c0(x,x,e) *)
let phi2 = aux v0 v0 neutral in let phi2 = aux v0 v0 neutral in
let phi2 = construct_fo_formula (NLC_Forall 0 phi2) in let phi2 = construct_fo_formula (NLC_Forall 0 phi2) in
(* forall x y z. c0(x,y,z) -> c0(y,x,z) *) (* forall x y z. c0(x,y,z) -> c0(y,x,z) *)
let phigh = aux v0 v1 v2 in let phigh = aux v0 v1 v2 in
let phig = aux v1 v0 v2 in let phig = aux v1 v0 v2 in
...@@ -124,14 +124,14 @@ module Impl ...@@ -124,14 +124,14 @@ module Impl
let phig = construct_fo_formula (NLC_Forall 1 phig) in let phig = construct_fo_formula (NLC_Forall 1 phig) in
let phig = construct_fo_formula (NLC_Forall 0 phig) in let phig = construct_fo_formula (NLC_Forall 0 phig) in
let phig = construct_fo_formula (NLC_Not phig) in let phig = construct_fo_formula (NLC_Not phig) in
let l = construct_fo_formula_list (NLC_FOFCons phimul fonil) in let l = construct_fo_formula_list (NLC_FOFCons phimul fonil) in
let l = construct_fo_formula_list (NLC_FOFCons phiass l) in let l = construct_fo_formula_list (NLC_FOFCons phiass l) in
let l = construct_fo_formula_list (NLC_FOFCons phin l) in let l = construct_fo_formula_list (NLC_FOFCons phin l) in
let l = construct_fo_formula_list (NLC_FOFCons phi2 l) in let l = construct_fo_formula_list (NLC_FOFCons phi2 l) in
let l = construct_fo_formula_list (NLC_FOFCons phig l) in let l = construct_fo_formula_list (NLC_FOFCons phig l) in
l l
let bidon1 () : nlimpl_fo_formula_list let bidon1 () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -141,7 +141,7 @@ module Impl ...@@ -141,7 +141,7 @@ module Impl
let a = construct_fo_formula (NLC_PApp a fotnil) in let a = construct_fo_formula (NLC_PApp a fotnil) in
let r = construct_fo_formula (NLC_Not (imply a a)) in let r = construct_fo_formula (NLC_Not (imply a a)) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let bidon2 () : nlimpl_fo_formula_list let bidon2 () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -155,7 +155,7 @@ module Impl ...@@ -155,7 +155,7 @@ module Impl
let a = construct_fo_formula (NLC_And a b) in let a = construct_fo_formula (NLC_And a b) in
let r = construct_fo_formula (NLC_Not (imply a o)) in let r = construct_fo_formula (NLC_Not (imply a o)) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let bidon3 () : nlimpl_fo_formula_list let bidon3 () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -170,7 +170,7 @@ module Impl ...@@ -170,7 +170,7 @@ module Impl
let r = imply (imply a (imply b c)) (imply (imply a b) (imply a c)) in let r = imply (imply a (imply b c)) (imply (imply a b) (imply a c)) in
let r = construct_fo_formula (NLC_Not r) in let r = construct_fo_formula (NLC_Not r) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let bidon4 () : nlimpl_fo_formula_list let bidon4 () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -185,7 +185,7 @@ module Impl ...@@ -185,7 +185,7 @@ module Impl
let r = imply (imply a (imply b c)) (imply b (imply a c)) in let r = imply (imply a (imply b c)) (imply b (imply a c)) in
let r = construct_fo_formula (NLC_Not r) in let r = construct_fo_formula (NLC_Not r) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let pierce () : nlimpl_fo_formula_list let pierce () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -198,7 +198,7 @@ module Impl ...@@ -198,7 +198,7 @@ module Impl
let r = imply (imply (imply a b) a) a in let r = imply (imply (imply a b) a) a in
let r = construct_fo_formula (NLC_Not r) in let r = construct_fo_formula (NLC_Not r) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let generate (n:int) : nlimpl_fo_formula_list let generate (n:int) : nlimpl_fo_formula_list
requires { n >= 0 } requires { n >= 0 }
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
...@@ -215,7 +215,7 @@ module Impl ...@@ -215,7 +215,7 @@ module Impl
if m = 0 if m = 0
then equiv symb (aux0 n) then equiv symb (aux0 n)
else equiv symb (aux1 (m-1)) else equiv symb (aux1 (m-1))
with aux0 (m:int) : nlimpl_fo_formula with aux0 (m:int) : nlimpl_fo_formula
ensures { nlimpl_fo_formula_ok result } ensures { nlimpl_fo_formula_ok result }
requires { m >= 0 } requires { m >= 0 }
...@@ -229,7 +229,7 @@ module Impl ...@@ -229,7 +229,7 @@ module Impl
in in
let r = construct_fo_formula (NLC_Not (aux1 n)) in let r = construct_fo_formula (NLC_Not (aux1 n)) in
construct_fo_formula_list (NLC_FOFCons r fonil) construct_fo_formula_list (NLC_FOFCons r fonil)
let zenon5 () : nlimpl_fo_formula_list let zenon5 () : nlimpl_fo_formula_list
ensures { nlimpl_fo_formula_list_ok result } ensures { nlimpl_fo_formula_list_ok result }
= =
...@@ -249,9 +249,9 @@ module Impl ...@@ -249,9 +249,9 @@ module Impl
let l = construct_fo_formula_list (NLC_FOFCons e2 l) in let l = construct_fo_formula_list (NLC_FOFCons e2 l) in