[CL] Misleading passage about XCL [heur]
Ira Baxter
idbaxter at semanticdesigns.com
Tue Oct 19 10:17:07 CDT 2010
I build program analysis tools.
Among our many tools, we have a CL parser, AST builder,
source-to-source transformation engine and
prettyprinter for CL.
We get asked to export abstract syntax trees (for various
langauges) as XML all the time;
people seem to think "if its XML, it must be easy to deal with".
It isn't; the rules about reading "official XML" are astonishingly
complex when you take into account schemas, namespaces, entities, ...
You need a full up XML reader module to read XML "correctly".
If you are willing to settle for less, you don't have official XML.
Finally, as John Sowa has noted, XML signficantly bloats the text
compared (at least for ASTs) to an S-expression equivalent.
In addition, I find no specific value in sending XML text
as opposed to sending plain CL text as defined by the standard.
If you insist on sending it across a network, there are plenty of
methods
for moving arbitrary blocks of data/text without error; XML
adds nothing here.
If one *had* it in XML after transmission, how would it get used?
Well, presumably, one would have to parse it. Oops, now you
need that full XML reader, and you don't have straight CL,
and I assume (without reading the Annex) that the XML isn't
an AST for CL. So now you need to build a translator on
top of the XML reader to CL. I just don't see the point
of all this extra effort.
If you absolutely insist on having an XML version,
I suggest the following :-}
<CL>
...cl-text...
</CL>
That will do just as well, without the bloat.
Ira Baxter, CTO 512-250-1018
Semantic Designs, Inc.
>> -----Original Message-----
>> From: cl-bounces at philebus.tamu.edu [mailto:cl-
>> bounces at philebus.tamu.edu] On Behalf Of John F. Sowa
>> Sent: Monday, October 18, 2010 10:28 PM
>> To: Discussion of ISO Common Logic Standard (ISO/IEC 24707)
>> Subject: [CL] Misleading passage about XCL [heur]
>>
>> The following two passages should be deleted from the CL standard:
>>
>> On p. 23 Annex A, Section A.1:
>>
>> "The Recommended Common Logic interchange notation is based on XML,
>> a standard which was not available when KIF was originally
>> designed."
>>
>> On p. 54 Annex C , Section C.1:
>>
>> "XCL is an XML notation for Common Logic. It is the intended
>> interchange language for communication Common Logic across a
>> network"
>>
>> XML is a notation that is commonly used on the WWW, but it has no
>> special properties that make it better or worse than any other
>> notation for transmission across a network. In fact, XML tends
>> to make notations more bloated and therefore significantly
>> *worse* for data transmission.
>>
>> Furthermore, XCL is the *least* frequently used of the 3 annexes.
>> Does anyone know of anybody who is using it?
>>
>> John
>>
>> _______________________________________________
>> CL mailing list
>> CL at philebus.tamu.edu
>> http://philebus.tamu.edu/cgi-bin/mailman/listinfo/cl
More information about the CL
mailing list