Commit 13e5abcf authored by POGODALLA Sylvain's avatar POGODALLA Sylvain
Browse files

No commit message

No commit message
parent 20dd0448
load d ../data/cvg.acg;
CVG_syntax CVG_semantics analyse G_sem EV (lambda x.G_sem SO (lambda y.LIKE x y)) : S;
CVG_syntax CVG_semantics analyse G_sem SO (lambda y.G_sem EV (lambda x.LIKE x y)) : S;
CVG_syntax analyse WHETHER (LIKE SANDY KIM): S_k ;
CVG_syntax analyse G_filler WHAT_FILLER (lambda t. LIKE KIM t) :Q ;
CVG_syntax analyse G_syn WHO_FILLER (lambda t. G_situ_1 (lambda y . LIKE y t)) :Q ;
CVG_syntax analyse G_syn WHO_FILLER (lambda t. WONDERED (G_syn WHO_FILLER ( lambda t'. LIKE WHAT_IN_SITU t')) t) :Q ;
signature CVG =
NP_S_S,NP_S_Q,NP_k12,NP_k23,NP,S,Q,S1,S2,S3,S_k:type;
G_sem:NP_S_S -> (NP -> S) -> S;
G_filler:NP_S_Q -> (NP -> S) -> Q;
G_situ_1 : NP_k12 -> (NP -> S1) -> S2 ;
G_situ_2 : NP_k23 -> (NP -> S2) -> S3 ;
EV,SO:NP_S_S;
CHRIS,KIM,DANA,SANDY:NP;
LIKE:NP -> NP -> S;
BARKE:NP -> S;
THOUGHT : S -> NP -> S;
WONDERED1 : S1 -> (NP -> S);
WONDERED2 : S2 -> (NP -> S);
WHETHER : S -> S_k;
WHO_IN_SITU1 : NP_k12 ;
WHO_IN_SITU2 : NP_k23 ;
WHAT_IN_SITU1 : NP_k12 ;
WHAT_IN_SITU2 : NP_k23 ;
WHO_FILLER,WHAT_FILLER:NP_S_Q;
Promote1 : S -> S1;
Promote2 : S -> S2;
end
signature syntax =
NP,S,Q:type;
everybody,somebody:NP;
barked : NP -> S;
liked:NP -> NP -> S;
thought: S -> NP -> S;
wondered : S -> 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 (CVG) : syntax =
NP_S_S := NP;
NP := NP;
S := S;
S1 := S;
S2 := S;
S3 := S;
S_k := S;
Q := Q;
NP_S_Q := (NP ->S)->Q;
NP_k12 := NP;
NP_k23 := NP;
Promote = lambda x.x;
G_sem := lambda q r.r q;
G_filler := lambda q r.q r;
G_situ_1 := lambda q r.r q;
G_situ_2 := lambda q r.r q;
EV := everybody;
SO := somebody;
LIKE := liked;
WHAT_IN_SITU1 := what_in_situ ;
WHAT_IN_SITU2 := what_in_situ ;
WHO_IN_SITU1 := who_in_situ ;
WHO_IN_SITU2 := who_in_situ ;
WHETHER := lambda s . whether s;
WONDERED1 := lambda q subj . wondered q subj ;
WONDERED2 := lambda q subj . wondered q subj ;
THOUGHT := lambda s subj . thought s subj ;
BARKE := barked ;
SANDY := Sandy;
DANA := Dana;
KIM := Kim;
CHRIS := Chris;
WHAT_FILLER := lambda r. what_filler (lambda x .r x);
WHO_FILLER := lambda r. who_filler (lambda x .r x);
end
signature semantics =
e,t:type;
k,k1,k2,k3:type;
e_t_k1,e_k1_k2,e_k2_k3:type;
dummy:type;
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;
whether' : t -> k;
who_filler : (e -> t) -> k1;
who_in_situ1 : (e -> k1) -> k2;
who_in_situ2 : (e -> k2) -> k3;
what_filler : (e -> t) -> k1;
what_in_situ1 : (e -> k1) -> k2;
what_in_situ2 : (e -> k2) -> k3;
end
lexicon CVG_semantics (CVG) : semantics =
NP_S_S := (e -> t) -> t;
NP := e;
S := t;
S1 := k1;
S2 := k2;
S_k := k;
Q := k1;
NP_S_Q := (e -> t) -> k1 ;
NP_k12 := (e -> k1) -> k2;
NP_k23 := (e -> k2) -> k3;
G_sem := lambda q r.q r;
G_filler := lambda q r.q r;
G_situ_1 := lambda q r.q r;
G_situ_2 := lambda q r.q r;
EV := everybody';
SO := somebody';
CHRIS := chris';
KIM := kim';
DANA := dana';
SANDY := sandy';
LIKE := like';
BARKE := barke' ;
THOUGHT := think' ;
WONDERED1 := wonder1' ;
WONDERED2 := wonder2' ;
WHETHER := whether' ;
WHO_IN_SITU1 := who_in_situ1 ;
WHO_IN_SITU2 := who_in_situ2 ;
WHAT_IN_SITU1 := what_in_situ1 ;
WHAT_IN_SITU2 := what_in_situ2 ;
WHO_FILLER := who_filler ;
WHAT_FILLER := what_filler ;
end
CVG_syntax CVG_simple_semantics analyse LIKE EV SO :S ;
CVG_syntax analyse WHETHER (LIKE SANDY KIM): S ;
CVG_syntax analyse G WHAT_FILLER (lambda t. LIKE KIM t) :Q ;
CVG_syntax analyse G WHO_FILLER (lambda y . LIKE y WHAT_IN_SITU)) :Q ;
CVG_syntax analyse G WHO_FILLER (lambda x. WONDERED (G WHO_FILLER ( lambda y. LIKE WHAT_IN_SITU y)) x) :Q ;
signature syntax =
NP,S,NP_S_Q,Q : type;
G : NP_S_Q -> (NP -> S) -> Q;
CHRIS,KIM,DANA,SANDY,EV,SO:NP;
LIKE:NP -> NP -> S;
BARKE:NP -> S;
THOUGHT : S -> NP -> S;
WONDERED : Q -> NP -> S;
WHETHER : S -> S;
WHO_IN_SITU : NP;
WHAT_IN_SITU : NP;
WHO_FILLER,WHAT_FILLER: NP_S_Q;
end
signature simple_syntax =
NP,S,Q:type;
everybody,somebody:NP;
barked : NP -> S;
liked:NP -> NP -> S;
thought: S -> NP -> S;
wondered : S -> 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;
Q := Q;
NP_S_Q := (NP ->S)->Q;
G := lambda q r.q r;
EV := everybody;
SO := somebody;
LIKE := liked;
WHAT_IN_SITU := what_in_situ ;
WHO_IN_SITU := who_in_situ ;
WHETHER := lambda s . whether s;
WONDERED := lambda q subj . wondered q subj ;
THOUGHT := lambda s subj . thought s subj ;
BARKE := barked ;
SANDY := Sandy;
DANA := Dana;
KIM := Kim;
CHRIS := Chris;
WHAT_FILLER := lambda r. what_filler (lambda x .r x);
WHO_FILLER := lambda r. who_filler (lambda x .r x);
end
signature simple_semantics =
e,t:type;
everybody',somebody': e ;
chris',kim',dana',sandy':e;
like' : e -> e -> t;
barke' : e -> t;
think' : t -> e -> t;
wonder' : t -> e -> t;
whether' : t -> t;
who_filler : (e -> t) -> t;
who_in_situ : e ;
what_filler : (e -> t) -> t;
what_in_situ : e;
end
lexicon CVG_simple_semantics (syntax) : simple_semantics =
NP := e;
S := t;
Q := t;
NP_S_Q := (e -> t) -> t ;
G := lambda q r.q r;
EV := everybody';
SO := somebody';
CHRIS := chris';
KIM := kim';
DANA := dana';
SANDY := sandy';
LIKE := like';
BARKE := barke' ;
THOUGHT := think' ;
WONDERED := wonder' ;
WHETHER := whether' ;
WHO_IN_SITU := who_in_situ ;
WHAT_IN_SITU := what_in_situ ;
WHO_FILLER := who_filler ;
WHAT_FILLER := what_filler ;
end
signature semantics =
e,t,e_t_t:type;
k,k1,k2,k3,e_t_k1,e_k1_k2,e_k2_k3:type;
G_q : e_t_t -> (e ->t) -> t;
G_w12 : e_t_k1 -> (e -> k1) -> k2;
G_w23 : e_t_k1 -> (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;
whether' : t -> k;
who_filler : (e -> t) -> k1;
who_in_situ12 : e_k1_k2 ;
who_in_situ23 : e_k2_k3 ;
what_filler : (e -> t) -> k1;
what_in_situ12 : e_k1_k2 ;
what_in_situ23 : e_k2_k3 ;
end
lexicon CVG_semantics (semantics):simple_semantics =
e:=e;
t:=t;
e_t_t:=e;
k,k1,k2,k3:=t;
e_t_k1,e_k1_k2,e_k2_k3:=e;
G_q := lambda Q r.r Q;
G_w12 := lambda w r.r w;
G_w23 := lambda w r.r w;
everybody' := everybody';
somebody' := somebody';
chris' := chris';
kim' := kim';
dana' := dana';
sandy' := sandy';
like' := like';
barke' := barke';
think' := think';
wonder1' := wonder';
wonder2' := wonder';
whether' := whether';
who_filler := who_filler ;
who_in_situ12 := who_in_situ ;
who_in_situ23 := who_in_situ ;
what_filler := what_filler ;
what_in_situ12 := what_in_situ ;
what_in_situ23 := what_in_situ ;
end
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