the common logic standard christopher menzel texas a&m university [email protected]

28
The Common Logic Standard Christopher Menzel Texas A&M University [email protected]

Post on 21-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

The Common Logic Standard

Christopher MenzelTexas A&M University

[email protected]

Page 2: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Initial Motivations

• Origins in early AI.• But don’t run away!• The problem KIF addressed is still

with us.

Page 3: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Initial Motivations• The Situation

• The proliferation of intelligent systems• Each system with its own language

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 4: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Initial Motivations

• The Need • To share and integrate information across

diverse KR frameworks

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 5: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Initial Motivations• The Problem (well, one problem anyway…):

• General solution requires n2-n translators.• The number of translators needed for integration thus grows

exponentially with the development of new frameworks

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 6: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Initial Motivations• The Solution -- KIF:

• A single “hub” framework, an universal interlingua “spoken” by every framework

• Growth of translators to frameworks is linear (t = 2n)

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 7: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Design I

• The Issue of Expressive Power• An interlingua must be at least as powerful

as any conceivable KR framework

• All KR frameworks must be weaker than full first-order logic to be tractable

• If you can’t say it in FOL, you can’t say it (well, mostly…)

• Hence, KIF shall include FOL

Page 8: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Knowledge Interchange Format: Design II

• Syntactic Form• ASCII

• Can be typed in with a keyboard• Easily transferred as 7-bit text

• LISP-like (early AI influence…)• Minimal constraints on form (discussed below…)

Page 9: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

The Common Elements of First-order Languages• Lexicon

• Basic vocabulary

• Grammar• Recursive rules for forming complex expressions

• Semantics (Model Theory)• Mathematical theory of meaning• Formal definitions of validity, entailment, satisfiability

• Proof Theory• Metatheory

• Soundness, Completeness, Compactness

Page 10: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

A (First-order) KIF Lexicon• Terms

• Individual constants• Strings of unicode characters

• Individual variables• Strings of unicode chars prefixed by “?”

• Predicate constants• Strings of unicode characters

• Boolean operators• not, and, or, =>, <=>

• Quantifiers• forall, exists

Page 11: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

A Standard First-order KIF Grammar

• If P is a predicate and t1, …, tn are terms, then

(P t1 … tn) is an (atomic) formula.

• If A and B are formulas, so are (not A), (and A B), (or A B), (=> A B), and (<=> A B).

• If A is a formula and x any variable, then (forall (x) A) and (exists (x) A).

• Nothing else is a formula.

Page 12: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

KIF Semantics: Interpretations• An interpretation I = D,R,ext,V consists of

nonempty sets D and R, a function ext such that• ext(r) n<Dn

and a valuation function V such that • V(t) D, for all terms t,• V(P) R, for all predicates P.

• Let I[x/e] = D,R,ext,V, where V is just like V except that V (x) = e. I[x/e] is known as an x-variant of I.

Page 13: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

KIF Semantics: TruthLet I = D,W,ext,V be an interpretation.• (P t1 … tn) is true in I iff V(t1),…, V(tn) V(P)• Boolean cases

• (not A) is true in I iff A is not true in I.• (and A B) is true in I iff both A and B are.• …

• (forall (x) A) is true in I iff A is true in all x-variants of I

• (exists (x) A) is true in I iff A is true in some x-variant of I

Page 14: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

The Sad Truth (for Integration)

• There are lots of alternative syntactic frameworks equivalent to KIF

• Tastes differ! Different communities in fact adopt different frameworks

• For example…

Page 15: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

An Alternative Lexicon• Terms

• Individual constants• E.g.: a, b, c, a, b, c, …

• Individual variables • E.g.: x, y, z, x, y, z, …

• Predicate constants• E.g.: P, Q, R, Boy, Girl, Kissed

• Boolean operators• Typically: , , , ,

• Quantifiers • Typically: ,

Page 16: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

An Alternative First-order Grammar

• If P is a predicate and t1, …, tn are terms, then P(t1,…,tn) is an (atomic) formula.

• If A and B are formulas, so are A, (A B), (A B), (A B), and (A B).

• If A is a formula and x any variable, then xA and xA are formulas.

• Nothing else is a formula.

Page 17: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Common Structures and a Standard Logic

• Standard first-order languages and KIF languages are structurally identical.

