Commit 491e0f86 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain
Browse files

No commit message

No commit message
parent 49eeed6d
wait;
load d ../data/strings.acg;
load d ../data/cvg3.acg;
compose CVG_strings CVG_syntax as CVG_phonology;
# Scope ambiguity
CVG_phonology CVG_syntax CVG_semantics analyse G_q SO (lambda y. G_q EV (lambda x.LIKE y x)) :S ;
# Embedded polar question
CVG_phonology CVG_syntax CVG_semantics analyse WHETHER (LIKE SANDY KIM): Q0 ;
# Embedded consituent question
CVG_phonology CVG_syntax CVG_semantics analyse G_w1 WHAT_FILLER (lambda y. LIKE y KIM) :Q1 ;
# Embedded consituent question
CVG_phonology CVG_syntax CVG_semantics analyse G_w2 WHAT_IN_SITU_1 (lambda y.LIKE y KIM) : Q2 ;
# Binary consituent question
CVG_phonology CVG_syntax CVG_semantics analyse G_w2 WHAT_IN_SITU_1 (lambda y. G_w1 WHO_FILLER (lambda x . LIKE y x)) :Q2 ;
CVG_phonology CVG_syntax CVG_semantics analyse G_w2 WHO_IN_SITU_1 (lambda x. G_w1 WHAT_FILLER (lambda y . LIKE y x)) :Q2 ;
# Baker ambiguity
CVG_phonology CVG_syntax CVG_semantics analyse G_w1 WHO_FILLER (lambda x. WONDER2 (G_w2 WHAT_IN_SITU_1 (lambda y. G_w1 WHO_FILLER (lambda z. LIKE y z))) x) : Q1;
\ No newline at end of file
signature syntax =
NP,S,NP_S_S,Q0,Q1,Q2,Q3,NP_S_Q1,NP_Q1_Q2,NP_Q2_Q3 : type;
G_q : NP_S_S -> (NP -> S) -> S;
G_w1 : NP_S_Q1 -> (NP -> S) -> Q1;
G_w2 : NP_Q1_Q2 -> (NP -> Q1) -> Q2;
G_w3 : NP_Q2_Q3 -> (NP -> Q2) -> Q3;
CHRIS,KIM,DANA,SANDY:NP;
EV,SO:NP_S_S;
LIKE:NP -> NP -> S;
BARKE:NP -> S;
THINK : S -> NP -> S;
WONDER1 : Q1 -> NP -> S;
WONDER2 : Q2 -> NP -> S;
WONDER3 : Q3 -> NP -> S;
WHETHER : S -> Q0;
WHO_FILLER,WHAT_FILLER: NP_S_Q1;
WHO_IN_SITU_1,WHAT_IN_SITU_1 : NP_Q1_Q2;
WHO_IN_SITU_2,WHAT_IN_SITU_2 : NP_Q2_Q3;
end
signature simple_syntax =
NP,S,Q:type;
everybody,somebody:NP;
barked : NP -> S;
liked:NP -> NP -> S;
thought: S -> NP -> S;
wondered : Q -> NP -> S;
whether : S -> S;
Chris,Kim,Dana,Sandy : NP;
who_in_situ,what_in_situ:NP;
who_filler,what_filler: (NP -> S) -> Q;
end
lexicon CVG_syntax (syntax) : simple_syntax =
NP := NP;
S := S;
NP_S_S := NP;
Q0 := S;
Q1 := Q;
Q2 := Q;
Q3 := Q;
NP_S_Q1 := (NP ->S)->Q;
NP_Q1_Q2 := NP;
NP_Q2_Q3 := NP;
G_q := lambda n r.r n;
G_w1 := lambda w r.w r;
G_w2 := lambda n r. r n;
G_w3 := lambda n r. r n;
EV := everybody;
SO := somebody;
LIKE := liked;
WHETHER := lambda s . whether s;
WONDER1 := lambda q subj . wondered q subj ;
WONDER2 := lambda q subj . wondered q subj ;
WONDER3 := lambda q subj . wondered q subj ;
THINK := lambda s subj . thought s subj ;
BARKE := barked ;
SANDY := Sandy;
DANA := Dana;
KIM := Kim;
CHRIS := Chris;
WHAT_FILLER := what_filler;
WHO_FILLER := who_filler;
WHAT_IN_SITU_1 := what_in_situ ;
WHO_IN_SITU_1 := who_in_situ ;
WHAT_IN_SITU_2 := what_in_situ ;
WHO_IN_SITU_2 := who_in_situ ;
end
lexicon CVG_strings (simple_syntax) : strings =
NP,S,Q:= string;
everybody := everyone;
somebody := someone;
barked := lambda x. x + barked;
liked := lambda o s . s + liked + o ;
thought := lambda s x. x + thought + s;
wondered := lambda s x.x+wondered+s ;
whether := lambda s.whether+s ;
Chris := Chris ;
Kim := Kim;
Dana := Dana ;
Sandy := Sandy ;
who_in_situ := who;
who_filler := lambda P . who + (P E);
what_in_situ := what;
what_filler := lambda P. what + (P E);
end
signature semantics =
e,t:type;
k,k1,k2,k3:type;
(* G_w1 : (e ->t) -> k1;
G_w2 : (e -> k1) -> k2;
G_w3 : (e -> k2) -> k3;
*)
everybody',somebody': (e -> t) -> t;
chris',kim',dana',sandy':e;
like' : e -> e -> t;
barke' : e -> t;
think' : t -> e -> t;
wonder1' : k1 -> e -> t;
wonder2' : k2 -> e -> t;
wonder3' : k3 -> e -> t;
whether' : t -> k;
who_filler,what_filler : (e -> t) -> k1;
who_in_situ12,what_in_situ12 : (e -> k1) -> k2 ;
who_in_situ23,what_in_situ23 : (e -> k2) -> k3;
end
lexicon CVG_semantics (syntax) : semantics =
NP := e;
S := t;
NP_S_S := (e ->t) -> t;
Q0 := k;
Q1 := k1;
Q2 := k2;
Q3 := k3;
NP_S_Q1 := (e -> t) -> k1 ;
NP_Q1_Q2 := (e -> k1) -> k2 ;
NP_Q2_Q3 := (e -> k2) -> k3 ;
G_q := lambda q r.q r;
G_w1 := lambda w r.w r;
G_w2 := lambda w r.w r;
G_w3 := lambda w r.w r;
EV := everybody';
SO := somebody';
CHRIS := chris';
KIM := kim';
DANA := dana';
SANDY := sandy';
LIKE := lambda o s .like' s o;
BARKE := barke' ;
THINK := think' ;
WONDER1 := wonder1' ;
WONDER2 := wonder2' ;
WONDER3 := wonder3' ;
WHETHER := whether' ;
WHO_FILLER := who_filler ;
WHAT_FILLER := what_filler ;
WHO_IN_SITU_1 := who_in_situ12 ;
WHAT_IN_SITU_1 := what_in_situ12 ;
WHO_IN_SITU_2 := who_in_situ23 ;
WHAT_IN_SITU_2 := what_in_situ23 ;
end
signature ty_n =
e,t:type;
everybody',somebody': (e -> t) -> t ;
chris',kim',dana',sandy':e;
person',thing' : e -> t;
whether' : t -> t -> t;
infix & : t -> t -> t;
infix | : t -> t -> t;
which0 : (e ->t) -> (e -> t) -> e -> t -> t ;
which1 : (e ->t) -> (e -> e -> t -> t) -> e -> e -> t -> t ;
which2 : (e ->t) -> (e -> e -> e -> t -> t) -> e -> e -> e -> t -> t ;
who = which0 person' : (e -> t) -> e -> t -> t ;
who12 = which1 person' : (e -> e -> t -> t) -> e -> e -> t -> t;
who23 = which2 person' : (e -> e -> e -> t -> t ) -> e -> e -> e -> t -> t;
what = which0 thing' : (e -> t) -> e -> t -> t ;
what12 = which1 thing' : (e -> e -> t -> t) -> e -> e -> t -> t;
what23 = which2 thing' : (e -> e -> e -> t -> t) -> e -> e -> e -> t -> t;
like' : e -> e -> t;
barke' : e -> t;
think' : t -> e -> t;
k = t -> t:type;
k1 = e -> t -> t:type;
k2 = e -> e -> t -> t:type;
k3 = e -> e -> e -> t -> t:type;
wonder1' : k1 -> e -> t;
wonder2' : k2 -> e -> t;
wonder3' : k3 -> e -> t;
end
lexicon RC_ty (semantics) : ty_n =
e := e;
t :=t;
k := t -> t;
k1 := e -> t -> t;
k2 := e -> e -> t -> t;
k3 := e -> e -> e -> t -> t;
everybody':= everybody';
somebody' := somebody';
chris':= chris';
kim':= kim';
dana':= dana';
sandy':= sandy';
like' := like' ;
barke' := barke';
think' := think';
wonder1' := wonder1' ;
wonder2' := wonder2' ;
wonder3' := wonder3' ;
whether' := whether' ;
who_filler := who ;
who_in_situ12 := who12 ;
who_in_situ23 := who23 ;
what_filler := what ;
what_in_situ12 := what12;
what_in_situ23 := what23 ;
end
\ No newline at end of file
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