From sowa at bestweb.net Wed Jan 1 19:46:52 2003 From: sowa at bestweb.net (John F. Sowa) Date: Fri Oct 10 03:34:00 2003 Subject: [KIF] Re: [SCL] Issues and proposals References: Message-ID: <3E139A0C.2050008@bestweb.net> Pat, Chris, Jim, et al., I have been going through the documentation for the ISO Z standard, which was formally approved in May 2002. I believe that the ISO Z standard would make an excellent starting point for defining the Simplified Common Logic (SCL) standard. (For more info about Z and the ISO standard, see the references at the end of this note. I recommend the first chapter of the Z reference manual, zrm.pdf, as an excellent tutorial on Z.) Interestingly, the Z standard uses a version of the same Z notation (supplemented with the syntactic categories of Z as types) as the metalanguage for defining Z itself. Although that metalanguage is not presented as a standardized language in the Z document, a similar approach could be formalized as part of the more ambitious goals we have envisioned for the full Common Logic standard. Therefore, as one, admittedly rather large issue, I would like to make the following proposal: 1. We start with the final draft of the ISO Z standard (which Frank F. had suggested that we review) as an outline for the June 2003 draft of the SCL standard. That draft would adopt the same model theory that is developed for Z: first-order logic plus equality with ZF set theory used to define the denotation of every SCL expression. 2. Instead of using Z notation as the metalanguage for defining SCL, we could use a version of KIF syntax with each of the Z symbols replaced by a plain ASCII string; e.g., the fancy letter P used in the Z standard would be written as "powerset". 3. Annex B of the Z standard defines a "mathemtical toolkit" in Z, which includes sets, relations, functions, integers, sequences, and bags. All of those entities, which we have been calling a mathematical ontology, would be useful for most applications of KIF and conceptual graphs. Therefore, I suggest that we include the same definitions (but in the KIF-like notation) as an annex to the SCL standard. 4. Given a formal definition of sequences, it should be a relatively straightforward exercise to define a syntax that would use sequences as a replacement for the row variables that people have been using in KIF. In fact, I believe that it would be possible to define a syntax that is identical to what the KIF users are familiar with. The only difference is that the sequences in the SCL version of KIF would be defined in an annex rather than the core logic. For the KIF users, there should be no noticeable difference. 5. As concrete syntaxes for the object languages, the SCL standard would include the grammars for a KIF-like language that is upward compatible with current KIF and for a CG-like language that is upward compatible with CGIF (Conceptual Graph Interchange Format). Since the model theory would be indentical to the Z standard, that would make all three concrete notations semantically equivalent and computationally interoperable: KIF, CGs, and Z. Since most of the above work can be accomplished merely by copying the relevant parts of the Z standard and replacing the Z syntax and symbols with KIF syntax and symbols, I believe that we can finish the complete committe draft by June 2003. At that point, we can submit it to both ISO and W3C. If everybody likes it, then it would become an ANSI, ISO, and W3C standard. The next step after June 2003 would be to work on the more ambitious CL standard, which would formalize the metalanguage as well as the object language and which would replace the Z semantics with a more general, but upward compatible typeless model theory along the lines that Pat and Chris have been developing. I would hope that the full CL effort could be completed by summer 2004, but that is another issue to be discussed. Following are some comments on earlier notes. First a comment on Jim Hendler's recent note: JH> In particular, I am very interested both in the expression of rules > on the web (connected to the sorts of ontologies provided by OWL) and > even more so in the exchange of proofs on the web - which, if done > right, could really prove an amazingly strong case for the deployment > of logics on web resources. That shouldn't be difficult. There are quite a few theorem provers that use KIF, CG, and Z notations. Defining a common semantics for all three notations together with formal mappings from any of the notations to any of the others should make it even easier to exchange rules, proofs, ontologies, etc. JH> For example, my favorite is an e-business contract in which your > system could send to my bank a proof that I had made a purchase at an > agreed upon price, and my bank would transfer the money assuming all > was appropriately signed and assured. Tim BL's favorite is web site > access - his example is that you can access the W3C member site if you > can prove you work for one of the members - and that proof probably > includes some sort of signed statement from some database that you > work for X, coupled with the W3C's assertion that X is a member. Again, a lot of work on such topics has been done with all three notations. You might take a look at the examples in Spivey's reference manual for Z (see the reference below for zrm.pdf). I would also like to mention the RoZ project (see reference below), which translates an annotated version of UML diagrams to Z. The RoZ tools can be used in conjunction with Rational Rose for generating formal specifications as part of the UML design process. The RoZ tools also generate the UML Object Constraint Language (OCL) from Z. And Gerard Ellis (email above) had been teaching a course in software engineering, in which he used both Z notation and CG notation for software specification. He gave the students their choice of using either notation for their course projects, and most of them preferred to use the CG notation. But both notations were used in semanticaly equivalent ways. Another language I would recommend for the SCL family of notations is a version of controlled English. See my note on how similar rules can be stated in an English-like notation that could be translated to or from any of the three proposed notations for SCL: http://www.jfsowa.com/logic/ace.htm In a previous note, Pat Hayes mentioned a couple of issues that were raised by Tanel Tammet: PH> 1. SCL needs a way to attach comments to expressions which are > logically transparent but can be used to attach extra-logical > information. All three notations -- KIF, CGs, and Z -- already have a syntax for representing comments, and the translations from one notation to another could simply carry the comments along while changing the delimiters to suit the particular concrete syntax. PH> 2. SCL needs an explicit XML syntax. Choosing an XML syntax style > may have consequences for the rest of the language. Everyone recognizes that it is necessary to demonstrate that any of the concrete notations should be translatable to an XML form. But that would impose no constraints on the languages themselves. As a matter of fact, back in the 1980s, two of the CG implementers, Alex Hurwitz and Bill Rich, had designed a represenation for CGs in GML -- the parent of SGML, which is the parent of XML. That representation didn't require any changes to either the syntax or the semantics of conceptual graphs. Furthermore, Appendix A of the ISO Z standard is devoted to the LaTeX mark-up for formatting and printing Z notation. The reason why they used LaTeX instead of XML is that XML was not available when they began working on their project and all the Z formatting tools used LaTeX. In any case, it would be an easy exercise to modify or extend MathML to format Z. John Sowa ------------------ References ------------------ The Z Reference Manual, which is a more readable introduction to Z than the official ISO standard: http://spivey.oriel.ox.ac.uk/~mike/zrm/ If that link is unavailable, the book can also be found at the following URL: http://www.cs.clemson.edu/~fmgroup/Materials/Zed/zrm.pdf The Z user's web site with the FAQ list and pointers to various resources: http://www.zuser.org/z/ Copies of the draft standards and other proceedings leading up to the official ISO standard: http://www.zuser.org/z/#standards The draft of August 1999 is almost identical to the official ISO standard. Web site for tools that map annotated UML diagrams to Z specifications: http://www-lsr.imag.fr/Les.Groupes/pfl/RoZ/ The name RoZ is pronounced "Rosette" to suggest that it is a Rosetta stone for relating UML to logic. From cmenzel at tamu.edu Fri Jan 3 20:47:54 2003 From: cmenzel at tamu.edu (Christopher Menzel) Date: Fri Oct 10 03:34:00 2003 Subject: [KIF] Revised CL document Message-ID: I've updated the CL document (http://cl.tamu.edu/docs/cl-syntax-semantics.html): 1) Added a short section on XML, including the DTD I sent around yesterday and an example; 2) Added a short section on constants for truth and falsity suggested by Mark Stickel; 3) Added a brief discussion of the example from Ian Horrocks illustrating that CL validity =/= traditional first-order validity; 4) Numerous fixes thanks largely to Mark's keen eye. A section on SCL will be forthcoming as things stabilize. -chris -- /\ ASCII ribbon | Chris Menzel -- http://philebus.tamu.edu/~cmenzel \/ campaign | Philosophy Dept, Texas A&M University /\ against | College Station, TX 77843-4237 / \ HTML email | voice: 979.845-5660 fax: 979.845.0458 From sowa at bestweb.net Tue Jan 7 11:57:49 2003 From: sowa at bestweb.net (John F. Sowa) Date: Fri Oct 10 03:34:00 2003 Subject: [KIF] Re: [SCL] DTD for XML/SCL References: <601AC49F-1F39-11D7-AE41-003065A29714@ontologyworks.com> Message-ID: <3E1B151D.1090400@bestweb.net> Bill and Chris, I think we all agree on the fundamental issues regarding how SCL should relate to XML. To clarify, and in some respects broaden, the issues, I would like to suggest the following approach: 1. Write an XML DTD to relate the abstract syntax of SCL to XML along the lines that Chris has been doing. 2. Include other concrete syntaxes in the SCL standards document, such as KIF and CGIF. 3. Provide an escape tag, which would allow the embedding of various SCL concrete notations within an XML document. For example, (exists ((?x Cat) (?y Mat)) (on ?x ?y)) (on [Cat] [Mat]) 4. Include Z as a first-class member of the SCL family, with the same status as KIF and CGIF. The SCL standard document should relate the SCL abstract syntax to the concrete syntax of core Z (which is Z without the mathematic toolkit) in the same way that it relates the abstract SCL syntax to the concrete syntaxes of KIF and CGIF. Points #1 and #2 seem to be well accepted by everybody who is working on the SCL project. Point #3 is one that I raised in my earlier note, to which Bill and Chris replied. I would have no objections to the verbosity of the XML DTD along the lines of #1 provided that we also have an escape along the lines of #3, which would allow KIF, CGIF, and other compatible SCL languages in an XML document without the overhead of the encoding proposed for point #1. The major new point I believe we should add is the adoption of Z as a member of the SCL family of concrete notations. There are several reasons, which I discussed in my earlier note and which I would like to summarize here: 1. The model-theoretic foundations for Z, as presented in the ISO Z standard, are logically equivalent to the simplified SCL semantics that Pat Hayes proposed. 2. Z has been developed and used by well-qualified computer scientists who have a long history of applying logic to formal specifications of programming languages and other kinds of software. It was first published as a PhD dissertation by Mike Spivey at Oxford, but it incorporates the approach developed by Hoare, Abrial, and others, including distinguished visitors to Oxford, such as Dana Scott. 3. Z has been officially adopted as an ISO standard. An SCL standard that builds on the Z standard would be very easy to sell to the ANSI and ISO standards bodies as well as to any country, company, or computer scientist who respects ANSI and ISO (which includes nearly everybody in the world except Bill Gates). 4. Finally, we have been proposing CL and SCL as a way of unifying the diverse logic-based notations that have been developed. If we adopt the Z standard as a foundation for SCL, we will set a good example for other people to follow. But if we ignore Z and go our own way independently of Z, we will lose any credibility we may have had. The first question anybody would ask is why they should accept our proposal instead of adopting an official ISO standard that has the same semantics. As I said in my earlier note, the adoption of Z semantics as a foundation for SCL would allow us to develop an upward compatible semantics that would satisfy the more ambitious goals of our earlier CL efforts. We could write a solid SCL standard document with an outline similar to the Z document by June 2003. After that, we could turn to the more ambitious metalanguage project for CL, which would go beyond what has been done in the Z standard. Bottom line: Adopting the Z standard for the SCL foundations would enable us to finish an SCL standard document quickly, and let us begin work on the much more interesting metalanguage project. John