• It would be untenable in a standard for logic to force users to adopt one particlar syntax over another.

• Hence, the Common Logic Standard specifies languages by means of an abstract syntax that can have many concrete instances.

Page 18: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

A Simple Abstract Syntax for FOL• A lexicon consists of

• A denumerable set Var of individual variables• A countable set Con of individual constants• A nonempty set Pred of predicate constants

• Let App be a 1-1 function on

Pred {Conn : n < }. Range(App) is the set AT of atomic formulas.

Page 19: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Formula Classes

• A formula class F (for a given lexicon) is a smallest class that includes AT and is closed under a set Op of operations Id, Neg, Disj, Cond, Bicond, ExQuant, and UnivQuant that satisfy the following conditions:

• Each operation in Op is 1-1• The ranges of the operation are pairwise disjoint and disjoint

from AT.• Id : TRM TRM F• Neg : F F• Disj (Conj, Cond, Bicond): F F F• ExQuant (UnivQuant) : Var F F

• Our two grammars above are both simply concrete instances of this abstract grammar.

Page 20: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

“Every boy kissed a girl.”• (forall (?x) (=> (Boy ?x) (exists (?y) (and (Girl ?y) (Kissed ?x ?y)))))• x(Boy(x) y(Girl(y) Kissed(x,y)))

• Abstractly:

UnivQuant(v1,Cond(App(Boy,v1),ExQuant(v2,Conj(App(Girl,v2),App(Kissed,v1,v2)))))

• Our standard first-order semantics can be applied to our abstract syntax. The semantics is then simply inherited by any instance of the syntax.

Page 21: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Extensions of Standard FOL

• Full KIF and other logic-based KR languages include features that extend standard FOL.

• A logic standard should be flexible enough to incorporate such extensions as options.

Page 22: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Type Freedom

• The Central Intuition• All entities – individuals, propositions, properties,

and relations alike – are first-class logical citizens that jointly constitute a single domain of quantification.

• Hence, such entities can themselves have properties, stand in relations, and serve as potential objects of reference.

Page 23: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Nominalization• The verb phrase ‘is famous’ is used to predicate fame of Quentin.

• “Quentin is famous.”

• Its nominalization ‘being famous’ is used to denote fame.• “Being famous is all Quentin thinks about.

• Since the verb phrase and its nominalization have the semantic value, the same constant can be used to symbolize both sentences.• (Famous quentin)

• (forall (?x) (<=> (ThinksAbout quentin ?x) (= ?x Famous)))

Page 24: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Variable Polyadicity• Many predicates in ordinary language can take

varying numbers of arguments• John is eating• John is eating toast• John is eating toast in the kitchen• John is eating toast in the kitchen at noon

• This suggests the need to allow predicates in KIF to be variably polyadic

• (eats John)• (eats John toast)• (eats John toast kitchen)• (eats John toast kitchen noon)

Page 25: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Self-exemplification• Classes in most KR frameworks can be

thought of as properties.• Some classes are members of themselves

• The “root” class Entity or Thing in standard inheritance hierarchies.

• The classes Class and Property.

• Type-freedom enables one to express self-membership (as self-exemplification)

• (Entity Entity)• (Class Class)• (Property Property)

Page 26: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Paradoxes: Not to Worry• Self-membership or self-exemplification is often cited as

the culprit behind the paradoxes• E.g., the Russell class {x | x x}

• Type-freedom appears to open the door to such undesirable fellows.

• (iff (Russell ?X) (not (?X ?X))

• The problem lies no more with type-freedom than with negation.

• The real villain is the idea that we can postulate classes/properties/functions satisfying any given condition.

• This is known as the naïve comprehension principle in set theory.

Page 27: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Predicates as function symbols• It is often convenient to use predicates as function

symbols:• (gardener (father-of cain))

• (exists (?x) (and (father-of cain ?x) (gardener ?x)))

• But often the reverse is true:• (father-of cain adam)

• (= adam (father-of cain))

• CL syntax allows both usages, and its semantics provides the right interpretations in each context.

Page 28: The Common Logic Standard Christopher Menzel Texas A&M University cmenzel@tamu.edu

Translating into FOL

• Full CL languages without sequence variables can be thought of as notational variants of first-order theories.

• Introduce Predn for each n

• (p t1 … tn) goes to (Predn p t1 … tn)