Grammar Spins on Parse even though correct Parse is Reached

I have a grammar that spins on almost every sentence I give it and suspect that the non branching rules for my clausal modifier strategies are under-constrained (although this isn’t a problem in any of my pseudo grammars). When parsing a simple sentence, the edge S[22] unifies with the ROOT in interactive unification and is the correct parse.
image

However, my non-branching rule for finite subordinate clauses (which would be used for a sentence like ‘I saw the boy (when) I arrived at the camp’ where both clauses are finite and there is not overt subordinator) keeps firing to create V after V.

I suspect that the lkb doesn’t return the desired parse from edge S[22] because it reaches the maximum number of edges from the non-branching rule firing over and over. Should some sort of flag be added to constrain this? This is the rule in question:

finite-posthead-modifying-clause-phrase := morphological-subord-clause-phrase &
[ ARGS < [ SYNSEM.LOCAL.CAT [ VAL.SUBJ < >,
HEAD.FORM #feat & finite ] ] >,
SYNSEM.LOCAL.CAT [ HEAD.FORM #feat,
POSTHEAD + ],
C-CONT.RELS <! [ PRED “_when+or+because_subord_rel” ] !> ].

morphological-subord-clause-phrase := basic-unary-phrase &
[ SYNSEM.LOCAL.CAT [ MC -,
VAL.SUBJ #subj,
HEAD.MOD < [ LOCAL scopal-mod &
[ CAT [ HEAD verb,
VAL [ SUBJ < >,
SPR < >,
COMPS < > ] ],
CONT.HOOK [ LTOP #mcl,
INDEX #index ] ] ] > ],
C-CONT [ RELS <! [ ARG1 #mch,
ARG2 #sch ] !>,
HCONS <! qeq &
[ HARG #mch,
LARG #mcl ], qeq &
[ HARG #sch,
LARG #scl ] !>,
HOOK.INDEX #index ],
ARGS < [ SYNSEM [ LOCAL [ CAT [ HEAD verb,
VAL [ SUBJ #subj,
SPR < >,
COMPS < > ] ],
CONT.HOOK.LTOP #scl ],
NON-LOCAL.REL 0-dlist ] ] > ].

To add: this does not seem to be a problem in the OSX version of the LKB. I see the parse and the parse chart does not seem too bad… But I also cannot get to the parse on the regression testing VM where I have logon.

It’s interesting that the two versions of the LKB don’t have the same behavior – I’d suggest sending this info on to developers (along with a tarball of the grammar as a test case).

However, something is clearly wrong with that rule if it spins. Can you post the tdl for the spinning rule?

Its the rule in the first post. finite -posthead-modifying-clause-phrase And its supertype.

Ah sorry – I didn’t see that (I think the first message was truncated).

In order for the rule not to spin, there has to be something incompatible between mother & daughter. How about [ MC + ] on the daughter?

Also, what work is “REL 0-dlist” meant to be doing?

For posterity and for my own practice using the formatting, here’s the tdl from above in more readable format:

finite-posthead-modifying-clause-phrase := morphological-subord-clause-phrase &
[ ARGS < [ SYNSEM.LOCAL.CAT [ VAL.SUBJ < >,
			      HEAD.FORM #feat & finite ] ] >,
  SYNSEM.LOCAL.CAT [ HEAD.FORM #feat,
                     POSTHEAD + ],
  C-CONT.RELS <! [ PRED “_when+or+because_subord_rel” ] !> ].

morphological-subord-clause-phrase := basic-unary-phrase &
[ SYNSEM.LOCAL.CAT [ MC -,
                     VAL.SUBJ #subj,
                     HEAD.MOD < [ LOCAL scopal-mod &
                                        [ CAT [ HEAD verb,
                                                VAL [ SUBJ < >,
                                                      SPR < >,
                                                      COMPS < > ] ],
                                          CONT.HOOK [ LTOP #mcl,
                                                      INDEX #index ] ] ] > ],
  C-CONT [ RELS <! [ ARG1 #mch,
                     ARG2 #sch ] !>,
           HCONS <! qeq &
                    [ HARG #mch,
                    LARG #mcl ], qeq &
                                 [ HARG #sch,
                                   LARG #scl ] !>,
           HOOK.INDEX #index ],
  ARGS < [ SYNSEM [ LOCAL [ CAT [ HEAD verb,
                                  VAL [ SUBJ #subj,
                                        SPR < >,
                                        COMPS < > ] ],
                            CONT.HOOK.LTOP #scl ],
                    NON-LOCAL.REL 0-dlist ] ] > ].

Thanks, Emily. MC + on the daughter does the trick.

I’m not sure why I had REL 0-dlist there. It must be an artifact from whatever rule I was modifying it off of. I took it out (of all of my non-branching rules) and the regression tests still pass, so I’m not sure it was doing anything.

Could we post the full rule in its working form? To be clear about what the
solution was.

Because the output (mother) of this rule is MC -, I constrained the input (daughter) to be MC +, so that the input and output are incompatible with each other and the phrase can’t go through the rule more than once.