gruninger / Common-Logic

Documents for the developments of ISO 24707 Editiion 2 (Common Logic)
8 stars 3 forks source link

Introduce top-level notion of "CL document" (parent of "CL text") #40

Open clange opened 11 years ago

clange commented 11 years ago

In the network we are practically using, CL texts are not free-floating but occur in documents (think: files). We suggest that that top-level unit be called "CL document", and that the listing in A.2.3.11 be replaced with the following grammar:

cldocument = { namedtext } | text ;
namedtext = open, 'cl:text' interpretablename, text, close ;
text = { phrase }
phrase = ... (as discussed previously)

For phrase, please see #39.

The first rule is justified by the following consideration: When talking about network identifiers (i.e. IRIs) of texts inside documents (see #41 in a few minutes), it doesn't make sense to have, on top level of a document, named texts intermixed with unnamed texts, as it wouldn't be clear how to identify the unnamed stuff.

We don't need modules on cldocument level, as phrase = ... | module allows for having modules anyway.

greenTara commented 11 years ago

It does make sense to me to allow one unnamed text in a document with one or more named texts. This could be implemented in CLIF as

cldocument = ( text? , { namedtext } ) ;

This approach would take care of something that has always bothered me - when you have a list of phrases, how many texts do you have? It is ambiguous because you could groups the phrases contiguously in a number of ways and each grouping would match the production

text = {phrase} ; 
clange commented 11 years ago

Yes,

cldocument = ( text? , { namedtext } ) ;

makes perfect sense to me as well.