gruninger / Common-Logic

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

CLIF comment punctuation #21

Open greenTara opened 11 years ago

greenTara commented 11 years ago

Defect Nos.: 23

Submitter: nicolas.f.rouque AT jpl.nasa.gov

References in Document: pp. 28-31 A.2.3.2 A.2.3.9 A.2.3.11

Nature of Defect: CLIF semantics specifies no interpretation for comments which are currently defined in terms of interpreted names (quotedstring) instead of interpretable names (enclosedname)

A.2.3.9 affects Table A.1, p.30, the unnamed entry between E12 and E13 which defines the interpretation for an expression of the form:

A sentence (cl:comment "string" P) is I(P)

This sentence expression is not syntactically valid according to A.2.3.9:

commentsent = open, 'cl:comment', quotedstring , sentence , close ;

because A.2.2.2 and A.2.2.5 define, respectively:

stringquote = '''; quotedstring = stringquote, { ... }, stringquote ;

A.2.3.11 affects Table A.1, p.31, the unnamed entry between E14 and E17 which defines the interpretation for an expression of the form:

A phrase (cl:comment "string") is: true

This sentence expression is not syntactically valid according to A.2.3.11 for similar reason as above:

phrase = sentence | module | (open, 'cl:imports' , interpretablename , close) | (open, 'cl:comment', quotedstring, cltext, close);syntax/semantic inconsistency for comment sentences & comment phrases
(see clause 10 in: http://www.omg.org/cgi-bin/doc?ad/08-05-02) The syntax of commented sentences (A.2.3.9) and phrases (A.2.3.11) are in conflict with the key principle governing the non interpretation of comments in CLIF semantics succinctly stated in 6.2, on p. 16:

Proposed Solution: A.2.3.9: commentsent = open, 'cl:comment', quotedstring , sentence , close ;

It should be changed to a definition that uses an interpretable name instead:

A.2.3.9: commentsent = open, 'cl:comment', enclosedname , sentence , close ;

Similarly, A.2.3.11 is also inconsistent with the principle stated in 6.2:

A.2.3.11: phrase = sentence | module | (open, 'cl:imports' , interpretablename , close) | (open, 'cl:comment', quotedstring, cltext, close);

It too should be changed to a definition that uses an interpretable name instead:

A.2.3.11: phrase = sentence | module | (open, 'cl:imports' , interpretablename , close) | (open, 'cl:comment', enclosedname [ cltext ], close);

greenTara commented 11 years ago

Here is a relevant thread from the mailing list http://common-logic.1085828.n5.nabble.com/Clarification-of-section-A-2-3-11-in-24707-tt1961.html#a1962

whitten commented 11 years ago

This has been discussed on the 2012-Jan-08 conference call.