Loading ...
Sorry, an error occurred while loading the content.

Re: semantic predicate hoisting

Expand Messages
  • Michael Schmitt
    Dear Tom, ... Of course, this is obvious! But have you never had the problem of finding out what the shortest correct syntactic predicate is? I have written a
    Message 1 of 2 , Apr 1 5:25 AM
    View Source
    • 0 Attachment
      Dear Tom,

      > > Even though I was very unhappy about the missing predicate hoisting
      > > feature first, meanwhile I think I wouldn't use this feature even if it
      > > were available. The reason: Syntactic predicates should be as short as
      > > possible in order to reduce the amount of guessing of rules.

      > Of course syntax predicates should be as short as possible.
      > Why look ahead 10 tokens if you can make a decision with 5
      > tokens ?

      Of course, this is obvious! But have you never had the problem of
      finding out what the shortest correct syntactic predicate is? I have
      written a parser for SDL-2000 comprising more than 450 rules and more
      than 100 syntatic predicates (most of them are unevitable, some others
      had to be introduced in order to keep the original rules as published in
      the SDL standard). I can tell you that it was a non-trivial task to find
      the right predicates in all ambiguous alternatives!!!

      >From this point on we are discussing only semantic predicates.

      Ah, that's the problem. I continued discussion of syntactic predicates.
      I thought that predicate hoisting can also be applied for syntactic
      predicates...

      > Furthermore, hoisting does not "move" the predicate to an earlier
      > point in the parse. Whether hoisted or not hoisted the semantic
      > predicate is evaluated at the same token position. However
      > with hoisting the predicate is evaluated in a higher level rule.

      I fully agree. There must have been a misunderstanding.

      Nevertheless, if predicate hoisting also applies for syntactic
      predicates, it may be possible that a predicate is hoisted several
      times. In this case the predicate must be such general that it correctly
      disambiguates in all places, potentially resulting in some inefficiency.

      Michael

      --
      ======================================================================
      Michael Schmitt phone: +49 451 500 3725
      Institute for Telematics secretary: +49 451 500 3721
      Medical University of Luebeck fax: +49 451 500 3722
      Ratzeburger Allee 160 eMail: schmitt@...-luebeck.de
      D-23538 Luebeck, Germany WWW: http://www.itm.mu-luebeck.de
      ======================================================================
    Your message has been successfully submitted and would be delivered to recipients shortly.