ISO Prolog Part 3 (Definite clause grammar rules)

Hi there.

I am interested to know what readers of this list think about

ISO/IEC NP TS 13211-3 NPOSA UNI/CT 524 2021-11-07
Information technology
Programming languages
Part 3: Definite clause grammar rules

Please see attached draft.
Kind regards,

Roberto

(Attachment dcgsdraft-2021-08-16.pdf is missing)

The reason the PDF was not uploaded was because the site setting for authorized extensions that can be uploaded does not include pdf. Last I recall it was decided not to allow PDFs to be uploaded.


Here is a link for those interested:


For more historical information see the full directory from which the document comes.

Index of /ulrich/iso-prolog/dcgs

A quick read suggests it formalizes current practice. It is not easy to assess whether SWI-Prolog fully complies to all this. Would be nice if there are test cases that allow making this assessment. Overall, I’m in favor of complying unless there is a good reason not to.

1 Like

Writing the test cases for conformance seems easy enough (use code examples in the document) but I have little idea of how to test for nonconformance, any suggestions.

Having the examples as unit tests is nice to have. Note that swipl-devel/test_dcg.pl at 8c3b93b998d7e5fd318dd10c8b1cb7922f3c054c · SWI-Prolog/swipl-devel · GitHub is already written by Ulrich based on an older draft. Hopefully (and likely) not much changed.

1 Like

Talked to Ulrich via e-mail and he noted about the document

It is the first draft towards a TS.

So I don’t plan to do test cases for a draft but if it does reach a final document will take a look again. :neutral_face:

Then there is no reason to hurry. DCGs have been on the ISO agenda since I joined the discussions, probably 20 years ago :slight_smile: We’ve seen various different approaches, none of which succeeded. I have the impression there is a fair compatibility among the current implementations. I might be wrong as I surely do no know all of them.

1 Like