Commit 79aafc12 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Changed deprecated usage of some operator since ocaml-4.01.0

parent dac485c2
......@@ -52,7 +52,7 @@ let () =
| Not_found -> s in
let (major,minor,add) = version v in
let (major_r, minor_r, add_r) = version !ref_version in
if major > major_r or (major = major_r && (minor > minor_r or (minor = minor_r && add >= add_r)))
if major > major_r || (major = major_r && (minor > minor_r || (minor = minor_r && add >= add_r)))
then
let () = Printf.printf "OK\n" in exit 0
else
......
......@@ -17,7 +17,7 @@
# #
##########################################################################
load d ../data/montague-drt.acg;
load d montague-drt.acg;
list ;
abstract print;
#abstract analyse beats (every farmer) a donkey) : s;
......
load d neg-raising.acg;
# - (penser (croire (aller_a_Dax P) J) M) : prop
read interpretation_3 analyse
c_ira_a_Dax (c_croit_1 (c_pense_1 I_p NEG c_Marie) I_v c_Jane) I_v c_Paul:P;
# penser (- (croire (aller_a_Dax P) J)) M : prop
read interpretation_3 analyse
c_ira_a_Dax (c_croit_1 (c_pense_2 I_p NEG c_Marie) I_v c_Jane) I_v c_Paul:P;
# - (penser (croire (aller_a_Dax P) J) M) : prop
read interpretation_3 analyse
c_ira_a_Dax (c_croit_2 (c_pense_1 I_p NEG c_Marie) I_v c_Jane) I_v c_Paul:P;
# penser (croire (- (aller_a_Dax P)) J) M : prop
read interpretation_3 analyse
c_ira_a_Dax (c_croit_2 (c_pense_2 I_p NEG c_Marie) I_v c_Jane) I_v c_Paul:P;
......
......@@ -14,8 +14,9 @@ signature derived =
P2:tree -> tree -> tree;
P3:tree -> tree -> tree -> tree;
V2:tree -> tree -> tree;
V3:tree -> tree -> tree -> tree;
N,V:tree -> tree;
croit,pense,que,Paul,Marie,Jane,ira,a_Dax,pas:tree;
croit,pense,que,Paul,Marie,Jane,ira,a_Dax,ne,pas:tree;
end
lexicon read (derivations) : derived =
......@@ -30,7 +31,7 @@ lexicon read (derivations) : derived =
c_Paul:= N Paul;
c_Jane:= N Jane;
NEG := lambda x. V2 x pas;
NEG := lambda x. V3 ne x pas;
......@@ -50,6 +51,7 @@ signature logic =
-> (prop -> prop) -> (prop -> prop) -> ind -> (prop -> prop) ;
prefix - : prop -> prop;
ID = lambda x.x : prop -> prop;
ID' = lambda p x.p x : (ind -> prop) -> (ind -> prop);
end
lexicon interpretation (derivations):logic =
......@@ -131,3 +133,4 @@ lexicon interpretation_3 (derivations):logic =
end
......@@ -132,12 +132,12 @@ struct
let is_lower adp1 adp2 =
(match (adp1,adp2) with
(AdP(k,ad1),AdP(l,ad2))->
(l=k) &
(l=k) &&
(List.fold_left2
(function b_res ->
function b1 ->
function b2 ->
b_res & ((not b1) || b2)
b_res && ((not b1) || b2)
)
true
ad1
......
......@@ -54,7 +54,7 @@ module Oriented_pmcfg =
in
check_order_id arg_ord 0
in
if (arity=rank) & (is_order_id arg_ord)
if (arity=rank) && (is_order_id arg_ord)
then (rank,name)
else
(arity,name^"_"^(String.concat "" (List.map string_of_int arg_ord)))
......
......@@ -179,7 +179,7 @@ module Lambda =
false
| App((Const s|DConst s),Abs(x,u)) when is_binder s id_to_sym ->
let x' = generate_var_name x env in
let vars,l_l,l,u = unfold_binder s l_level (level+1) id_to_sym [level,(x',Abstract_syntax.Non_linear)] env u in
let vars,l_l,l,u = unfold_binder s l_level (level+1) id_to_sym [level,(x',Abstract_syntax.Non_linear)] ((level,x')::env) u in
let new_env=
List.fold_right
(fun (l,(x,abs)) (l_acc,acc) ->
......@@ -196,7 +196,7 @@ module Lambda =
false
| App((Const s|DConst s),LAbs(x,u)) when is_binder s id_to_sym ->
let x' = generate_var_name x l_env in
let vars,l_l,l,u = unfold_binder s (l_level+1) level id_to_sym [l_level,(x',Abstract_syntax.Linear)] l_env u in
let vars,l_l,l,u = unfold_binder s (l_level+1) level id_to_sym [l_level,(x',Abstract_syntax.Linear)] ((l_level,x')::l_env) u in
let new_env=
List.fold_right
(fun (l,(x,abs)) (l_acc,acc) ->
......@@ -271,7 +271,7 @@ module Lambda =
| Unknown _ -> true
| Abs (_, t) -> lclosed n t
| LAbs (_, t) -> lclosed (n+1) t
| App (t1, t2) -> (lclosed n t1) & (lclosed n t2)
| App (t1, t2) -> (lclosed n t1) && (lclosed n t2)
| _ -> raise Not_yet_implemented
in
lclosed 0 tm
......@@ -384,16 +384,16 @@ module Lambda =
| Unknown _ -> true
| Abs (_, t) -> vacuous_tm (n+1) t
| LAbs (_, t) -> vacuous_tm n t
| App (t1, t2) -> (vacuous_tm n t1) & (vacuous_tm n t2)
| App (t1, t2) -> (vacuous_tm n t1) && (vacuous_tm n t2)
| _ -> raise Not_yet_implemented
in
let rec vacuous_ty n ty =
match ty with
Atom _ -> true
| LFun (ty1, ty2) -> (vacuous_ty n ty1) & (vacuous_ty n ty2)
| Fun (ty1, ty2) -> (vacuous_ty n ty1) & (vacuous_ty n ty2)
| Dprod (_, ty1, ty2) -> (vacuous_ty n ty1) & (vacuous_ty (n+1) ty2)
| TApp (ty1, tm) -> (vacuous_ty n ty1) & (vacuous_tm n tm)
| LFun (ty1, ty2) -> (vacuous_ty n ty1) && (vacuous_ty n ty2)
| Fun (ty1, ty2) -> (vacuous_ty n ty1) && (vacuous_ty n ty2)
| Dprod (_, ty1, ty2) -> (vacuous_ty n ty1) && (vacuous_ty (n+1) ty2)
| TApp (ty1, tm) -> (vacuous_ty n ty1) && (vacuous_tm n tm)
| _ -> raise Not_yet_implemented
in
vacuous_ty 0 ty
......@@ -449,7 +449,7 @@ module Lambda =
| (Unknown i, Unknown j) -> i = j
| (Abs (_, tm11), Abs (_, tm12)) -> convert tm11 tm12
| (LAbs (_, tm11), LAbs (_, tm12)) -> convert tm11 tm12
| (App (tm11, tm12), App (tm21, tm22)) -> (convert tm11 tm21) &
| (App (tm11, tm12), App (tm21, tm22)) -> (convert tm11 tm21) &&
(convert (head_normalize tm12) (head_normalize tm22))
| _ -> false
in
......@@ -478,15 +478,15 @@ module Lambda =
(Atom i, Atom j)
-> i = j
| (LFun (ty11, ty12), LFun (ty21, ty22))
-> (convert ty11 ty21) & (convert ty12 ty22)
-> (convert ty11 ty21) && (convert ty12 ty22)
| (Fun (ty11, ty12), Fun (ty21, ty22))
-> (convert ty11 ty21) & (convert ty12 ty22)
-> (convert ty11 ty21) && (convert ty12 ty22)
| (Dprod (_, ty11, ty12), Dprod (_, ty21, ty22))
-> (convert ty11 ty21) & (convert ty12 ty22)
-> (convert ty11 ty21) && (convert ty12 ty22)
| (TAbs (_, ty11), TAbs (_, ty21))
-> convert ty11 ty21
| (TApp (ty11, tm1), TApp (ty21, tm2))
-> (convert ty11 ty21) & (beta_convert tm1 tm2)
-> (convert ty11 ty21) && (beta_convert tm1 tm2)
| (_, _)
-> false
in
......
......@@ -242,7 +242,7 @@ struct
List.fold_left
(fun (acc,b,name) (n,l) ->
try
(E.get n e)::acc,b or n=foc_name,name
(E.get n e)::acc,b || n=foc_name,name
with
| E.Entry_not_found s -> raise (Scripting_errors.Error (Scripting_errors.Not_in_environment s,l)))
([],false,foc_name)
......
......@@ -17,7 +17,7 @@
(* *)
(**************************************************************************)
DEFINE VERSION = "20120329"
DEFINE VERSION = "20131106"
let version = VERSION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment