<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi developers,
<div class=""><br class="">
</div>
<div class="">Guy found a bug in the way the LKB expands type constraints.</div>
<div class=""><br class="">
</div>
<div class="">The underlying problem was that expanding a type in principle requires that all other types' local constraints be available - but sometimes they weren't since computing local constraints was interleaved with type expansion. So what I've done is
 pull them apart into two separate phases.</div>
<div class=""><br class="">
</div>
<div class="">I attach a patch, which I will shortly commit to the lkb fos branch, and which will be in the next binary release.</div>
<div class=""><br class="">
</div>
<div class="">John</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 7 Sep 2021, at 16:21, Guy Emerson <<a href="mailto:gete2@cam.ac.uk" class="">gete2@cam.ac.uk</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<meta content="text/html; charset=utf-8" class="">
<div dir="ltr" class="">
<div class="">Hi John,</div>
<div class=""><br class="">
</div>
<div class="">I just wanted to follow up to ask if you'd like to share this bug fix on the forum or developers list?</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Guy<br class="">
</div>
</div>
<br class="">
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">Am Mi., 25. Aug. 2021 um 12:12 Uhr schrieb Guy Emerson <<a href="mailto:gete2@cam.ac.uk" class="">gete2@cam.ac.uk</a>>:<br class="">
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr" class="">
<div class="">Hi John,</div>
<div class=""><br class="">
</div>
<div class="">Thank you!  This seems to work with all of my grammars.  Do you want to post this on the forum or the developers list?<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I've noticed that the Turing machine grammars are having problems with LUI, but that seems to be a separate issue.  The results look correct with LKB native graphics.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Guy<br class="">
</div>
</div>
<br class="">
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">Am Di., 24. Aug. 2021 um 23:46 Uhr schrieb John Carroll <<a href="mailto:J.A.Carroll@sussex.ac.uk" target="_blank" class="">J.A.Carroll@sussex.ac.uk</a>>:<br class="">
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="">
<div class="">Hi Guy,
<div class=""><br class="">
</div>
<div class="">I've found the bug. It looks as though it's been in the LKB from day zero. I've got a fix, which gets the right result for the type 'test' in incomplete.tdl. Would you like to double-check that it also works with your more demanding grammars?</div>
<div class=""><br class="">
</div>
<div class="">I attach the code for the fix. You could insert it in your ~/.lkbrc file</div>
<div class=""><br class="">
</div>
<div class="">John</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 19 Aug 2021, at 11:55, Guy Emerson <<a href="mailto:gete2@cam.ac.uk" target="_blank" class="">gete2@cam.ac.uk</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">
<div class="">(cross-posted to: <a href="https://delphinqa.ling.washington.edu/t/incomplete-expanded-type-constraints/681" target="_blank" class="">
https://delphinqa.ling.washington.edu/t/incomplete-expanded-type-constraints/681</a> )</div>
<div class=""><br class="">
</div>
<div class="">There seem to be some cases where the LKB does not fully expand type constraints, e.g. compiling the attached file as the entire grammar.</div>
<div class=""><br class="">
</div>
<div class="">The type constraints for `null-with-diff-list` include a re-entrancy.  However, in the type `test`, this re-entrancy is lost.<br class="">
<br class="">
Strangely, commenting out the definition of `1-list-with-diff-list` recovers the re-entrancy, even though this type does not appear in the feature structure.  Similarly, commenting out the constraints on `cons-with-diff-list` also recovers the re-entrancy,
 even though again this type does not appear in the feature structure.<br class="">
<br class="">
I'm not 100% sure what the conditions are which cause this bug, but they must be quite specific, given the above behaviour, and given that the LKB can handle much larger and more complicated type constraint expansions.<br class="">
<br class="">
I've tested this with the most recent release of LKB-FOS (as well as an older release).
</div>
</div>
<span id="x_gmail-m_1019433768017948402gmail-m_-310209008408180776gmail-m_8846664379591965717x_cid:f_ksit17kr0" class=""><incomplete.tdl></span></div>
</blockquote>
</div>
</div>
</div>
<div class="">
<div class=""><br class="">
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br class="">
</div>
<div><br class="">
</div>
</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
</div>
</body>
</html>