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

Slides:



Advertisements
Similar presentations
Simplified Common Logic A flexible framework for information interchange based on first-order logic.
Advertisements

Artificial Intelligence
SCL: A Logic Standard for Semantic Integration Christopher Menzel Philosophy Department Texas A&M University
Three Theses of Representation in the Semantic Web
CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
RDF Schemata (with apologies to the W3C, the plural is not ‘schemas’) CSCI 7818 – Web Technologies 14 November 2001 Van Lepthien.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Copyright © Cengage Learning. All rights reserved.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
1 Ontology Language Comparisons doug foxvog 16 September 2004.
ISBN Chapter 3 Describing Syntax and Semantics.
OWL Datatypes: Design and Implementation Boris Motik and Ian Horrocks University of Oxford.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998.
Katz Formal Specifications Larch 1 Algebraic Specification and Larch Formal Specifications of Complex Systems Shmuel Katz The Technion.
Functional programming: LISP Originally developed for symbolic computing First interactive, interpreted language Dynamic typing: values have types, variables.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
November 11, 2004 July 20, 2004 Common Logic (CL) Development Current project Harry Delugach Univ. of Alabama in Huntsville
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
RDF: Concepts and Abstract Syntax W3C Recommendation 10 February Michael Felderer Digital Enterprise.
1. Motivation Knowledge in the Semantic Web must be shared and modularly organised. The semantics of the modular ERDF framework has been defined model.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
1 Introduction to Modeling Languages Striving for Engineering Precision in Information Systems Jim Carpenter Bureau of Labor Statistics, and President,
Knowledge Interchange Format Michael Gruninger National Institute of Standards and Technology
1 CENTRIA, Dept. Informática da Faculdade de Ciências e Tecnologia, Universidade Nova de Lisboa, Caparica, Portugal. 2 Institute of Computer Science,
Theoretical basis of GUHA Definition 1. A (simplified) observational predicate language L n consists of (i) (unary) predicates P 1,…,P n, and an infinite.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
The Relational Model: Relational Calculus
OWL 2 in use. OWL 2 OWL 2 is a knowledge representation language, designed to formulate, exchange and reason with knowledge about a domain of interest.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 5: Classical Logic.
Pattern-directed inference systems
Course: Software Engineering ©Alessandra RussoUnit 2: States and Operations, slide number 1 States and Operations This unit aims to:  Define: State schemas.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
Using Common Logic = Mapping other KR techniques to CL. = Eliminating dongles. = The zero case Pat Hayes Florida IHMC.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
1 Artificial Intelligence Applications Institute Centre for Intelligent Systems and their Applications Stuart Aitken Artificial Intelligence Applications.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Copyright © Cengage Learning. All rights reserved.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
1 CSC384: Intro to Artificial Intelligence Lecture 5.  Knowledge Representation.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
CMSC 330: Organization of Programming Languages Operational Semantics a.k.a. “WTF is Project 4, Part 3?”
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
ece 627 intelligent web: ontology and beyond
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 FP Foundations, Scheme In Text: Chapter Chapter 14: FP Foundations, Scheme Mathematical Functions Def: A mathematical function is a mapping of.
CMSC 330: Organization of Programming Languages Operational Semantics.
EEL 5937 Content languages EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Functional Programming Languages
ece 720 intelligent web: ontology and beyond
FP Foundations, Scheme In Text: Chapter 14.
Department of Computer Science
Predicates and Quantifiers
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Presentation transcript:

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

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.

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.

conventional First-Order Logic Lexicon fixed by signature Lexicon is pre-sorted into relation/function/individual 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

conventional First-Order Logic (GOFOL) Lexicon fixed by signature Lexicon is pre-sorted into relation/function/individual 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

conventional First-Order Logic (CL) Lexicon fixed by signature No signature required Lexicon is pre-sorted into relation/function/individual 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.

CL dialects Different surface syntax forms all map to the abstract syntax, which provides a common semantic reference. (forall (?x)(implies (and (P ?x) (R ?x)) (PR ?x)))) *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))

Abstract syntax, dialects, compliance

Abstract syntax and compliance Every soldier carries their own rifle. KIF: (forall ((?x soldier)(?y rifle))(=> (owns ?x ?y)(carries ?x ?y) )) Bitter KIF: (forall (?x ?y)(=> (and (soldier ?x)(rifle ?y)) (=> (owns ?x ?y)(carries ?x ?y) )) )

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.

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.

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 ?!

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.

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 ((owl:Union x y) …) (or (x …)(y …)) )) And now the conclusion above does follow. So you see, it's just up to you.

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) (and (married Jack Jill) (ConjugalRelation married)) SO (exists(x)(and (x Jack Jill) (ConjugalRelation x))) (ConjugalRelation married) SO (exists (x)(ConjugalRelation x))

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.

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.

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 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 =>,, 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.

CLIF syntax (:text rifle (:import ) (forall ((x)(implies ((:comment 'is mp the right namespace?-PJH' mp:soldier) x))(exists (y)(and (mp:rifle y)(owns x y))) )) )(:comment 'end of rifle text')) (forall ((x rdfs:Class)) (and (:comment 'example of self-application' (x x)) (rdfs:subClassOf x x)) ) (:text lists&collections (: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 (forall (x (y List))(and (= (rdf:first (cons x y)) x) (= (rdf:rest (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)) )) )

CL IF 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.

CL IF 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.

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, xsd:integer is a datatype, so (= 345 (xsd:integer '345')) (not (xsd:integer '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.

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 is in rel(I[t]) Conventional GOFOL would be … is in rel I [ t ], where rel I 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.

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…

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.

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.

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.

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, rdf:type is application. Cardinality restrictions give the most trouble. s p o. goes to (p s o) s rdf:type c. goes to (c s) (= owl:intersectionOf 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))

CL and RDF, OWL, etc Cardinality restrictions give the most trouble. (forall (r p n)(implies (and (owl:onProperty r p) (owl:minCardinality 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...)))))