280 likes | 412 Views
The Common Logic Standard. Christopher Menzel Texas A&M University cmenzel@tamu.edu. K nowledge I nterchange F ormat : Initial Motivations. Origins in early AI. But don’t run away! The problem KIF addressed is still with us. K nowledge I nterchange F ormat : Initial Motivations.
E N D
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.
Knowledge Interchange Format: Initial Motivations • The Situation • The proliferation of intelligent systems • Each system with its own language
Knowledge Interchange Format: Initial Motivations • The Need • To share and integrate information across diverse KR frameworks
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
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)
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
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…)
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
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
A Standard First-order KIF Grammar • If P is a predicate and t1, …, tn are terms, then (Pt1…tn) is an (atomic) formula. • If Aand B are formulas, so are (not A), (and AB), (or AB), (=> AB), and (<=> AB). • If A is a formula and x any variable, then (forall (x) A) and (exists (x) A). • Nothing else is a formula.
KIF Semantics: Interpretations • An interpretationI = 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.
KIF Semantics: Truth Let 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 AB) 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
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…
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: ,
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.
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.
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.
Formula Classes • A formula classF (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 : TRMTRMF • Neg : FF • 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.
“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.
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.
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.
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)))
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)
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)
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.
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.
Translating into FOL • Full CL languages without sequence variables can be thought of as notational variants of first-order theories. • Introduce Prednfor each n • (pt1 … tn) goes to (Prednpt1 … tn)