[developers] Incomplete expanded type constraints

John Carroll J.A.Carroll at sussex.ac.uk
Tue Sep 7 15:33:01 UTC 2021


Hi developers,

Guy found a bug in the way the LKB expands type constraints.

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.

I attach a patch, which I will shortly commit to the lkb fos branch, and which will be in the next binary release.

John


On 7 Sep 2021, at 16:21, Guy Emerson <gete2 at cam.ac.uk<mailto:gete2 at cam.ac.uk>> wrote:

Hi John,

I just wanted to follow up to ask if you'd like to share this bug fix on the forum or developers list?

Best,
Guy

Am Mi., 25. Aug. 2021 um 12:12 Uhr schrieb Guy Emerson <gete2 at cam.ac.uk<mailto:gete2 at cam.ac.uk>>:
Hi John,

Thank you!  This seems to work with all of my grammars.  Do you want to post this on the forum or the developers list?

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.

Best,
Guy

Am Di., 24. Aug. 2021 um 23:46 Uhr schrieb John Carroll <J.A.Carroll at sussex.ac.uk<mailto:J.A.Carroll at sussex.ac.uk>>:
Hi Guy,

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?

I attach the code for the fix. You could insert it in your ~/.lkbrc file

John


On 19 Aug 2021, at 11:55, Guy Emerson <gete2 at cam.ac.uk<mailto:gete2 at cam.ac.uk>> wrote:

(cross-posted to: https://delphinqa.ling.washington.edu/t/incomplete-expanded-type-constraints/681<https://delphinqa.ling.washington.edu/t/incomplete-expanded-type-constraints/681> )

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.

The type constraints for `null-with-diff-list` include a re-entrancy.  However, in the type `test`, this re-entrancy is lost.

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.

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.

I've tested this with the most recent release of LKB-FOS (as well as an older release).
<incomplete.tdl>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20210907/19357dce/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: types-incomplete-bug-fix.lsp
Type: application/octet-stream
Size: 3430 bytes
Desc: types-incomplete-bug-fix.lsp
URL: <http://lists.delph-in.net/archives/developers/attachments/20210907/19357dce/attachment.obj>


More information about the developers mailing list