Common Logic - PowerPoint PPT Presentation

About This Presentation
Title:

Common Logic

Description:

(exists (x) (and (x Jack Jill) (ConjugalRelation x)) And yet, CL is a first order logic ? ... (exists (property)(and (property Jill)(property Jack) ... – PowerPoint PPT presentation

Number of Views:92
Avg rating:3.0/5.0
Slides: 31
Provided by: path77
Category:
Tags: common | jill | logic

less

Transcript and Presenter's Notes

Title: Common Logic


1
Common Logic
  • A noble ambition, long in gestation, soon to be
    eased into ISO reality

2
What CL is and isn't
CL is a family of first-order logics which share
a common abstract syntax and model theory, and an
XML framework for encoding and transmitting them,
or their content, on an open network. CL syntax
is very relaxed in the expressions it allows, in
some ways going beyond classical FO logic. CL is
not a modal, free, hybrid, context, temporal,
rule, non-monotonic, logic programming,
description, etc. logic. On the other hand, CL
syntax does try to be generous with non-FO
syntax, so that non-FO content can be transmitted
through CL-compliant engines. And some of these
can be translated or embedded into CL
expressions.
3
(No Transcript)
4
What CL is and isn't
CL is a family of first-order logics which share
a common abstract syntax and model theory, and an
XML framework for encoding and transmitting them,
or their content, on an open network. CL syntax
is very relaxed in the expressions it allows, in
some ways going beyond classical FO logic. CL is
not a modal, free, hybrid, context, temporal,
rule, non-monotonic, logic programming,
description, etc. logic. On the other hand, CL
syntax does try to be generous with non-FO
syntax, so that non-FO content can be transmitted
through CL-compliant engines. And some of these
can be translated or embedded into CL
expressions.
5
conventional First-Order Logic
  • Lexicon fixed by signature
  • Lexicon is pre-sorted into relation/function/indiv
    idual names
  • One context-free syntax for expressing logical
    forms
  • Only pure logical forms allowed
  • No relations in the universe of discourse
  • No global naming scheme

6
conventional First-Order Logic (GOFOL)
  • Lexicon fixed by signature
  • Lexicon is pre-sorted into relation/function/indiv
    idual names
  • One context-free syntax for expressing logical
    forms
  • Only pure logical forms allowed
  • No relations in the universe of discourse
  • No global naming scheme

All of this causes problems for interoperability
and information exchange None of it is actually
required by the FO semantics
7
conventional First-Order Logic (CL)
  • Lexicon fixed by signature No signature
    required
  • Lexicon is pre-sorted into relation/function/indiv
    idual names Lexical categories implicit
  • One context-free syntax for expressing logical
    forms Syntactic options may be user-defined
  • Only pure logical forms allowed. CL can be
    intermixed with other content, including XML
    markup
  • No relations in the universe of discourse No
    restrictions on universe of quantification
  • No global naming scheme Uses WWW standard URI
    conventions

CL is first-order logic with syntactic
limitations removed and network use in mind.
8
CL dialects
(forall (?x)(implies (and (P ?x) (R ?x)) (PR
?x))))
Different surface syntax forms all map to the
abstract syntax, which provides a common semantic
reference.
_at_every x If P(?x) R(?x) Then PR(?x)
(?x)(P(x)R(x) ? PR(x))
(x)not(P(x) R(x) not PR(x))
9
Abstract syntax, dialects, compliance
10
Abstract syntax and compliance
Every soldier carries their own
rifle. KIF(forall ((?x soldier)(?y rifle))(gt
(owns ?x ?y)(carries ?x ?y) )) Bitter
KIF (forall (?x ?y)(gt (and (soldier ?x)(rifle
?y)) (gt (owns ?x ?y)(carries ?x ?y) )) )
11
Abstract syntax and compliance
Dialects need not correspond exactly to CL
abstract syntax, as long as they can be embedded
into it. Dialects can also extend the CL syntax
and count as partially conformant. There is a
special category of "irregular sentence" in the
abstract syntax, as a safety net to catch things
like modalities or contextual assertions. The CL
semantics treats irregular sentences as opaque
sentential variables. This allows CL to treat
sentences with such extensions as logical
sentences and to recognize some inferences. Eg
consider a modal extension to CLIF with Nec as
a modality, then (implies (Nec (foo baz))
(Nec (foo baz)) ) Is a CL tautology even though
the full meaning of Nec is invisible to the Cl
model theory. This also allows CL processors to
'pass along' notations which have extended
sentential types without being obliged to report
syntax errors.
12
CL abstract syntax
A text is a set, list or bag of phrases. It may
be identified by a name.   A phrase is either a
comment, or a module, or a sentence, or an
importation, or a phrase with an attached
comment. A comment is a piece of data. A module
consists of a name, an optional set of names
called the exclusion set, and a text called the
body text. An importation contains a name. A
sentence is either a quantified sentence or a
Boolean sentence or an atom, or a sentence with
an attached comment, or an irregular sentence. A
quantified sentence has a type, called a
quantifier, and a set of names called the bound
names, and a sentence called the body of the
quantified sentence. CL recognizes the
existential and universal quantifier. A Boolean
sentence has a type, called a connective, and a
number of sentences called the components of the
Boolean sentence. The number depends on the
particular type. CL recognizes the conjunction,
disjunction, negation, implication and
biconditional types with respectively any number,
any number, one, two and two components. An
irregular sentence may have as immediate
components any number of sentences, terms or
names. An atom is either an equation containing
two arguments which are terms, or consists of a
term, called the predicate, and a term sequence
called the argument sequence, containing terms
called arguments of the atom.  A term is either
a name or a functional term, or a term with an
attached comment. A functional term consists of a
term, called the operator, and a term sequence
called the argument sequence, containing terms
called arguments of the functional term. An term
sequence is a finite sequence of terms and an
optional sequence variable.
13
CL Wild West Syntax
The most startling feature of CL to most
FOL-savvy readers is its freewheeling lack of
concern with the usual division between
individual, relation and function names. CL makes
no such distinctions they are all merely names,
and a name can be used anywhere. It can be an
individual, a relation (with any number of
arguments) and a function (with any number of
arguments). It can also be used as a 'variable',
i.e. can be bound by a quantifier. (married
Jack Jill) ( (when (married Jack Jill)) (hour 3
(pm (thursday (week 12 (year 1997))))) ) (exists
(x) (x Jack Jill)) And yet, CL is a first order
logic ?!
14
CL Wild West Syntax
(married Jack Jill) ( (when (married Jack
Jill)) (hour 3 (pm (thursday (week 12 (year
1997))))) ) (ConjugalRelation married) (exists
(x) (and (x Jack Jill) (ConjugalRelation x)) And
yet, CL is a first order logic ?! Yes, because
these quantifiers always range over a single
first-order universe. There are no comprehension
assumptions in CL (unlike in type theory or
higher-order logic.) The only semantic
presumption is that all names denote something,
and that any name that is used as a relation or
function name must denote something that has a
relation or functional extension and these are
normal first-order semantic assumptions.
15
CL Wild West Syntax
(thisproperty Jill) (thatproperty
Jack) ??entails?? (exists (property)(and
(property Jill)(property Jack))) In
higher-order logic, yes, because property could
be (lambda (x)(or (this property x)(thatproperty
x))) In CL, no. There are models in which two
properties exist but their 'union' doesn't. If
you want it to follow, you can axiomatize the
necessary construction (forall (x y)(iff
((owlUnion x y) ) (or (x )(y )) )) And now
the conclusion above does follow. So you see,
it's just up to you.
16
CL as a network logic
Agents on a network send logic expressions to one
another, and keep any communication overhead to a
minimum. Suppose they just send the sentences to
one another. Then the same logical inference
principles should work at any node.
Communication and entailment should commute.
(married Jack Jill)
(ConjugalRelation married) SO (exists
(x)(ConjugalRelation x))
(and (married Jack Jill)(ConjugalRelation
married)) SO (exists(x)(and (x Jack
Jill)(ConjugalRelation x)))
17
CL (no seq vars) embedded in GOFOL
Treat all the names as individuals, and insert a
new relation name holds in front of every atom,
and a new function name app in front of every
term (married Jack Jill)
holds(married Jack Jill) (ConjugalRelation
married) app(ConjugalRelation
married) And everything is magically transformed
back into conventional FO syntax, and all the
inferences are conventional FO entailments.
This is a quick and dirty way to implement a CL
engine from a conventional FO tool. (Some care is
needed with equality.) Note, the 'new' relations
and functions are not in the universe of
quantification, as required by GOFOL.
18
CL (no seq vars) embedded in GOFOL
Treat all the names as individuals, and insert a
new relation name holds in front of every atom,
and a new function name app in front of every
term (married Jack Jill)
holds(married Jack Jill) (ConjugalRelation
married) app(ConjugalRelation
married) And everything is magically transformed
back into conventional FO syntax, and all the
inferences are conventional FO entailments.
Which means that the semantics is accurately
captured by this translation as well. One can
view CL as being GOFOL, written in this odd way,
with the holds and app simply erased from the
surface syntax everywhere.
19
CLIF syntax
CLIF is the CL version of KIF. CLIF generalizes
and simplifies KIF in various ways, but is
basically similar. Character coding KIF is
ASCII, CLIF is Unicode Names KIF restricts to
uppercase, CLIF allows any character sequence
(including URIs) Sequence variable prefix KIF
is _at_x, CLIF is x Sequence quantifiers CLIF
has only free seqvars in tail position, no
quantifiers Atoms KIF is simple applications,
CLIF also allows case-role syntax
(sugar) Connectives KIF uses gt, ltgt, CLIF uses
only 'implies', 'iff', etc. Quantifiers CLIF
has a construction for guarded quantifiers
(sugar) CLIF has constructions for texts and
modules CLIF does not have the KIF definition
construction.
20
CLIF syntax
(text rifle (import http//www.ikris/ont36/milit
ary_personnel ) (forall ((x)(implies ((comment
'is mp the right namespace?-PJH' mpsoldier)
x))(exists (y)(and (mprifle y)(owns x y))) ))
)(comment 'end of rifle text')) (forall ((x
rdfsClass)) (and (comment 'example of
self-application' (x x)) (rdfssubClassOf x x))
) (text listscollections (comment 'Defines
cons-nil and RDF collection vocabulary styles for
describing lists.')(comment '??? ?????')( nil
(list)) (forall (x) ( (list x )(cons x (list
)))) (forall (x y z)(iff (List x) (exists y z)(
x (list y z)))) ( List http//www.w3.org/1999/02/
22-rdf-syntax-nsList) (forall (x (y List))(and
( (rdffirst (cons x y)) x) ( (rdfrest (cons x
y)) y) )) (forall ((r "relation which takes
argument lists"))(iff (r )(r (list ))
)) (forall (x)( (concat (list) x) x)) (forall
(x z) ( (concat (list x ) z)(cons x (concat
(list ) z)) )) )
21
CLIF sequence variables
(forall (x) ( (list x )(cons x (list
)))) Means (forall (x)( (list x)(cons x
(list)))) (forall (x x1) ( (list x x1)(cons x
(list x1)))) (forall (x x1 x2) ( (list x x1
x2)(cons x (list x1 x2)))) (forall (x x1 x2 x3)
( (list x x1 x2 x3)(cons x (list x1 x2
x3)))) . A phrase with a seqvar in it stands
for an infinite (RE) set of sentences. CL with
seqvars is therefore not compact, and therefore
not first-order. (Same applies to KIF, in
spades.) However if we think of such phrases as
axiom schema, then the logic is first-order. And
this is usually all anyone wants.
22
CLIF design syntax angels and demons
The choice of syntax for CLIF was a running
compromise between having user features and
keeping the language simple. The demons kept
suggesting really neat extensions, and the angels
kept pointing out that they were defineable as
syntactic sugar, or broke the semantics.
Neither extreme seemed reasonable. The purest,
most angelic, versions have one connective and
one quantifier and one kind of logical name. The
most devilish versions have three different kinds
of conjunction, four ways to write an
implication, segregated sets of typed names,
etc.. Like any compromise, the end result makes
nobody completely happy. (I would like to junk
the role-name syntax, but some user communities
think of them as absolutely essential.) The
syntax for seqvars (free-only, tail-position-only)
was just such a compromise. It turns out however
to be just as expressive as having quantifiers
over sequences, because you can quantify over
lists. Moral even very pure logics can be
devilishly expressive.
23
CLIF extras
CLIF has a few extra features which are not
finitely axiomatizable in CL. These include
decimal numerals which denote natural numbers,
and the ability to use declared datatype names as
predicates and functions, where the predicate is
true of all and only the well-formed lexical
strings for the datatype, and the function takes
well-formed lexical strings to their datatype
value. For example, xsdinteger is a datatype,
so ( 345 (xsdinteger '345')) (not
(xsdinteger '3a')) Are both logically true in
CLIF Particular datatypes my have associated
functions which are evaluable on ground terms
CLIF syntax includes plus and times on integers.
Added to the lists machinery, this allows CLIF to
express numerical quantifiers and other
exotica. These all correspond to RE sets of
ground sentences.
24
CL semantics
..is conventional in most respects, but there are
no signatures, and we assume that everything in
the universe could be used, at least potentially,
as a relation and as a function, of any arity.
This is done by assuming that an interpretation
has two mappings rel and fun from U to U (finite
sequences of elements of U) and to UxU
respectively. Then the interpretation of an atom
is I ' (t t1 tn) ' true iff lt I t1I tn
gt is in rel(It) Conventional GOFOL would be
is in relI t , where relI is a mapping from
relation symbols to relational extensions. By
mapping extensions from entities in U rather than
from textual (syntactic) objects, we gain great
expressive power, eg being able to quantity over
relations, have functions on relations, etc.
25
CL semantics metaphysics?
by assuming that an interpretation has two
mappings rel and fun from U to U (finite
sequences of elements of U) and to UxU
respectively. Hmm, so everything in the universe
has a relational extension. Does that imply that
there are no singulars in any CL ontology? In
other words, should the model theory be
understood to be based on, or to incorporate, a
coherent metaphysics? Some of us recently had a
sharp dispute about this question. I argued Yes,
it does. Bill Andersen and Chris Menzel argued,
No, it does not. Whoever is right, there is no
way to stop those guys, or indeed anyone, from
pursuing their metaphysical agenda using this
logic, so I'm fighting a losing battle here.
Time to quit. OK, the logic is yours. Use it as
you will
26
CL semantics intensional relations
by assuming that an interpretation has two
mappings rel and fun from U to U (finite
sequences of elements of U) and to UxU
respectively. Note that this distinguishes the
relation itself from its extension. So two
distinct relations might have the same extension
CL takes a fundamentally intensional view of
relation and function identity. The RDF/RDFS
semantics follows the same convention, but OWL is
extensional. Recent work on rule-saturation
inference suggests that intensional approaches
are both more efficient and more usefully
expressive in practice.
27
CL text on a network identifiers
The top level of CL is text, which is a (named?)
collection of phrases. CL recognizes the idea of
naming a text with an identifier, and using an
identifier to import one text into another. (All
copied from OWL.) To give this a crisp semantics
requires placing semantic conditions on a
communication network rather than on just a
notation. Network identification must line up
with denotation. This is one small example of the
kind of semantic extensions that will be required
to properly handle logic on a web or a network.
Another is 'graph naming' and using logical texts
to make assertions about network properties, to
be able to guarantee publicly accessible
properties. Already it is possible to make a
notion of a 'web performative' precise using
named RDF graphs, taking Web logic into the
realm of social linguistics.
28
CL modules controlling a local universe
CL provides a module construction, to allow a
dialect which excludes some entities from the
quantifier domain (Eg GOFOL) to interact with a
dialect which does not. Supporting
intercommunication between logics based on
different views of what is allowed in the
universe, is a delicate matter. One route would
be to provide a full context logic or mechanism,
but no such is available suitable for a
standard., and they all involve considerable
complexity. CL follows a simple compromise based
on a 'two-level' universe, allowing the local
domain to be a strict subset of the global
universe. The Horatio principle.
29
CL and RDF, OWL, etc
The semantic web languages (RDF, RDFS, varieties
of OWL) all map into CL or into CL ontologies.
Most of it is straightforward rdf triples become
binary atoms, rdftype is application.
Cardinality restrictions give the most trouble.
s p o . goes to (p s o) s
rdftype c . goes to (c s) (
owlintersectionOf AND) (forall (P Q x)(iff (
(AND P Q) x)(and (P x)(Q x)) )) (forall (P Q
x)(iff ( (OR P Q) x)(or (P x)(Q x)) )) (forall (P
Q x)(iff ( (NOT P) x)(not (P x)) )) (forall (R P
x) (iff ( (ALLARE R P) x)(forall (y)(implies (R x
y)(P y)) )) (forall (R P x) (iff ( (SOMEARE R P)
x)(exists (y)(and (R x y)(P y)) )) (
(bigRedRubberBall)(AND Big MadeOfRubber Red Ball))
30
CL and RDF, OWL, etc
Cardinality restrictions give the most trouble.
(forall (r p n)(implies    (and
(owlonProperty r p) (owlminCardinality r n))
   (forall (x)(iff (r x) (exists
((L NOREPEATSLIST))(and (forall
(y)(implies (member y L)(p x y) ))       
(lesseq n (length L))      )))))) ( (LENGTH
nil) 0) (forall (x)( (LENGTH (list x ...)) (plus
1 (LENGTH (list ...)))) (iff (ALLDIFFERENT
...)(NOREPEATSLIST (list ...))) (forall (x)(not
(MEMBER x nil))) (forall (x y)(iff (MEMBER x
(list y ...))(or ( x y)(MEMBER x (list ...)))))
Write a Comment
User Comments (0)
About PowerShow.com