1:- dynamic sentence/5.    2
    3sentence(A, B, E, C, G) :-
    4    declarative(A, B, D, C, F),
    5    terminator('.', D, E, F, G).
    6sentence(A, B, E, C, G) :-
    7    wh_question(A, B, D, C, F),
    8    terminator(?, D, E, F, G).
    9sentence(A, B, E, C, G) :-
   10    yn_question(A, B, D, C, F),
   11    terminator(?, D, E, F, G).
   12sentence(A, B, E, C, G) :-
   13    imperative(A, B, D, C, F),
   14    terminator(!, D, E, F, G).
   15
   16
   17:- dynamic declarative/5.   18
   19declarative(decl(A), B, C, D, E) :-
   20    s(A, _, B, C, D, E).
   21
   22
   23:- dynamic wh_question/5.   24
   25wh_question(whq(A, F), B, H, C, J) :-
   26    variable_q(A,
   27               _,
   28               D,
   29               E,
   30               B,
   31               G,
   32               C,
   33               I),
   34    question(D, E, F, G, H, I, J).
   35
   36
   37:- dynamic np/11.   38
   39np(B, C, D, E, F, G, H, A, A, I, J) :-
   40    virtual(np(B, C, D, E, F, G, H),
   41            I,
   42            J).
   43np(np(A, C, []), A, J, def, _, B, H, D, E, F, G) :-
   44    ix_is_pp(B),
   45    pers_pron(C, A, I, D, E, F, G),
   46    ix_empty(H),
   47    ix_role(I, decl, J).
   48np(np(A, C, E), A, _, D, I, B, L, F, N, G, P) :-
   49    ix_is_pp(B),
   50    np_head(C,
   51            A,
   52            D+H,
   53            J,
   54            E,
   55            F,
   56            M,
   57            G,
   58            O),
   59    ix_np_all(K),
   60    np_compls(H,
   61              A,
   62              I,
   63              J,
   64              K,
   65              L,
   66              M,
   67              N,
   68              O,
   69              P).
   70np(part(B, H), 3+C, _, indef, J, A, L, D, N, E, P) :-
   71    ix_is_pp(A),
   72    determiner(B, C, indef, D, F, E, G),
   73    terminal(of, F, M, G, O),
   74    ix_s_all(K),
   75    prep_case(I),
   76    np(H,
   77       3+plu,
   78       I,
   79       def,
   80       J,
   81       K,
   82       L,
   83       M,
   84       N,
   85       O,
   86       P).
   87
   88
   89:- dynamic variable_q/8.   90
   91variable_q(C, A, E, B, F, G, H, x(gap, nonterminal, np(D, A, B, _, _, J, K), I)) :-
   92    whq(C, A, D, E, F, G, H, I),
   93    ix_trace(J, K).
   94variable_q(D, E, compl, M, B, H, C, x(gap, nonterminal, pp(pp(A, F), compl, K, L), J)) :-
   95    prep(A, B, G, C, I),
   96    whq(D, E, F, _, G, H, I, J),
   97    ix_trace(K, L),
   98    compl_case(M).
   99variable_q(B, A, compl, K, E, F, G, x(gap, nonterminal, adv_phrase(pp(C, np(A, np_head(int_det(B), [], D), [])), I, J), H)) :-
  100    context_pron(C, D, E, F, G, H),
  101    ix_trace(I, J),
  102    verb_case(K).
  103variable_q(A, _, compl, J, B, F, C, x(gap, nonterminal, pred(adj, value(D, wh(A)), I), H)) :-
  104    terminal(how, B, E, C, G),
  105    adj(quant, D, E, F, G, H),
  106    ix_empty(I),
  107    verb_case(J).
  108
  109
  110:- dynamic pp/8.  111
  112pp(B, C, D, E, A, A, F, G) :-
  113    virtual(pp(B, C, D, E), F, G).
  114pp(pp(A, D), F, G, H, B, J, C, L) :-
  115    prep(A, B, I, C, K),
  116    prep_case(E),
  117    np(D,
  118       _,
  119       E,
  120       _,
  121       F,
  122       G,
  123       H,
  124       I,
  125       J,
  126       K,
  127       L).
  128
  129
  130:- dynamic adv_phrase/7.  131
  132adv_phrase(B, C, D, A, A, E, F) :-
  133    virtual(adv_phrase(B, C, D), E, F).
  134adv_phrase(pp(A, D), E, F, B, H, C, J) :-
  135    loc_pred(A, B, G, C, I),
  136    pp(pp(prep(of), D),
  137       compl,
  138       E,
  139       F,
  140       G,
  141       H,
  142       I,
  143       J).
  144
  145
  146:- dynamic pred/7.  147
  148pred(B, C, D, A, A, E, F) :-
  149    virtual(pred(B, C, D), E, F).
  150pred(_, A, B, C, D, E, F) :-
  151    adj_phrase(A, B, C, D, E, F).
  152pred(neg, A, C, D, E, F, G) :-
  153    ix_s_all(B),
  154    pp(A, compl, B, C, D, E, F, G).
  155pred(_, A, C, D, E, F, G) :-
  156    ix_s_all(B),
  157    adv_phrase(A, B, C, D, E, F, G).
  158
  159
  160:- dynamic whq/8.  161
  162whq(A, B, E, undef, C, H, D, J) :-
  163    int_det(A, B, C, G, D, I),
  164    ix_s_all(F),
  165    np(E,
  166       B,
  167       _,
  168       _,
  169       subj,
  170       F,
  171       _,
  172       G,
  173       H,
  174       I,
  175       J).
  176whq(B, 3+A, np(3+A, wh(B), []), C, D, E, F, G) :-
  177    int_pron(C, D, E, F, G).
  178
  179
  180:- dynamic int_det/6.  181
  182int_det(A, 3+B, C, D, E, F) :-
  183    whose(A, B, C, D, E, F).
  184int_det(A, 3+B, C, D, E, F) :-
  185    int_art(A, B, C, D, E, F).
  186
  187
  188:- dynamic np_head0/7.  189
  190np_head0(B, C, D, A, A, E, F) :-
  191    virtual(np_head0(B, C, D), E, F).
  192np_head0(name(A), 3+sg, def+proper, B, C, D, E) :-
  193    name(A, B, C, D, E).
  194np_head0(np_head(A, F, I), 3+B, C+common, D, K, E, M) :-
  195    determiner(A, B, C, D, G, E, H),
  196    adjs(F, G, J, H, L),
  197    noun(I, B, J, K, L, M).
  198np_head0(A, B, def+proper, C, D, E, x(nogap, nonterminal, gen_marker, F)) :-
  199    poss_pron(A, B, C, D, E, F).
  200np_head0(np_head(A, [], B), 3+sg, indef+common, C, D, E, F) :-
  201    quantifier_pron(A, B, C, D, E, F).
  202
  203
  204:- dynamic gen_marker/4.  205
  206gen_marker(A, A, B, C) :-
  207    virtual(gen_marker, B, C).
  208gen_marker(A, D, B, F) :-
  209    terminal('\'', A, C, B, E),
  210    an_s(C, D, E, F).
  211
  212
  213:- dynamic whose/6.  214
  215whose(A, B, C, D, E, x(nogap, nonterminal, np_head0(wh(A), B, proper), x(nogap, nonterminal, gen_marker, F))) :-
  216    terminal(whose, C, D, E, F).
  217
  218
  219:- dynamic question/7.  220
  221question(A, B, C, D, E, F, G) :-
  222    subj_question(A),
  223    ix_role(subj, _, B),
  224    s(C, _, D, E, F, G).
  225question(A, B, E, C, G, D, I) :-
  226    fronted_verb(A, B, C, F, D, H),
  227    s(E, _, F, G, H, I).
  228
  229
  230:- dynamic det/7.  231
  232det(B, C, D, A, A, E, F) :-
  233    virtual(det(B, C, D), E, F).
  234det(det(G), F, H, A, B, C, D) :-
  235    terminal(E, A, B, C, D),
  236    det(E, F, G, H).
  237det(generic, _, generic, A, A, B, B).
  238
  239
  240:- dynamic int_art/6.  241
  242int_art(B, A, D, E, F, x(nogap, nonterminal, det(C, A, def), G)) :-
  243    int_art(B, A, C, D, E, F, G).
  244
  245
  246:- dynamic subj_qustion/1.  247
  248subj_qustion(subj).
  249
  250
  251:- dynamic subj_question/1.  252
  253subj_question(undef).
  254
  255
  256:- dynamic yn_question/5.  257
  258yn_question(q(C), A, E, B, G) :-
  259    fronted_verb(nil, _, A, D, B, F),
  260    s(C, _, D, E, F, G).
  261
  262
  263:- dynamic verb_form/8.  264
  265verb_form(B, C, D, E, A, A, F, G) :-
  266    virtual(verb_form(B, C, D, E), F, G).
  267verb_form(F, G, H, _, A, B, C, D) :-
  268    terminal(E, A, B, C, D),
  269    verb_form(E, F, G, H).
  270
  271
  272:- dynamic neg/6.  273
  274neg(B, C, A, A, D, E) :-
  275    virtual(neg(B, C), D, E).
  276neg(aux+_, neg, A, B, C, D) :-
  277    terminal(not, A, B, C, D).
  278neg(_, pos, A, A, B, B).
  279
  280
  281:- dynamic fronted_verb/6.  282
  283fronted_verb(F, H, D, K, E, x(gap, nonterminal, verb_form(A, B, C, G), x(nogap, nonterminal, neg(_, I), M))) :-
  284    verb_form(A,
  285              B,
  286              C,
  287              _,
  288              D,
  289              J,
  290              E,
  291              L),
  292    verb_type(A, aux+_),
  293    ix_role(F, G, H),
  294    neg(_, I, J, K, L, M).
  295
  296
  297:- dynamic imperative/5.  298
  299imperative(imp(C), A, E, B, G) :-
  300    imperative_verb(A, D, B, F),
  301    s(C, _, D, E, F, G).
  302
  303
  304:- dynamic imperative_verb/4.  305
  306imperative_verb(B, C, D, x(nogap, terminal, you, x(nogap, nonterminal, verb_form(A, imp+fin, 2+sg, main), E))) :-
  307    verb_form(A, inf, _, _, B, C, D, E).
  308
  309
  310:- dynamic s/6.  311
  312s(s(A, D, J, P), S, B, U, C, W) :-
  313    subj(A, E, F, B, G, C, H),
  314    verb(D, E, F, I, G, L, H, M),
  315    ix_empty(K),
  316    ix_s_all(N),
  317    verb_args(F,
  318              I,
  319              J,
  320              K,
  321              O,
  322              L,
  323              T,
  324              M,
  325              V),
  326    ix_minus(N, O, Q),
  327    ix_plus(N, O, R),
  328    verb_mods(P,
  329              Q,
  330              R,
  331              S,
  332              T,
  333              U,
  334              V,
  335              W).
  336
  337
  338:- dynamic subj/7.  339
  340subj(there, _, _+be, A, B, C, D) :-
  341    terminal(there, A, B, C, D).
  342subj(A, B, _, E, F, G, H) :-
  343    ix_s_all(D),
  344    subj_case(C),
  345    np(A,
  346       B,
  347       C,
  348       _,
  349       subj,
  350       D,
  351       _,
  352       E,
  353       F,
  354       G,
  355       H).
  356
  357
  358:- dynamic np_head/9.  359
  360np_head(G, H, I, J, K, A, M, B, O) :-
  361    np_head0(C, D, E, A, L, B, N),
  362    possessive(C,
  363               D,
  364               E,
  365               F,
  366               F,
  367               G,
  368               H,
  369               I,
  370               J,
  371               K,
  372               L,
  373               M,
  374               N,
  375               O).
  376
  377
  378:- dynamic np_compls/10.  379
  380np_compls(proper, _, _, [], _, C, A, A, B, B) :-
  381    ix_empty(C).
  382np_compls(common, A, B, C, D, K, F, M, G, O) :-
  383    ix_np_all(E),
  384    np_mods(A,
  385            B,
  386            H,
  387            C,
  388            D,
  389            I,
  390            E,
  391            J,
  392            F,
  393            L,
  394            G,
  395            N),
  396    relative(A,
  397             H,
  398             I,
  399             J,
  400             K,
  401             L,
  402             M,
  403             N,
  404             O).
  405
  406
  407:- dynamic possessive/14.  408
  409possessive(I, H, _, [], J, L, M, N, O, P, A, R, B, T) :-
  410    gen_case(A, C, B, D),
  411    np_head0(E, F, G, C, Q, D, S),
  412    possessive(E,
  413               F,
  414               G,
  415               K,
  416               [pp(poss, np(H, I, J))|K],
  417               L,
  418               M,
  419               N,
  420               O,
  421               P,
  422               Q,
  423               R,
  424               S,
  425               T).
  426possessive(A, B, C, D, E, A, B, C, D, E, F, F, G, G).
  427
  428
  429:- dynamic gen_case/4.  430
  431gen_case(A, B, C, x(nogap, terminal, the, D)) :-
  432    gen_marker(A, B, C, D).
  433
  434
  435:- dynamic an_s/4.  436
  437an_s(A, B, C, D) :-
  438    terminal(s, A, B, C, D).
  439an_s(A, A, B, B).
  440
  441
  442:- dynamic determiner/7.  443
  444determiner(A, B, C, D, E, F, G) :-
  445    det(A, B, C, D, E, F, G).
  446determiner(A, B, C, D, E, F, G) :-
  447    quant_phrase(A, B, C, D, E, F, G).
  448
  449
  450:- dynamic quant_phrase/7.  451
  452quant_phrase(quant(A, E), F, B, C, H, D, J) :-
  453    quant(A, B, C, G, D, I),
  454    number(E, F, G, H, I, J).
  455
  456
  457:- dynamic quant/6.  458
  459quant(A, indef, B, H, C, J) :-
  460    neg_adv(D, A, B, E, C, F),
  461    comp_adv(D, E, G, F, I),
  462    terminal(than, G, H, I, J).
  463quant(H, indef, A, D, B, F) :-
  464    terminal(at, A, C, B, E),
  465    sup_adv(G, C, D, E, F),
  466    sup_op(G, H).
  467quant(the, def, A, B, C, D) :-
  468    terminal(the, A, B, C, D).
  469quant(same, indef, A, A, B, B).
  470
  471
  472:- dynamic neg_adv/6.  473
  474neg_adv(A, not+A, B, C, D, E) :-
  475    terminal(not, B, C, D, E).
  476neg_adv(A, A, B, B, C, C).
  477
  478
  479:- dynamic sup_op/2.  480
  481sup_op(least, not+less).
  482sup_op(most, not+more).
  483
  484
  485:- dynamic np_mods/12.  486
  487np_mods(A, B, J, [C|K], D, M, _, O, E, Q, F, S) :-
  488    np_mod(A,
  489           B,
  490           C,
  491           D,
  492           H,
  493           E,
  494           P,
  495           F,
  496           R),
  497    ix_trace(G),
  498    ix_plus(G, H, I),
  499    ix_minus(D, I, L),
  500    ix_plus(H, D, N),
  501    np_mods(A,
  502            B,
  503            J,
  504            K,
  505            L,
  506            M,
  507            N,
  508            O,
  509            P,
  510            Q,
  511            R,
  512            S).
  513np_mods(_, _, A, A, B, B, C, C, D, D, E, E).
  514
  515
  516:- dynamic np_mod/9.  517
  518np_mod(_, B, A, C, D, E, F, G, H) :-
  519    pp(A, B, C, D, E, F, G, H).
  520np_mod(A, _, B, C, D, E, F, G, H) :-
  521    reduced_relative(A,
  522                     B,
  523                     C,
  524                     D,
  525                     E,
  526                     F,
  527                     G,
  528                     H).
  529
  530
  531:- dynamic verb_mods/8.  532
  533verb_mods([A|H], B, _, K, C, M, D, O) :-
  534    verb_mod(A, B, F, C, L, D, N),
  535    ix_trace(E),
  536    ix_plus(E, F, G),
  537    ix_minus(B, G, I),
  538    ix_plus(F, B, J),
  539    verb_mods(H,
  540              I,
  541              J,
  542              K,
  543              L,
  544              M,
  545              N,
  546              O).
  547verb_mods([], _, A, A, B, B, C, C).
  548
  549
  550:- dynamic verb_mod/7.  551
  552verb_mod(A, B, C, D, E, F, G) :-
  553    adv_phrase(A, B, C, D, E, F, G).
  554verb_mod(B, A, G, C, D, E, F) :-
  555    ix_is_adv(A),
  556    adverb(B, C, D, E, F),
  557    ix_empty(G).
  558verb_mod(A, B, C, D, E, F, G) :-
  559    pp(A, compl, B, C, D, E, F, G).
  560
  561
  562:- dynamic adjs/5.  563
  564adjs([A|D], B, F, C, H) :-
  565    pre_adj(A, B, E, C, G),
  566    adjs(D, E, F, G, H).
  567adjs([], A, A, B, B).
  568
  569
  570:- dynamic pre_adj/5.  571
  572pre_adj(A, B, C, D, E) :-
  573    adj(_, A, B, C, D, E).
  574pre_adj(A, B, C, D, E) :-
  575    sup_phrase(A, B, C, D, E).
  576
  577
  578:- dynamic sup_phrase/5.  579
  580sup_phrase(sup(most, A), B, C, D, E) :-
  581    sup_adj(A, B, C, D, E).
  582sup_phrase(sup(_, C), A, E, B, G) :-
  583    sup_adv(_, A, D, B, F),
  584    adj(quant, C, D, E, F, G).
  585
  586
  587:- dynamic comp_phrase/6.  588
  589comp_phrase(comp(A, B, E), H, C, J, D, L) :-
  590    comp(A, B, C, I, D, K),
  591    ix_np_no_trace(G),
  592    prep_case(F),
  593    np(E,
  594       _,
  595       F,
  596       _,
  597       compl,
  598       G,
  599       H,
  600       I,
  601       J,
  602       K,
  603       L).
  604
  605
  606:- dynamic comp/6.  607
  608comp(A, D, B, H, C, J) :-
  609    comp_adv(A, B, E, C, F),
  610    adj(quant, D, E, G, F, I),
  611    terminal(than, G, H, I, J).
  612comp(more, A, B, E, C, G) :-
  613    rel_adj(A, B, D, C, F),
  614    terminal(than, D, E, F, G).
  615comp(same, C, A, G, B, I) :-
  616    terminal(as, A, D, B, E),
  617    adj(quant, C, D, F, E, H),
  618    terminal(as, F, G, H, I).
  619
  620
  621:- dynamic relative/9.  622
  623relative(B, [C], A, _, D, E, F, G, H) :-
  624    ix_is_pred(A),
  625    rel_conj(B, _, C, D, E, F, G, H).
  626relative(_, [], _, A, A, B, B, C, C).
  627
  628
  629:- dynamic rel_conj/8.  630
  631rel_conj(A, D, F, H, B, J, C, L) :-
  632    rel(A, E, G, B, I, C, K),
  633    rel_rest(A,
  634             D,
  635             E,
  636             F,
  637             G,
  638             H,
  639             I,
  640             J,
  641             K,
  642             L).
  643
  644
  645:- dynamic rel_rest/10.  646
  647rel_rest(F, A, B, C, _, I, D, K, E, M) :-
  648    conj(A,
  649         G,
  650         B,
  651         H,
  652         C,
  653         D,
  654         J,
  655         E,
  656         L),
  657    rel_conj(F,
  658             G,
  659             H,
  660             I,
  661             J,
  662             K,
  663             L,
  664             M).
  665rel_rest(_, _, A, A, B, B, C, C, D, D).
  666
  667
  668:- dynamic rel/7.  669
  670rel(C, rel(D, G), L, A, N, B, P) :-
  671    island(A, E, B, F),
  672    variable(C, D, E, H, F, I),
  673    s(G, J, H, M, I, O),
  674    ix_trace(K),
  675    ix_minus(J, K, L),
  676    dnalsi(M, N, O, P).
  677
  678
  679:- dynamic variable/6.  680
  681variable(A, B, C, D, E, x(gap, nonterminal, np(np(A, wh(B), []), A, _, _, _, G, H), F)) :-
  682    terminal(that, C, D, E, F),
  683    ix_trace(G, H).
  684variable(B, A, F, G, H, x(gap, nonterminal, np(C, D, E, _, _, J, K), I)) :-
  685    wh(A,
  686       B,
  687       C,
  688       D,
  689       E,
  690       F,
  691       G,
  692       H,
  693       I),
  694    ix_trace(J, K).
  695variable(E, D, B, H, C, x(gap, nonterminal, pp(pp(A, F), compl, K, L), J)) :-
  696    prep(A, B, G, C, I),
  697    wh(D,
  698       E,
  699       F,
  700       _,
  701       M,
  702       G,
  703       H,
  704       I,
  705       J),
  706    ix_trace(K, L),
  707    compl_case(M).
  708
  709
  710:- dynamic wh/9.  711
  712wh(B, A, np(A, wh(B), []), A, H, C, D, E, F) :-
  713    rel_pron(G, C, D, E, F),
  714    ix_role(G, decl, H).
  715wh(H, I, np(A, B, [pp(E, J)]), A, _, C, L, D, N) :-
  716    np_head0(B, A, _+common, C, F, D, G),
  717    prep(E, F, K, G, M),
  718    wh(H,
  719       I,
  720       J,
  721       _,
  722       _,
  723       K,
  724       L,
  725       M,
  726       N).
  727wh(A, B, E, F, G, C, J, D, L) :-
  728    whose(A, B, C, I, D, K),
  729    ix_s_all(H),
  730    np(E,
  731       F,
  732       G,
  733       def,
  734       subj,
  735       H,
  736       _,
  737       I,
  738       J,
  739       K,
  740       L).
  741
  742
  743:- dynamic reduced_relative/8.  744
  745reduced_relative(B, C, A, D, E, F, G, H) :-
  746    ix_is_pred(A),
  747    reduced_rel_conj(B,
  748                     _,
  749                     C,
  750                     D,
  751                     E,
  752                     F,
  753                     G,
  754                     H).
  755
  756
  757:- dynamic reduced_rel_conj/8.  758
  759reduced_rel_conj(A, D, F, H, B, J, C, L) :-
  760    reduced_rel(A, E, G, B, I, C, K),
  761    reduced_rel_rest(A,
  762                     D,
  763                     E,
  764                     F,
  765                     G,
  766                     H,
  767                     I,
  768                     J,
  769                     K,
  770                     L).
  771
  772
  773:- dynamic reduced_rel_rest/10.  774
  775reduced_rel_rest(F, A, B, C, _, I, D, K, E, M) :-
  776    conj(A,
  777         G,
  778         B,
  779         H,
  780         C,
  781         D,
  782         J,
  783         E,
  784         L),
  785    reduced_rel_conj(F,
  786                     G,
  787                     H,
  788                     I,
  789                     J,
  790                     K,
  791                     L,
  792                     M).
  793reduced_rel_rest(_, _, A, A, B, B, C, C, D, D).
  794
  795
  796:- dynamic reduced_rel/7.  797
  798reduced_rel(C, reduced_rel(D, G), L, A, N, B, P) :-
  799    island(A, E, B, F),
  800    reduced_wh(C, D, E, H, F, I),
  801    s(G, J, H, M, I, O),
  802    ix_trace(K),
  803    ix_minus(J, K, L),
  804    dnalsi(M, N, O, P).
  805
  806
  807:- dynamic reduced_wh/6.  808
  809reduced_wh(A, B, D, I, E, x(nogap, nonterminal, np(np(A, wh(B), []), A, N, _, _, L, M), x(nogap, nonterminal, verb_form(be, pres+fin, A, main), x(nogap, nonterminal, neg(_, C), x(nogap, nonterminal, pred(C, F, G), K))))) :-
  810    neg(_, C, D, H, E, J),
  811    pred(C, F, G, H, I, J, K),
  812    ix_trace(L, M),
  813    subj_case(N).
  814reduced_wh(A, B, F, G, H, x(nogap, nonterminal, np(np(A, wh(B), []), A, L, _, _, J, K), x(nogap, nonterminal, verb(C, _, D, E), I))) :-
  815    participle(C, D, E, F, G, H, I),
  816    ix_trace(J, K),
  817    subj_case(L).
  818reduced_wh(A, B, I, J, K, x(nogap, nonterminal, np(E, F, C, G, _, M, N), x(gap, nonterminal, np(np(A, wh(B), []), A, D, _, _, O, P), L))) :-
  819    ix_s_all(H),
  820    subj_case(C),
  821    verb_case(D),
  822    np(E,
  823       F,
  824       _,
  825       G,
  826       subj,
  827       H,
  828       _,
  829       I,
  830       J,
  831       K,
  832       L),
  833    ix_trace(M, N),
  834    ix_trace(O, P).
  835
  836
  837:- dynamic verb/8.  838
  839verb(B, C, D, E, A, A, F, G) :-
  840    virtual(verb(B, C, D, E), F, G).
  841verb(verb(L, A, B+fin, M, H), C, R, A, D, O, E, Q) :-
  842    verb_form(F,
  843              B+fin,
  844              C,
  845              K,
  846              D,
  847              I,
  848              E,
  849              J),
  850    verb_type(F, G),
  851    neg(G, H, I, N, J, P),
  852    rest_verb(K,
  853              F,
  854              L,
  855              A,
  856              M,
  857              N,
  858              O,
  859              P,
  860              Q),
  861    verb_type(L, R).
  862
  863
  864:- dynamic rest_verb/9.  865
  866rest_verb(aux, have, D, E, [perf|F], A, H, B, J) :-
  867    verb_form(C,
  868              past+part,
  869              _,
  870              _,
  871              A,
  872              G,
  873              B,
  874              I),
  875    have(C, D, E, F, G, H, I, J).
  876rest_verb(aux, be, E, F, G, A, I, B, K) :-
  877    verb_form(D, C, _, _, A, H, B, J),
  878    be(C,
  879       D,
  880       E,
  881       F,
  882       G,
  883       H,
  884       I,
  885       J,
  886       K).
  887rest_verb(aux, do, A, active, [], B, C, D, E) :-
  888    verb_form(A, inf, _, _, B, C, D, E).
  889rest_verb(main, A, A, active, [], B, B, C, C).
  890
  891
  892:- dynamic have/8.  893
  894have(be, E, F, G, A, I, B, K) :-
  895    verb_form(D, C, _, _, A, H, B, J),
  896    be(C,
  897       D,
  898       E,
  899       F,
  900       G,
  901       H,
  902       I,
  903       J,
  904       K).
  905have(A, A, active, [], B, B, C, C).
  906
  907
  908:- dynamic be/9.  909
  910be(past+part, A, A, passive, [], B, B, C, C).
  911be(pres+part, A, B, C, [prog], D, E, F, G) :-
  912    passive(A, B, C, D, E, F, G).
  913
  914
  915:- dynamic passive/7.  916
  917passive(be, A, passive, B, C, D, E) :-
  918    verb_form(A,
  919              past+part,
  920              _,
  921              _,
  922              B,
  923              C,
  924              D,
  925              E),
  926    verb_type(A, F),
  927    passive(F).
  928passive(A, A, active, B, B, C, C).
  929
  930
  931:- dynamic participle/7.  932
  933participle(verb(E, A, inf, K, B), L, A, C, G, D, I) :-
  934    neg(_, B, C, F, D, H),
  935    verb_form(E, J, _, _, F, G, H, I),
  936    participle(J, A, K),
  937    verb_type(E, L).
  938
  939
  940:- dynamic passive/1.  941
  942passive(_+trans).
  943passive(_+ditrans).
  944
  945
  946:- dynamic participle/3.  947
  948participle(pres+part, active, [prog]).
  949participle(past+part, passive, []).
  950
  951
  952:- dynamic dnalsi/4.  953
  954dnalsi(A, A, B, C) :-
  955    virtual(dnalsi, B, C).
  956
  957
  958:- dynamic island/4.  959
  960island(A, A, B, x(gap, nonterminal, dnalsi, B)).
  961
  962
  963:- dynamic verb_args/9.  964
  965verb_args(_+D, E, A, G, H, B, J, C, L) :-
  966    advs(A, F, _, B, I, C, K),
  967    verb_args(D,
  968              E,
  969              F,
  970              G,
  971              H,
  972              I,
  973              J,
  974              K,
  975              L).
  976verb_args(trans, active, [arg(dir, A)], _, B, C, D, E, F) :-
  977    verb_arg(np, A, B, C, D, E, F).
  978verb_args(ditrans, _, [arg(D, A)|E], _, G, B, I, C, K) :-
  979    verb_arg(np, A, F, B, H, C, J),
  980    object(D, E, F, G, H, I, J, K).
  981verb_args(be, _, [void], A, A, B, C, D, E) :-
  982    terminal(there, B, C, D, E).
  983verb_args(be, _, [arg(pred, A)], _, B, C, D, E, F) :-
  984    pred_conj(_, A, B, C, D, E, F).
  985verb_args(be, _, [arg(dir, A)], _, B, C, D, E, F) :-
  986    verb_arg(np, A, B, C, D, E, F).
  987verb_args(have, active, [arg(dir, A)], _, B, C, D, E, F) :-
  988    verb_arg(np, A, B, C, D, E, F).
  989verb_args(D, _, [], A, A, B, B, C, C) :-
  990    no_args(D).
  991
  992
  993:- dynamic object/8.  994
  995object(G, C, B, I, E, K, F, M) :-
  996    ix_adv(A),
  997    ix_minus(A, B, D),
  998    advs(C, H, D, E, J, F, L),
  999    obj(G, H, B, I, J, K, L, M).
 1000
 1001
 1002:- dynamic obj/8. 1003
 1004obj(ind, [arg(dir, A)], _, B, C, D, E, F) :-
 1005    verb_arg(np, A, B, C, D, E, F).
 1006obj(dir, [], A, A, B, B, C, C).
 1007
 1008
 1009:- dynamic pred_conj/7. 1010
 1011pred_conj(C, E, G, A, I, B, K) :-
 1012    pred(_, D, F, A, H, B, J),
 1013    pred_rest(C,
 1014              D,
 1015              E,
 1016              F,
 1017              G,
 1018              H,
 1019              I,
 1020              J,
 1021              K).
 1022
 1023
 1024:- dynamic pred_rest/9. 1025
 1026pred_rest(A, B, C, _, H, D, J, E, L) :-
 1027    conj(A,
 1028         F,
 1029         B,
 1030         G,
 1031         C,
 1032         D,
 1033         I,
 1034         E,
 1035         K),
 1036    pred_conj(F, G, H, I, J, K, L).
 1037pred_rest(_, A, A, B, B, C, C, D, D).
 1038
 1039
 1040:- dynamic verb_arg/7. 1041
 1042verb_arg(np, A, D, E, F, G, H) :-
 1043    ix_s_all(C),
 1044    verb_case(B),
 1045    np(A,
 1046       _,
 1047       B,
 1048       _,
 1049       compl,
 1050       C,
 1051       D,
 1052       E,
 1053       F,
 1054       G,
 1055       H).
 1056
 1057
 1058:- dynamic advs/7. 1059
 1060advs([B|E], F, A, C, H, D, J) :-
 1061    ix_is_adv(A),
 1062    adverb(B, C, G, D, I),
 1063    advs(E, F, A, G, H, I, J).
 1064advs(A, A, _, B, B, C, C).
 1065
 1066
 1067:- dynamic adj_phrase/6. 1068
 1069adj_phrase(A, F, B, C, D, E) :-
 1070    adj(_, A, B, C, D, E),
 1071    ix_empty(F).
 1072adj_phrase(A, B, C, D, E, F) :-
 1073    comp_phrase(A, B, C, D, E, F).
 1074
 1075
 1076:- dynamic no_args/1. 1077
 1078no_args(trans).
 1079no_args(ditrans).
 1080no_args(intrans).
 1081
 1082
 1083:- dynamic conj/9. 1084
 1085conj(conj(A, D), conj(A, E), B, C, conj(A, B, C), F, G, H, I) :-
 1086    conj(A, D, E, F, G, H, I).
 1087
 1088
 1089:- dynamic noun/6. 1090
 1091noun(F, G, A, B, C, D) :-
 1092    terminal(E, A, B, C, D),
 1093    noun_form(E, F, G).
 1094
 1095
 1096:- dynamic adj/6. 1097
 1098adj(F, adj(A), B, C, D, E) :-
 1099    terminal(A, B, C, D, E),
 1100    adj(A, F).
 1101
 1102
 1103:- dynamic prep/5. 1104
 1105prep(prep(A), B, C, D, E) :-
 1106    terminal(A, B, C, D, E),
 1107    prep(A).
 1108
 1109
 1110:- dynamic rel_adj/5. 1111
 1112rel_adj(adj(F), A, B, C, D) :-
 1113    terminal(E, A, B, C, D),
 1114    rel_adj(E, F).
 1115
 1116
 1117:- dynamic sup_adj/5. 1118
 1119sup_adj(adj(F), A, B, C, D) :-
 1120    terminal(E, A, B, C, D),
 1121    sup_adj(E, F).
 1122
 1123
 1124:- dynamic comp_adv/5. 1125
 1126comp_adv(less, A, B, C, D) :-
 1127    terminal(less, A, B, C, D).
 1128comp_adv(more, A, B, C, D) :-
 1129    terminal(more, A, B, C, D).
 1130
 1131
 1132:- dynamic sup_adv/5. 1133
 1134sup_adv(least, A, B, C, D) :-
 1135    terminal(least, A, B, C, D).
 1136sup_adv(most, A, B, C, D) :-
 1137    terminal(most, A, B, C, D).
 1138
 1139
 1140:- dynamic rel_pron/5. 1141
 1142rel_pron(F, A, B, C, D) :-
 1143    terminal(E, A, B, C, D),
 1144    rel_pron(E, F).
 1145
 1146
 1147:- dynamic name/5. 1148
 1149name(C, A, E, B, G) :-
 1150    opt_the(A, D, B, F),
 1151    terminal(C, D, E, F, G),
 1152    name(C).
 1153
 1154
 1155:- dynamic int_art/7. 1156
 1157int_art(A, plu, quant(same, wh(A)), B, E, C, G) :-
 1158    terminal(how, B, D, C, F),
 1159    terminal(many, D, E, F, G).
 1160int_art(F, G, H, A, B, C, D) :-
 1161    terminal(E, A, B, C, D),
 1162    int_art(E, F, G, H).
 1163
 1164
 1165:- dynamic int_pron/5. 1166
 1167int_pron(F, A, B, C, D) :-
 1168    terminal(E, A, B, C, D),
 1169    int_pron(E, F).
 1170
 1171
 1172:- dynamic adverb/5. 1173
 1174adverb(adv(A), B, C, D, E) :-
 1175    terminal(A, B, C, D, E),
 1176    adverb(A).
 1177
 1178
 1179:- dynamic poss_pron/6. 1180
 1181poss_pron(pronoun(F), G+H, A, B, C, D) :-
 1182    terminal(E, A, B, C, D),
 1183    poss_pron(E, F, G, H).
 1184
 1185
 1186:- dynamic pers_pron/7. 1187
 1188pers_pron(pronoun(F), G+H, I, A, B, C, D) :-
 1189    terminal(E, A, B, C, D),
 1190    pers_pron(E, F, G, H, I).
 1191
 1192
 1193:- dynamic quantifier_pron/6. 1194
 1195quantifier_pron(F, G, A, B, C, D) :-
 1196    terminal(E, A, B, C, D),
 1197    quantifier_pron(E, F, G).
 1198
 1199
 1200:- dynamic context_pron/6. 1201
 1202context_pron(prep(in), place, A, B, C, D) :-
 1203    terminal(where, A, B, C, D).
 1204context_pron(prep(at), time, A, B, C, D) :-
 1205    terminal(when, A, B, C, D).
 1206
 1207
 1208:- dynamic number/6. 1209
 1210number(nb(F), G, A, B, C, D) :-
 1211    terminal(E, A, B, C, D),
 1212    number(E, F, G).
 1213
 1214
 1215:- dynamic terminator/5. 1216
 1217terminator(F, A, B, C, D) :-
 1218    terminal(E, A, B, C, D),
 1219    terminator(E, F).
 1220
 1221
 1222:- dynamic opt_the/4. 1223
 1224opt_the(A, A, B, B).
 1225opt_the(A, B, C, D) :-
 1226    terminal(the, A, B, C, D).
 1227
 1228
 1229:- dynamic conj/7. 1230
 1231conj(_, list, list, A, B, C, D) :-
 1232    terminal(',', A, B, C, D).
 1233conj(A, list, end, B, C, D, E) :-
 1234    terminal(A, B, C, D, E),
 1235    conj(A).
 1236
 1237
 1238:- dynamic loc_pred/5. 1239
 1240loc_pred(F, A, B, C, D) :-
 1241    terminal(E, A, B, C, D),
 1242    loc_pred(E, F)