ontolog-forum
[Top] [All Lists]

Re: [ontolog-forum] UML and Semantics

To: ontolog-forum@xxxxxxxxxxxxxxxx
From: John F Sowa <sowa@xxxxxxxxxxx>
Date: Wed, 05 Dec 2012 10:29:51 -0500
Message-id: <50BF686F.3020801@xxxxxxxxxxx>
Ed,    (01)

I don't blame you for being skeptical.    (02)

JFS
>> OCL is a very quirky and awkward version of FOL.  I would recommend
>> Controlled English as a replacement for OCL.    (03)

EB
> Did you have one in mind? ...
>
> I would recommend pie in the sky for breakfast myself,
> but I don't know where to find one.    (04)

Writing an English-like grammar for full first-order logic is trivial.
Unfortunately, the simplest grammar that has a one-to-one mapping to
predicate calculus, Common Logic, or any other general-purpose logic
suffers from the same weaknesses as that logic:    (05)

  - Simple, readable expressions in many special-purpose notations
    (e.g., algebra or most programming languages) become verbose
    and awkward in predicate calculus and in many CNLs.    (06)

  - That is why COBOL has a "Compute" verb for FORTRAN-like
    statements and most working mathematicians don't find
    predicate calculus useful for anything they do.    (07)

See below for my recommendations for handling these issues.    (08)

For an example of a CNL that users really enjoyed, see the TQA
discussion in the following paper (pages 2 to 4):    (09)

    http://www.jfsowa.com/pubs/futures.pdf
    Future directions for semantic systems    (010)

TQA was called "natural language", but I would call it a CNL, since
it was completely specified by a formal grammar and a mapping to
first-order logic.  The users loved it, but it required a PhD linguist
at IBM Yorktown to update and extend the ontology.    (011)

EB
> And all of them have some Davidsonian view of events and actions,
> albeit no two alike, which is radically different from the formal
> semantics of OCL.    (012)

The differences between versions is in the ontology, not the logic.    (013)

By Davidsonian, I assume you mean the Peirce-Whitehead ontology
of assigning quantified variables to actions and events.  Peirce
not only recommended that approach, he also stated the equivalence
relations for mapping one version to the other:    (014)

    Controlled English:  x gives y to z.    (015)

    Simple predicate calculus:  (Ex)(Ey)(Ez)gives(x,y,z).    (016)

    "Davidsonian" PC:  (Ex)(Ey)(Ez)(Ew)(give(w) & agent(w,x) &
         theme(w,y) & recipient(w,z)).    (017)

By the way, Davidson took Whitehead's last class at Harvard, but he
got stuck with Quine as his thesis adviser.  And Quine did not look
kindly on letting quantifiers range over events.  So Davidson didn't
publish his event semantics until many years later.    (018)

JFS
>> But it's important to have a general-purpose formal logic to define the
>> semantics of all Controlled NLs, all UML diagrams, and all the AI-based 
>tools.    (019)

EB
> One ring to rule them all, and in the darkness bind them.    (020)

The correct verbs are *define* and *relate*.  The verb 'rule' is
incompatible with the prime directives:  diversity, heterogeneity,
and interoperability.  To rule is the goal of some very intelligent,
but clueless academics who want to ram their version of logic down
the throats of people who actually understand the requirements.    (021)

EB
> If there were one [logic],  what would one use for a supporting model
> theory,  I wonder?  (I'm sure I will regret asking...)    (022)

For most CNLs, plain vanilla first-order logic with Tarski's model
theory is sufficient.  For a broader range of logics, Common Logic
with the model theory of ISO 24707 is sufficient.  To handle Cyc and
other very rich logics, the IKRIS project defined IKL as an extension
of CL with one additional operator:  "that" for representing
metalanguage, as in "Tom knows that two plus two is four."    (023)

The major differences between CNLs that use the same logic is in the
ontology and the choice of syntax to make the expressions simpler
and more "natural".  See below for another recommendation.    (024)

John
______________________________________________________________________    (025)

Recommendation:  Notice how textbooks on mathematics, physics, and
computer science freely mix mathematical symbols and expressions
with the text in English and other NLs.  I recommend that style of
"mathematical English" as the pattern for controlled NLs:    (026)

  1. The basic grammar supports full first-order logic.  As an example,
     see CLCE:  http://www.jfsowa.com/clce/specs.htm    (027)

  2. Following are two equivalent expressions for introducing names:    (028)

        'a cat named Yojo'  =  'the cat Yojo'    (029)

  3. Quantified variables are names that consist of a single letter
     followed by zero or more digits.  They are introduced in a noun
     phrase with a quantifier, such as 'every', 'some', or 'a':    (030)

        'an integer N',  'every integer N greater than 17',  'a cat x1'    (031)

  4. Quotation marks are used to introduce terms in some formal
     notation that does not follow the CLCE rules:    (032)

     The factorial of a nonnegative integer N is written "facto(N)".    (033)

  5. Expressions enclosed in parentheses, square brackets, or
     curly braces are assumed to be in a formal notation that does
     not follow the CLCE rules:    (034)

     The factorial of 0 is 1.
     The factorial of 1 is 1.
     For every integer greater than 1,
     the factorial of N is (N * facto(N-1)).    (035)

  6. For representing complex data structures, a formal notation
     such as JSON can be used to complement the CLCE syntax:    (036)

     For some integer N, let x2 be the list [N, [N, N+1], [N+1, N+2]].    (037)

_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/  
Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/  
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/ 
To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J    (038)

<Prev in Thread] Current Thread [Next in Thread>