<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 11, 2018 at 7:59 PM, Francis Bond <span dir="ltr"><<a href="mailto:bond@ieee.org" target="_blank">bond@ieee.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">On my phone so forgive the brevity, but in Paris we agreed that the docstring will start and end with three ". I think this is what pet now supports, Dan has a patch for the lkb, and I suspect I was meant to ask Woodley to add out to ACE.</div></blockquote><div><br></div><div>Sorry I missed out on all the fun this year :(<br></div><div><br></div><div> I see what you describe mentioned in the LTDB presentation: <a href="http://users.sussex.ac.uk/~johnca/summit-2018/ltdb-update.pdf">http://users.sussex.ac.uk/~johnca/summit-2018/ltdb-update.pdf</a></div><div><br></div><div>It seems the changes to PET are not yet merged in. Also I think Glenn would also like to know about the agreement.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Comments anywhere would be great.</div><div dir="auto"><br></div><div dir="auto">Thanks for pushing this forward Michael.</div></div><div class="gmail-HOEnZb"><div class="gmail-h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, 12 Jul 2018, 12:34 Michael Wayne Goodman, <<a href="mailto:goodmami@uw.edu" target="_blank">goodmami@uw.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 11, 2018, 19:24 Woodley Packard <<a href="mailto:sweaglesw@sweaglesw.org" rel="noreferrer" target="_blank">sweaglesw@sweaglesw.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>2 cents worth...</div><div><br></div><div>1. I think the logical behavior for an addendum with a doc string is concatenation, not replacement. The doc string on the addendum should document what the addendum adds to the type, not the whole type.</div><div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Hmm, good point. I guess the addendum can only add constraints, so the old docstring wouldn't necessarily become invalid. I was comparing to method overrides in Python classes, but that's not a useful comparison.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br></div><div>2. ACE (I believe) allows comments just about anywhere in TDL. I find this very useful when editing TDL, e.g. annotating changes on a fine grained level or disabling certain constraints temporarily without deleting them.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yes, it's definitely more useful to allow comments almost anywhere, and not really hard to parse, either.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Regards,</div><div>Woodley</div><div><br>On Jul 11, 2018, at 5:00 PM, Michael Wayne Goodman <<a href="mailto:goodmami@uw.edu" rel="noreferrer noreferrer" target="_blank">goodmami@uw.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Thank you, Bernd, for the feedback. But I'm not having success parsing types with docstrings using PET. E.g., I changed sign-min in the ERG like this:</div><div><br></div><div> sign_min := *avm* &<br> "doc"<br> [ SYNSEM synsem_min,<br> KEY-ARG bool ].<br><br></div><div>But flop doesn't like it:<br></div><div><br></div><div> goodmami@tpy:~/grammars/erg$ flop english.tdl <br> reading `Version.lsp'... <br> converting `english.tdl' (ERG (1214)) into `english.grm' ...<br> loading `english.tdl'... including `fundamentals.tdl'... fundamentals.tdl:21:3: error: (syntax) - got ` [', expecting `.' at end of type definition</div><div> [...]</div><div><br></div><div>I get similar errors no matter where I put it (before :=, directly after :=, after ]). It's syntactically valid if I have ... *avm* & "doc" & ..., but then it has trouble unifying (as expected).</div><div><br></div><div>It does, however, seem to be happy having a comment there (both ; and #| styles) instead of a doc string.<br></div><div><br></div><div>I'm using flop version 0.99.14svn_cm from the LOGON distribution.<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 11, 2018 at 7:00 AM, Bernd Kiefer <span dir="ltr"><<a href="mailto:Bernd.Kiefer@dfki.de" rel="noreferrer noreferrer" target="_blank">Bernd.Kiefer@dfki.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<tt>Concerning question 3, at least in TDL and PET there was no such
restriction,<br>
but that could make the definition of docstrings easier.<br>
<br>
Best,<br>
<br>
Bernd<br>
</tt><div><div class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-h5"><br>
<div class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935moz-cite-prefix">On 11.07.2018 03:01, Michael Wayne
Goodman wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>I attempted to define a BNF-like description of TDL syntax
on the wiki: <a href="http://moin.delph-in.net/TdlRfc" rel="noreferrer noreferrer" target="_blank">http://moin.delph-in.net/<wbr>TdlRfc</a></div>
<div>I tried to follow the partial BNF in the LKB source and
often referred to the lisp code itself in order to fill out
the rest of the description.<br>
</div>
<div><br>
</div>
<div>My 3 questions above are concisely repeated at the bottom
of the wiki along with some others.</div>
<div><br>
</div>
<div>I welcome corrections and discussion (here or on the wiki)
from any TDL nerds or authorities (especially if you've
written a TDL parser).<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jul 9, 2018 at 12:49 PM,
Michael Wayne Goodman <span dir="ltr"><<a href="mailto:goodmami@uw.edu" rel="noreferrer noreferrer" target="_blank">goodmami@uw.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Hi developers,</div>
<div><br>
</div>
<div>I'm taking a closer look at the syntax of TDL files
and the situation is a bit of a mess. Can anyone help me
clarify some things? (I'll restrict myself to 3
questions for now)<br>
</div>
<div><br>
</div>
<div>The Copestake 2002 reference (Implementing TFS
Grammars) has a BNF for TDL, but it's a bit out of date
and, according to comments in the LKB source code,
incorrect in parts. The LKB source comments are
scattered, incomplete, inconsistent, and also a bit
outdated. There is not much on the wiki. There is some
discussion in the mailing list archives (much from
before my time in DELPH-IN), but it's not clear how
current those descriptions are.</div>
<div><br>
</div>
<div>Q1: Are supertypes special in a definition?</div>
<div><br>
</div>
<div>The BNF (in the LKB source) says this:</div>
<div><br>
</div>
<div> Type-def -> Type { Avm-def | Subtype-def} . |
<br>
Type { Avm-def | Subtype-def}.<br>
</div>
<div> Avm-def -> := Conjunction | Comment
Conjunction<br>
Conjunction -> Term { & Term } *<br>
Term -> Type | Feature-term | Diff-list | List |
Coreference<br>
</div>
<div><br>
</div>
<div>That makes it sound like I could do this:</div>
<div><br>
</div>
<div> mytype := [ FEAT val ] & supertype.</div>
<div><br>
</div>
<div>or even:</div>
<div><br>
</div>
<div> mytype := <! diff list.. !> & #coref
& supertype.</div>
<div><br>
</div>
<div>But elsewhere it seems like a list of parents is
special and appears before the rest of the conjunction.
E.g., at read-tdl-avm-def of lingo/lkb/src/io-tdl/<wbr>tdltypeinput.lsp
I see this alternate definition of Avm-def:<br>
</div>
<div><br>
</div>
<div> ;;; Avm-def -> := Parents Conjunction | Parents
Comment Conjunction |<br>
;;; Parents | Parents Comment<br>
</div>
<div><br>
</div>
<div>It seems that both ACE and PET are fine with putting
supertypes after the feature list (and some other
variations). I'm fine with this, but I wonder what it
means for docstrings (see Q3 below), which (I think) are
supposed to appear after the list of parents and before
the feature list.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Q2: Subtype-def is now just a variant of Avm-def,
yes?</div>
<div><br>
</div>
<div>The BNF still describes subtyping (with the :<
operator) as only taking a single parent:</div>
<div><br>
</div>
<div> Subtype-def -> :< type</div>
<div><br>
</div>
<div>But I believe the consensus is that this is
unnecessary (it's equivalent to using := with only a
supertype), so :< is treated as equivalent to := (to
avoid breaking backward compatibility). Is this
interpretation used by all processors?</div>
<div><br>
</div>
<div><br>
</div>
<div>Q3: What's the final word with type comments /
docstrings?</div>
<div><br>
</div>
<div>I find evidence of 3 proposed variants: (1) a block
of ";" comments before a typename (LTDB-style); (2) a
block of ";" comments within a type description; and (3)
a "doc string" within a type description. Furthermore,
there is a question as to whether comments or strings
within a type go after the ":=" or after the list of
supertypes. I think #| ... |# comments were not
considered for this purpose.</div>
<div><br>
</div>
<div>My guess is this:</div>
<div><br>
</div>
<div>* LTDB-style comments (before the type identifier)
are processed separately from TDL-parsing</div>
<div>* type-internal comments can go anywhere but are
discarded</div>
<div>* type-internal doc strings must appear after the
list of supertypes and are later available for
inspection (they are included as a non-functional part
of a type)</div>
<div><br>
</div>
<div>ACE seems happy with my assumptions, although PET
doesn't seem to like doc strings at all.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks!<span class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935HOEnZb"><font color="#888888"><br>
</font></span></div>
<span class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935HOEnZb"><font color="#888888">
<div><br>
</div>
<div>-- <br>
<div class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935m_-3591690003182791182gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Michael Wayne Goodman</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Michael Wayne Goodman</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div></div><span class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-HOEnZb"><font color="#888888"><pre class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935moz-signature" cols="72">--
------------------------------<wbr>------------------------------<wbr>----------
Bernd Kiefer DFKI GmbH, Stuhlsatzenhausweg, D-66123 Saarbruecken
<a class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail-m_-5022940462080984935moz-txt-link-abbreviated" href="mailto:kiefer@dfki.de" rel="noreferrer noreferrer" target="_blank">kiefer@dfki.de</a> +49-681/85775-5301 (phone) +49-681/85775-5338 (fax)
------------------------------<wbr>------------------------------<wbr>----------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
<a href="https://maps.google.com/?q=Trippstadter+Strasse+122,+D-67663+Kaiserslautern,+Germany&entry=gmail&source=g" rel="noreferrer noreferrer" target="_blank">Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany</a>
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vor-
sitzender), Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
</pre>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail-m_-5944550606285763725m_810554446674267800m_2770478137485848316gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Michael Wayne Goodman</div></div></div></div></div></div>
</div></div></div>
</div></blockquote></div></blockquote></div></div></div>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Michael Wayne Goodman</div></div></div></div></div></div>
</div></div>