Towards a Logical Reconstruction of Relational Database Theory

Size: px
Start display at page:

Download "Towards a Logical Reconstruction of Relational Database Theory"

Transcription

1 Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science Raymond Reiter Summary by C. Rey November 27, / 63

2 Foreword DB: 2 points of view Contributions Contributions 2 / 63

3 Why reading this paper? Foreword DB: 2 points of view Contributions Contributions Consolidate my database bakground Better understand the link between logic and databases Precise some basic databases notions: the closed world assumption the domain closure assumption the unique name assumption the notion of safe query the notion of incomplete information (disjunctive information and null values) Begin some theoretical database course Focus on some points that are not necessarily the main contributions of the paper formalization informal explanations 3 / 63

4 Databases: 2 points of view Foreword DB: 2 points of view Contributions Contributions DB theoretician pov = logical pov a DB is a model (now we d say "finite" model) a model of some integrity constraint a query = a formula to be evaluated wrt this model DB logicians = proof theoretic pov a DB = a sef of FO formulae a query = a formula to prove given a DB as premises integrity constraint satisfaction = consistency checking efforts on proof finding algorithms 4 / 63

5 Paper contributions Foreword DB: 2 points of view Contributions Contributions Best paradigm? model theory? proof theory? Aim of the paper: give an answer s reconciliable paradigm proof theory: a little bit more fruitful 5 / 63

6 Main contribution of the paper Foreword DB: 2 points of view Contributions Contributions Let a without null value It can be transformed into a set of FO axioms st this theory is a characterization in proof theory of query evaluation integrity constraint These theories can be generalized to incorporate more real world knowledge to characterize incomplete information to characterize different semantics for null values to define precisely the notion of an answer to a query in the context of previous points define precisely the notion of integrity constraint and the constraint satisfaction problem 6 / 63

7 FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Databases and Logic The Model Theoretic Perspective 7 / 63

8 First order languages FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems A first order language F = (A, W) A is an infinite alphabet of symbols containing : an infinite set of constants (may be empty): a, b, P aris, 34, P art 10,... an infinite set of variables: x, y, z, z 1, x 5,... an infinite set of predicates ( 1): P, Q, SUP P LIES,... Each having an arity n. no functor (no function name) ponctuation signs: (,),. logical connectors:,,,, A term is a variable or a constant of A 8 / 63

9 First order languages FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems A first order language F = (A, W) W is the set of well formed formulae, i.e. the smallest set containing: all atomic formulae, that are expressions of the form P (t 1,..., t n ) where P is a predicate name and each t i is a term 1 all expressions using one or two well formed formulae φ and ψ : φ ψ φ ψ φ ψ ψ φ ψ all expressions built using a logical quantifier among {, } and using one variable x and one well formed formulae ψ: x ψ x ψ 1 If all t i are constants, then it is called a ground atomic formula. 9 / 63

10 Relational languages FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems A FO language F = (A, W) is a relational language iff A is st: the number of constants is finite, and at least 1 the number of predicates is finite among predicates, = is the equality one among predicates, some unary ones are "simple types" which boolean combinations model the notion of the domain of a relation 10 / 63

11 Types of a relational language FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language. The set of types of R is the smallest set containing: all simple types of A all boolean combinations of types τ 1 and τ 2 : τ 1 τ 2 τ 1 τ 2 τ 1 Type-restricted quantifiers, with τ a type: x τ, φ means x, τ(x) φ x τ, φ means x, τ(x) φ 11 / 63

12 Semantics of FO languages FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Defining the semantics is classically done as follows: Defining the notion of interpretation (constant and predicate semantics) Defining the notion of assignement (variable semantics) Defining the truth value of formulae (formulae semantics) 12 / 63

13 Interpretation FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems An interpretation I of the relational language F = (A, W) is a couple ( I, I ) where : I is a non empty set called the domain (or the universe) I is the interpretation function defined as follows: for each constant c: c I I for each predicate name P of arity n: P I I n. P I is called the extension of P in I. 13 / 63

14 Assignment FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems An assignment is a mapping v from variables of A to I. x variable f A, v(x) I. It is sometimes noted {x 1 /a 1,..., x n /a n }. If x is a new variable, then v {x/c} is identical to v and in addition maps x to c. All assignments that we will use will be implicitely extended to constants as the identity function : for all constant c from A, v(c) := c. 14 / 63

15 Truth value of formula FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language, I an interpretation of R, and v an assignment. The = relation is defined as follows: 1. I = P (t 1,..., t n )[v] iff (v(t 1 ),..., v(t n )) P I, for each atomic formula P (t 1,..., t n ) in W. 2. I = (t 1 = t 2 )[v] iff v(t 1 ) = v(t 2 ) 3. I = (φ ψ)[v] iff I = φ[v] and I = ψ[v] 4. I = (φ ψ)[v] iff I = φ[v] or I = ψ[v] 5. I = ( φ)[v] iff not I = φ[v] 6. I = (φ ψ)[v] iff I = ( φ ψ)[v] 7. I = (φ ψ)[v] iff I = ((φ ψ) (ψ φ))[v] 8. I = ( x φ)[v] iff for all c I, I = φ[v {x/c}] 9. I = ( x φ)[v] iff there exists c I, I = φ[v {x/c}] 15 / 63

16 Model of one (or many) formula(e) FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language, I an interpretation of F, and v an assignment. We say: I satisfies φ knowing v iff I = φ[v] φ is false in I iff there is no assignment v for which there is I = φ[v] φ is true in I iff I = φ[v], for all assignments v. In this case, I is said to be a model of φ.we note it I = φ. I is a model of a set S of well formed formula φ iff I = φ for each φ S. 16 / 63

17 Relational interpretation FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language (recall: finite number of constants and predicates). An interpretation I is a relational interpretation for R iff: the restriction of. I to constants is bijective Equality is defined by extension: = I = {(d, d) d I } Important consequence: I is finite 17 / 63

18 Relational database FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems A relational database is a triple (R, I, IC): R is a relational language I is a relational interpretation of R IC is a set of wffs of R called integrity constraints, such that: predicate P (n) (except = and simple types), IC must contain: x 1... x n (P (x 1,..., x n ) τ 1 (x 1 )... τ n (x n )) where the τ i are types 2. 2 τ 1,..., τ n are called the domains of P 18 / 63

19 Vocabulary FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems predicate P (except types), P I is called the relation (of) P The integrity constraints IC of (R, I, IC) are satisfied iff I is a model of IC. 19 / 63

20 Example FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language. Predicates: teacher (1), course (1), student (1), teach (2), enrolled (2), = (2) Simple types: teacher (1), course (1), student (1) Constants: A, B, C, a, b, c, d, CS100, CS200, P 100, P 200 Interpretation domain I : { A, B, C, a, b, c, d, CS100, CS200, P 100, P 200 } Remark: looks like a Herbrand interpretation not presented like that: only a way to give a name to elements of the domain 20 / 63

21 Example (cont.) FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Predicates interpretation (as tables) teacher student A B C a b c d course enrolled CS100 CS200 P 100 P 200 a CS100 a P 100 b CS100 c P 100 d CS200 d P 200 teach = A CS100 A CS200 B P 100 C P 200 A A B B C C a a b b c c d d CS100 CS100 CS200 CS200 P 100 P 100 P 200 P / 63

22 Example (cont.) FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems The previous interpretation is a model of: (2.1) x y(teach(x, y) teacher(x) course(y)) (2.2) x y(enrolled(x, y) student(x) course(y)) (2.3) ( x course)( y teacher)teach(y, x) (2.4) ( x teacher)( y course)teach(x, y) s: (R, I, IC = {(2.1), (2.2), (2.3), (2.4)}) is a relational database (2.1) and (2.2) defines the domains of teach and enrolled the relational database satisfies its integrity constraints 22 / 63

23 Remarks FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Fundamental assumptions here Unique name assumption: distinctly named elements of the domain are in fact distinct. A finite domain Closed world assumption (completion axioms) These allows: extensional definition of = = (d, d ) is false for all distinct elements d and d of the domain closed world assumption for = extensional definition of other predicate (<, >,...) is also possible determining truth of a sentence reduces to purely propositional truth table evaluations. Integrity constraints studied here correspond to static integrity constraints or state laws: to be satisfied by any state of the database do not correspond to dynamic integrity constraints or transition laws 23 / 63

24 A first order query language FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let R = (A, W) be a relational language. A query for R is any expression of the form: ( n ) {x 1,..., x n τ i (x i ) W (x 1,..., x n )} where: i=1 x i s are variables of A τ i s are types composed of simple types of A W (x 1,..., x n ) W the only free variables of W (x 1,..., x n ) are in {x 1,..., x n } all quantifiers are type restricted 24 / 63

25 Answer to a query FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Let DB = (R, I, IC) a relational database. A query for R is applicable to DB. Let DB = (R = (A, W), I, IC) a relational database. Let Q be the following query {x 1,..., x n ( n i=1 τ i(x i )) W (x 1,..., x n )} applicable to DB. Then: A tuple (c 1,..., c n ) A n is an answer to Q wrt DB def inition I is a model of ( n i=1 τ i(x i )) W (x 1,..., x n ) 25 / 63

26 Example FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Queries applicable to previous database: Who teaches P100? {x teacher(x) teach(x, P 100)} Who are all of A s students? {x student(x) (( y course)teach(a, y) enrolled(x, y))} What courses does a take and who teaches them? {(x, y) course(x) teacher(y) (enrolled(a, x) teach(y, x))} Who teaches all of the students? {x teacher(x) (( y student)( z course) teach(x, z) enrolled(y, z))} Queries not applicable (meaningless) {x teacher(x) teach(x, M AT H100)} {x supplier(x) (( y part)supplies(x, y))} 26 / 63

27 No need for safety FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems In (domain) relational calculus, the domain of a relation: is the totality of all individuals of a certain kind may be finite or infinite (thus the whole domain may be infinite as well) Thus unrestricted complement of a (finite) relation may be infinite need for the notion of safe queries But, with a finite domain: this (infinite) totality is not clear: never explicitly represented in databases it may be more natural that queries are about things the DB knows about no need for safety Comments (C. Rey): same consideration: active domain semantics domain independent queries (and many syntactical conditions on queries) constraint databases to handle in a finite way infinite relations 27 / 63

28 Problems with model theoretic approach FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Databases with incomplete information Disjunctive information manage many interpretations Represent a fact such as: a is enrolled in CS100 or in P 100 Split interpretation into 3: one in which it is CS100, one for P 100 and one for both Constants are answers if answers in all 3 interpretations Null values (as values at present not known) values not known but to be taken in a finite set of known values amounts to previous case of disjunctive information values not known but to be taken in a infinite set of not always known values inserting "null" in relations defining a third truth value "unknown" not clear how to extend the relational model... other kinds of null values / 63

29 Problems (cont.) FO languages Relational languages Types Semantics Interpretation Assignment Truth value Model Relational interpret Vocabulary Remarks FO query language No safety Problems Extending the relational model to incorporate more real world knowledge To express general facts about the world: "All men are mortal". To manage events (sequencing, times ofoccurences) Generalization hierarchies with property inheritance Some knowledge can be represented within integrity constraints (such as transitivity of a relation), but many other can t. What about in the context of proof theory? 29 / 63

30 Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Databases and Logic The Proof Theoretic Perspective 30 / 63

31 Purpose of this section Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction model theory proof theory define relational theories (class of FO theories) equivalence between relational theories and interpretations define a relational database as (R, T, IC) where T is a relational theory truth in relational interpretations provability in relational theories Comment (C. Rey): proof theory all assumptions are made explicit in axioms 31 / 63

32 From interpretation to theory Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let DB = (R = (A, W), I, IC) a relational database: all domain elements are named using constants predicates interpretation as ground atomic formulae {teacher(a), teacher(b), teacher(c),..., enrolled(d, P 100),..., = (P 200, P 200)} Main idea : consider the previous set of ground atomic formulae as a FO theory T add to this theory other sentences to express all aspects of a relational database 32 / 63

33 From interpretation to theory Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Various formulae true in I can be proven with T as premises: T enrolled(c, P 100) T enrolled(a, P 100) teach(b, P 100) T ( y course)teach(a, y) enrolled(a, y) Formulae that are not provable: x(teacher(x) course(x) student(x)) because T does not say that A, B,..., P 100, P 200 are the only domain elements domain closure axiom = (A, B), = (A, C),... unique name axioms teacher(a) completion axioms More over ground formulae for equality can be simplify equality axioms: reflexivity, commutativity, transitivity, substitution axioms 33 / 63

34 Domain closure axiom Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let I be a relational interpretation with a finite domain I = {c 1,..., c n }. The domain closure axiom for I is: x(= (x, c 1 )... = (x, c n )) 34 / 63

35 Unique name axioms Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let I be a relational interpretation with a finite domain I = {c 1,..., c n }. The unique name axioms for I are: pair of constants c i and c j such that c i and c j are syntactically different, there is: = (c i, c j ) 35 / 63

36 Completion axioms Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let I be a relational interpretation with a finite domain I = {c 1,..., c n }. Let Δ W be the set of ground atomic formulae (not containing equality atoms) that are true in I. For each predicate P (m) (different from =), we define C P = { c P ( c) Δ} Either C P = {(c 1 1,..., c 1 m),..., (c r 1,..., c r m)} Then the completion axiom for P is: x 1,..., x m (P (x 1,..., x m )) r j=1 ( m i=1 Either C P = Then the completion axiom for P is: x 1,..., x m ( P (x 1,..., x m )) = (x i, c j i ) ) 36 / 63

37 Equality axioms Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let I be a relational interpretation with a finite domain I = {c 1,..., c n }. Reflexivity: x = (x, x) Commutativity: x y(= (x, y) = (y, x)) Transitivity: x y z((= (x, y) = (y, z)) = (x, z)) Substitution: for each predicate P (m) x 1,..., x m, y 1,..., y m (P (x 1,..., x m ) ( m i=1 = (x i, y i ))) P (y 1,..., y m ) 37 / 63

38 Example Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction The previous example implies the theory T : Ground atomic formulae (except equality atoms): teacher(a), teacher(b), teacher(c),..., enrolled(d, P 100) Domain closure axiom: x(= (x, A) = (x, B)... = (x, P 200)) Unique name axioms: = (A, B), = (A, C), = (A, a),... Equality axioms Completion axiom for each predicate: x(teacher(x) (= (x, A) = (x, B) = (x, C))) x y(enrolled(x, y) ((= (x, a) = (y, CS100))... (= (x, d) = (y, P 200))) / 63

39 Relational theory Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let R = (A, W) be a relational language. A first order theory T W is a relational theory of R iff it satisfies the following properties: 1. If c 1,..., c n are all the constants of A then T contains: the domain closure axiom the unique name axioms 2. T contains all equality axioms 3. There is a set Δ W of ground atomic formulae (not containing equality atoms) such that Δ T. Moreover T contains the completion axioms built from Δ. 4. The only wffs of T are those that follow previous conditions 1., 2. and / 63

40 Equivalence theories interpretations Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Theorem Suppose R = (A, W) is a relational language. Then: 1. If T is a relational theory of R, then T has a unique model I which is a relational interpretation for R. 2. If I is a relational interpretation for R, then there is a relational theory T of R such that I is the only model of T. 40 / 63

41 Equivalence truth provability Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Corollary Suppose R = (A, W) is a relational language, T is a relational theory of R and I is a model of T. Then, for any wff ϕ of R: ϕ is true in I T ϕ Proof Since I must be a unique model of T, and the completeness theorem fo FOL. 41 / 63

42 Relational database Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction A relational database is a triple (R, T, IC): R is a relational language T is a relational theory of R IC is a set of wffs of R called integrity constraints such that: predicate P (n) (except = and simple types), IC must contain: x 1... x n (P (x 1,..., x n ) τ 1 (x 1 )... τ n (x n )) where the τ i are types 3. 3 τ 1,..., τ n are called the domains of P 42 / 63

43 Satisfaction of integrity constraints Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let (R, T, IC) be a relational database. The integrity constraint IC are said to be satisfied iff: ϕ IC, T ϕ 43 / 63

44 Answer to a query Purpose Intuition Intuition Domain closure axiom Unique name axioms Completion axioms Equality axioms Relational theory Equivalence IC satisfaction Let DB = (R = (A, W), T, IC) a relational database. Let Q be the following query {x 1,..., x n ( n i=1 τ i(x i )) W (x 1,..., x n )} applicable to DB. Then: A tuple (c 1,..., c n ) A n is an answer to Q wrt DB def inition 1. T τ i (c i ), i {1,..., n} and 2. T W (c 1,..., c n ) 44 / 63

45 Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Generalizing the proof theoretic perspective DB that contain incomplete information 45 / 63

46 Adding disjunctive information Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Problem: represent disjunctive facts of the form "P is the case or Q is, or... but I don t know which" Example: Ground atomic formulae as tables: part p 1 p 2 p 3 supplies supplier Acme F oo p 3 Acme p 1 F oo p 2 subpart p1 p 2 46 / 63

47 Adding disjunctive information: problem Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Other axioms: Domain closure axiom: x(= (x, p 1 ) = (x, p 2 ) = (x, p 3 ) = (x, Acme) = (x, F oo)) Unique name axioms: = (p 1, p 2 ), = (p 1, p 3 ),... Equality axioms: as usual Completion axioms: 1. x(part(x) (= (x, p 1 ) = (x, p 2 ) = (x, p 3 ))) 2. x(supplier(x) (= (x, Acme) = (x, F oo)) 3. x y(supplies(x, y) ((= (x, Acme) = (y, p 1 )) (= (x, F oo) = (y, p 2 ))) 4. x y(subpart(x, y) (= (x, p 1 ) = (y, p 2 ))) Problem: cannot add supplies(f oo, p 1 ) supplies(f oo, p 3 ) since the (completion) axioms prove supplies(f oo, p 1 ) supplies(f oo, p 3 ) 47 / 63

48 Adding disjunctive information: solution Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Replace completion axioms by: 3. x y(supplies(x, y) ((= (x, Acme) = (y, p 1 )) (= (x, F oo) = (y, p 2 )) (= (x, F oo) = (y, p 1 )) (= (x, F oo) = (y, p 3 ))) 48 / 63

49 Generalized completion axioms Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Let R = (A, W) be a relational language. A wff of W is a positive ground clause iff it has the form A 1... A m where each A i a ground nonequality atomic formula. Let Δ W be a set of clauses of R. For each predicate P (m) (different from =), we define C P = { c A 1... A m Δ, i {1,..., m} A i is P ( c)} Either C P = {(c 1 1,..., c 1 m),..., (c r 1,..., c r m)} Then the completion axiom for P is: x 1,..., x m (P (x 1,..., x m )) r j=1 ( m i=1 Either C P = Then the completion axiom for P is: x 1,..., x m ( P (x 1,..., x m )) = (x i, c j i ) ) 49 / 63

50 Generalized relational theory Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Let R = (A, W) be a relational language. A first order theory T W is a generalized relational theory of R iff it satisfies the following properties: 1. as a relational theory 2. as a relational theory 3. There is a set Δ W of clauses such that Δ T. Moreover T contains the generalized completion axioms built from Δ. 4. as a relational theory 50 / 63

51 Generalized relational database Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability A generalized relational database is a triple (R, T, IC): R is a relational language T is a generalized relational theory of R IC is a set of wffs of R called integrity constraints Satisfaction of integrity constraint and answer to a query are defined as before. Theorem Every generalized relational theory is consistent. 51 / 63

52 Adding null values Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Problem: represent following null values "value at present unknown, and not necessary one of some finite set of known possible values" : represent "Some supplier supplies part p 3, but I don t know who it is. Moreover this supplier may or may not be one the known supplier Acme or F oo." Solution: x(supplier(x) supplies(x, p 3 )) or supplier(ω) supplies(ω, p 3 ) with a skolem constant ω How to integrate such new constants? 52 / 63

53 Adding null values Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Unique name axioms: ω may denote the same individual as another constant. So no need for unique name axioms for ω. Domain closure axiom: x(= (x, p 1 ) = (x, p 2 ) = (x, p 3 ) = (x, Acme) = (x, F oo) = (x, ω)) Completion axioms: 1. x(supplier(x) (= (x, Acme) = (x, F oo) = (x, ω)) 2. x y(supplies(x, y) ((= (x, Acme) = (y, p 1 )) (= (x, F oo) = (y, p 2 )) (= (x, ω) = (y, p 3 ))) 53 / 63

54 Adding null values Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Modify the theory: add skolem constants modify the domain closure axiom modify the completion axioms maybe add some inequalities axioms (between skolem constants and constants or other skolem constants) DO NOT change unique name axioms 54 / 63

55 Generalized rel theory with null values Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability As before: precise definition of all axioms definition of a generalized relational database with null values definition of satisfaction of integrity constraint and of an answer to a query remains the same consistency of every generalized relational database with null values Any generalized relational theory with null values is decidable (because of the finite domain). 55 / 63

56 Decidability Disjunctive information Disj info problem Disj info solution Galz completion axioms Gald relational theory Gald relational database Adding null values Gd rel th with nv Decidability Any generalized relational theory with null values is decidable (because of the finite domain). Testing the truth: in all possible model very expensive by a theorem proving approach better by a generalization of relational algebra still better but possible? 56 / 63

57 Purpose Discussion CWA Generalizing the proof theoretic perspective Conceptual modelling 57 / 63

58 Purpose of incorporating more knowledge Purpose Discussion CWA the relational model: enable to express many real world knowledge events hierarchies and properties inheritance aggregations many existing extensions but: not clear semantics difficult to compare logic can be a solution (propositions are made to adapt relational theories) 58 / 63

59 Discussion Purpose Discussion CWA General principle to add more knowledge: new FO formulae are added as integrity constraints other existing axioms must stay in the theory (to ensure inference) General properties there must be: a domain closure axiom unique name axioms (unnecessary for null values) represent the closed world assumption 59 / 63

60 Closed world assumption Purpose Discussion CWA This is a characterization of negation in database. This is an inference rule: R( c) T R( c) Problems: it treats null values incorrectly with disjunctive information, it leads to inconsistency is it not FO definable (it is a meta notion) In relational theories: completions axioms express the CWA. What about more general setting? 60 / 63

61 Benefits 61 / 63

62 (Model and) proof theoretic approache(s) Benefits based on a semantics: precise concepts have precise definition unique name assumption domain closure assumption closed world assumption null values disjunctive information answer of a query integrity constraints allow conceptual uniformity representational (all in the same FO language) queries integrity constraint facts operational (all solved by proof theory) query evaluation satisfaction of constraints 62 / 63

63 (Model and) proof theoretic approache(s) Benefits have practical advantages (for conceptual modelling) non logical models are given aa precise semantics different data models can be compared nonproof theoretic query evaluation algorithms can be proved correct wrt logical semantics of queries integrity constraints maintenance algorithms can be proved correct wrt the proof theoretic definition of constraint satisfaction 63 / 63

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

More information

Lecture 1: Conjunctive Queries

Lecture 1: Conjunctive Queries CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote

More information

Propositional Logic. Part I

Propositional Logic. Part I Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

Safe Stratified Datalog With Integer Order Does not Have Syntax

Safe Stratified Datalog With Integer Order Does not Have Syntax Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer

More information

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Chapter 2 & 3: Representations & Reasoning Systems (2.2) Chapter 2 & 3: A Representation & Reasoning System & Using Definite Knowledge Representations & Reasoning Systems (RRS) (2.2) Simplifying Assumptions of the Initial RRS (2.3) Datalog (2.4) Semantics (2.5)

More information

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,, CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

A Retrospective on Datalog 1.0

A Retrospective on Datalog 1.0 A Retrospective on Datalog 1.0 Phokion G. Kolaitis UC Santa Cruz and IBM Research - Almaden Datalog 2.0 Vienna, September 2012 2 / 79 A Brief History of Datalog In the beginning of time, there was E.F.

More information

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic 3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule

More information

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

STABILITY AND PARADOX IN ALGORITHMIC LOGIC STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between

More information

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems DATABASE THEORY Lecture 11: Introduction to Datalog Markus Krötzsch Knowledge-Based Systems TU Dresden, 12th June 2018 Announcement All lectures and the exercise on 19 June 2018 will be in room APB 1004

More information

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1 1. Statement of the Problem, Outline of the Solution to Come (1) The Key Problem There is much to recommend an algebraic

More information

Constraint Solving. Systems and Internet Infrastructure Security

Constraint Solving. Systems and Internet Infrastructure Security Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Constraint Solving Systems

More information

CSC 501 Semantics of Programming Languages

CSC 501 Semantics of Programming Languages CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this

More information

15-819M: Data, Code, Decisions

15-819M: Data, Code, Decisions 15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1

More information

Foundations of Schema Mapping Management

Foundations of Schema Mapping Management Foundations of Schema Mapping Management Marcelo Arenas Jorge Pérez Juan Reutter Cristian Riveros PUC Chile PUC Chile University of Edinburgh Oxford University marenas@ing.puc.cl jperez@ing.puc.cl juan.reutter@ed.ac.uk

More information

INCONSISTENT DATABASES

INCONSISTENT DATABASES INCONSISTENT DATABASES Leopoldo Bertossi Carleton University, http://www.scs.carleton.ca/ bertossi SYNONYMS None DEFINITION An inconsistent database is a database instance that does not satisfy those integrity

More information

The Relational Model

The Relational Model The Relational Model David Toman School of Computer Science University of Waterloo Introduction to Databases CS348 David Toman (University of Waterloo) The Relational Model 1 / 28 The Relational Model

More information

Review Material: First Order Logic (FOL)

Review Material: First Order Logic (FOL) Information Integration on the WEB with RDF, OWL and SPARQL Review Material: First Order Logic (FOL) Grant Weddell October 7, 2013 Syntax of FOL Signatures Vocabularies are called signatures in FOL. The

More information

DATABASE THEORY. Lecture 18: Dependencies. TU Dresden, 3rd July Markus Krötzsch Knowledge-Based Systems

DATABASE THEORY. Lecture 18: Dependencies. TU Dresden, 3rd July Markus Krötzsch Knowledge-Based Systems DATABASE THEORY Lecture 18: Dependencies Markus Krötzsch Knowledge-Based Systems TU Dresden, 3rd July 2018 Review: Databases and their schemas Lines: Line Type 85 bus 3 tram F1 ferry...... Stops: SID Stop

More information

Situation Calculus and YAGI

Situation Calculus and YAGI Situation Calculus and YAGI Institute for Software Technology 1 Progression another solution to the projection problem does a sentence hold for a future situation used for automated reasoning and planning

More information

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions

More information

Lecture 4: January 12, 2015

Lecture 4: January 12, 2015 32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected

More information

CS 512, Spring 2017: Take-Home End-of-Term Examination

CS 512, Spring 2017: Take-Home End-of-Term Examination CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing

More information

Logical reconstruction of RDF and ontology languages

Logical reconstruction of RDF and ontology languages Logical reconstruction of RDF and ontology languages Jos de Bruijn 1, Enrico Franconi 2, and Sergio Tessaris 2 1 Digital Enterprise Research Institute, University of Innsbruck, Austria jos.debruijn@deri.org

More information

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and Chapter 6 The Relational Algebra and Relational Calculus Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Outline Unary Relational Operations: SELECT and PROJECT Relational

More information

Ontology and Database Systems: Foundations of Database Systems

Ontology and Database Systems: Foundations of Database Systems Ontology and Database Systems: Foundations of Database Systems Werner Nutt Faculty of Computer Science Master of Science in Computer Science A.Y. 2014/2015 Incomplete Information Schema Person(fname, surname,

More information

Automata Theory for Reasoning about Actions

Automata Theory for Reasoning about Actions Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show

More information

EXTENSIONS OF FIRST ORDER LOGIC

EXTENSIONS OF FIRST ORDER LOGIC EXTENSIONS OF FIRST ORDER LOGIC Maria Manzano University of Barcelona CAMBRIDGE UNIVERSITY PRESS Table of contents PREFACE xv CHAPTER I: STANDARD SECOND ORDER LOGIC. 1 1.- Introduction. 1 1.1. General

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Uncertain Data Models

Uncertain Data Models Uncertain Data Models Christoph Koch EPFL Dan Olteanu University of Oxford SYNOMYMS data models for incomplete information, probabilistic data models, representation systems DEFINITION An uncertain data

More information

The Inverse of a Schema Mapping

The Inverse of a Schema Mapping The Inverse of a Schema Mapping Jorge Pérez Department of Computer Science, Universidad de Chile Blanco Encalada 2120, Santiago, Chile jperez@dcc.uchile.cl Abstract The inversion of schema mappings has

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

"Relations for Relationships"

Relations for Relationships M359 An explanation from Hugh Darwen "Relations for Relationships" This note might help those who have struggled with M359's so-called "relation for relationship" method of representing, in a relational

More information

Typed First-order Logic

Typed First-order Logic 22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 Typed First-order Logic Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally developed by Reiner Hähnle

More information

Resolution (14A) Young W. Lim 6/14/14

Resolution (14A) Young W. Lim 6/14/14 Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free

More information

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:

More information

Detecting Logical Errors in SQL Queries

Detecting Logical Errors in SQL Queries Detecting Logical Errors in SQL Queries Stefan Brass Christian Goldberg Martin-Luther-Universität Halle-Wittenberg, Institut für Informatik, Von-Seckendorff-Platz 1, D-06099 Halle (Saale), Germany (brass

More information

Chapter 3: Propositional Languages

Chapter 3: Propositional Languages Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical

More information

CMPS 277 Principles of Database Systems. Lecture #4

CMPS 277 Principles of Database Systems.  Lecture #4 CMPS 277 Principles of Database Systems http://www.soe.classes.edu/cmps277/winter10 Lecture #4 1 First-Order Logic Question: What is First-Order Logic? Answer: Informally, First-Order Logic = Propositional

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions , Semantics and Pragmatics of NLP, and s Alex Ewan School of Informatics University of Edinburgh 10 January 2008 , 1 2 3 4 Why Bother?, Aim: 1 To associate NL expressions with semantic representations;

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

2.1 Sets 2.2 Set Operations

2.1 Sets 2.2 Set Operations CSC2510 Theoretical Foundations of Computer Science 2.1 Sets 2.2 Set Operations Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero or more

More information

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

Declarative Programming. 2: theoretical backgrounds

Declarative Programming. 2: theoretical backgrounds Declarative Programming 2: theoretical backgrounds 1 Logic Systems: structure and meta-theoretical properties logic system syntax semantics proof theory defines which sentences are legal in the logical

More information

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

More information

From Types to Sets in Isabelle/HOL

From Types to Sets in Isabelle/HOL From Types to Sets in Isabelle/HOL Extented Abstract Ondřej Kunčar 1 and Andrei Popescu 1,2 1 Fakultät für Informatik, Technische Universität München, Germany 2 Institute of Mathematics Simion Stoilow

More information

Software Engineering Lecture Notes

Software Engineering Lecture Notes Software Engineering Lecture Notes Paul C. Attie August 30, 2013 c Paul C. Attie. All rights reserved. 2 Contents I Hoare Logic 11 1 Propositional Logic 13 1.1 Introduction and Overview..............................

More information

Knowledge Representation

Knowledge Representation Knowledge Representation References Rich and Knight, Artificial Intelligence, 2nd ed. McGraw-Hill, 1991 Russell and Norvig, Artificial Intelligence: A modern approach, 2nd ed. Prentice Hall, 2003 Outline

More information

Schema Mappings and Data Exchange

Schema Mappings and Data Exchange Schema Mappings and Data Exchange Lecture #2 EASSLC 2012 Southwest University August 2012 1 The Relational Data Model (E.F. Codd 1970) The Relational Data Model uses the mathematical concept of a relation

More information

First-Order Logic PREDICATE LOGIC. Syntax. Terms

First-Order Logic PREDICATE LOGIC. Syntax. Terms First-Order Logic PREDICATE LOGIC Aim of this lecture: to introduce first-order predicate logic. More expressive than propositional logic. Consider the following argument: all monitors are ready; X12 is

More information

RESULTS ON TRANSLATING DEFAULTS TO CIRCUMSCRIPTION. Tomasz Imielinski. Computer Science Department Rutgers University New Brunswick, N.

RESULTS ON TRANSLATING DEFAULTS TO CIRCUMSCRIPTION. Tomasz Imielinski. Computer Science Department Rutgers University New Brunswick, N. RESULTS ON TRANSLATING DEFAULTS TO CIRCUMSCRIPTION Tomasz Imielinski Computer Science Department Rutgers University New Brunswick, N.J 08905 ABSTRACT In this paper we define different concepts, of translating

More information

Typed Lambda Calculus

Typed Lambda Calculus Department of Linguistics Ohio State University Sept. 8, 2016 The Two Sides of A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a system of notation for functions

More information

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #3

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #3 CMPS 277 Principles of Database Systems https://courses.soe.ucsc.edu/courses/cmps277/fall11/01 Lecture #3 1 Summary of Lectures #1 and #2 Codd s Relational Model based on the concept of a relation (table)

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

Computer Science Technical Report

Computer Science Technical Report Computer Science Technical Report Feasibility of Stepwise Addition of Multitolerance to High Atomicity Programs Ali Ebnenasir and Sandeep S. Kulkarni Michigan Technological University Computer Science

More information

Inconsistency-tolerant logics

Inconsistency-tolerant logics Inconsistency-tolerant logics CS 157 Computational Logic Autumn 2010 Inconsistent logical theories T 1 = { p(a), p(a) } T 2 = { x(p(x) q(x)), p(a), q(a) } Definition: A theory T is inconsistent if T has

More information

A fuzzy subset of a set A is any mapping f : A [0, 1], where [0, 1] is the real unit closed interval. the degree of membership of x to f

A fuzzy subset of a set A is any mapping f : A [0, 1], where [0, 1] is the real unit closed interval. the degree of membership of x to f Algebraic Theory of Automata and Logic Workshop Szeged, Hungary October 1, 2006 Fuzzy Sets The original Zadeh s definition of a fuzzy set is: A fuzzy subset of a set A is any mapping f : A [0, 1], where

More information

Relative Information Completeness

Relative Information Completeness Relative Information Completeness Abstract Wenfei Fan University of Edinburgh & Bell Labs wenfei@inf.ed.ac.uk The paper investigates the question of whether a partially closed database has complete information

More information

Declarative programming. Logic programming is a declarative style of programming.

Declarative programming. Logic programming is a declarative style of programming. Declarative programming Logic programming is a declarative style of programming. Declarative programming Logic programming is a declarative style of programming. The programmer says what they want to compute,

More information

Recap Datalog Datalog Syntax Datalog Semantics. Logic: Datalog. CPSC 322 Logic 6. Textbook Logic: Datalog CPSC 322 Logic 6, Slide 1

Recap Datalog Datalog Syntax Datalog Semantics. Logic: Datalog. CPSC 322 Logic 6. Textbook Logic: Datalog CPSC 322 Logic 6, Slide 1 Logic: Datalog CPSC 322 Logic 6 Textbook 12.2 Logic: Datalog CPSC 322 Logic 6, Slide 1 Lecture Overview 1 Recap 2 Datalog 3 Datalog Syntax 4 Datalog Semantics Logic: Datalog CPSC 322 Logic 6, Slide 2 Top-down

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p. CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections 10.1-10.3 p. 1/106 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

An Annotated Language

An Annotated Language Hoare Logic An Annotated Language State and Semantics Expressions are interpreted as functions from states to the corresponding domain of interpretation Operators have the obvious interpretation Free of

More information

Binary Decision Diagrams

Binary Decision Diagrams Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table

More information

Axiomatic Specification. Al-Said, Apcar, Jerejian

Axiomatic Specification. Al-Said, Apcar, Jerejian Axiomatic Specification Al-Said, Apcar, Jerejian 1 Axioms: Wffs that can be written down without any reference to any other Wffs. Wffs that are stipulated as unproved premises for the proof of other wffs

More information

SOFTWARE ENGINEERING DESIGN I

SOFTWARE ENGINEERING DESIGN I 2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique

More information

Notes on Default Reasoning

Notes on Default Reasoning Notes on Default Reasoning Stuart C. Shapiro November 30, 2004 1 Introduction These notes comment on, and are, in part, derived from Brachman & Levesque, Knowledge Representation and Reasoning, Chapter

More information

T h e incomplete database

T h e incomplete database T h e incomplete database Karen L. Kwast University of Amsterdam Departments of Mathematics and Computer Science, Plantage Muidergracht 24, 1018 TV, Amsterdam Abstract The introduction of nulls (unknown

More information

Principles of Knowledge Representation and Reasoning

Principles of Knowledge Representation and Reasoning Principles of Knowledge Representation and Reasoning Nonmonotonic Reasoning Bernhard Nebel, Stefan Wölfl, and Felix Lindner December 14 & 16, 2015 1 Motivation Different forms of reasoning Different formalizations

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

Th(N, +) is decidable

Th(N, +) is decidable Theorem 6.12 Th(N, +) is decidable Presented by: Brian Lee Two Domains 1. We can give an algorithm to decide truth 2. A problem is undecidable First Order Logic Also known as First order predicate calculus

More information

Topic Maps Reference Model, version 6.0

Topic Maps Reference Model, version 6.0 Topic Maps Reference Model, 13250-5 version 6.0 Patrick Durusau Steven R. Newcomb July 13, 2005 This is a working draft of the Topic Maps Reference Model. It focuses on the integration of Robert Barta

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

Semantic Errors in Database Queries

Semantic Errors in Database Queries Semantic Errors in Database Queries 1 Semantic Errors in Database Queries Stefan Brass TU Clausthal, Germany From April: University of Halle, Germany Semantic Errors in Database Queries 2 Classification

More information

Logic Programming and Reasoning about Actions

Logic Programming and Reasoning about Actions Chapter 4 Logic Programming and Reasoning about Actions [Chitta Baral & Michael Gelfond] In this chapter we discuss how recent advances in logic programming can be used to represent and reason about actions

More information

Alphabets, strings and formal. An introduction to information representation

Alphabets, strings and formal. An introduction to information representation Alphabets, strings and formal languages An introduction to information representation 1 Symbols Definition: A symbol is an object endowed with a denotation (i.e. literal meaning) Examples: Variables are

More information

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N Mathematical Preliminaries Read pages 529-540 1. Set Theory 1.1 What is a set? A set is a collection of entities of any kind. It can be finite or infinite. A = {a, b, c} N = {1, 2, 3, } An entity is an

More information

COMP718: Ontologies and Knowledge Bases

COMP718: Ontologies and Knowledge Bases 1/35 COMP718: Ontologies and Knowledge Bases Lecture 9: Ontology/Conceptual Model based Data Access Maria Keet email: keet@ukzn.ac.za home: http://www.meteck.org School of Mathematics, Statistics, and

More information

Negations in Refinement Type Systems

Negations in Refinement Type Systems Negations in Refinement Type Systems T. Tsukada (U. Tokyo) 14th March 2016 Shonan, JAPAN This Talk About refinement intersection type systems that refute judgements of other type systems. Background Refinement

More information

Lecture 5. Logic I. Statement Logic

Lecture 5. Logic I. Statement Logic Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.

More information

Semantic Forcing in Disjunctive Logic Programs

Semantic Forcing in Disjunctive Logic Programs Semantic Forcing in Disjunctive Logic Programs Marina De Vos and Dirk Vermeir Dept of Computer Science Free University of Brussels, VUB Pleinlaan 2, Brussels 1050, Belgium Abstract We propose a semantics

More information

Typed Lambda Calculus for Syntacticians

Typed Lambda Calculus for Syntacticians Department of Linguistics Ohio State University January 12, 2012 The Two Sides of Typed Lambda Calculus A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a

More information

Logic and its Applications

Logic and its Applications Logic and its Applications Edmund Burke and Eric Foxley PRENTICE HALL London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Contents Preface xiii Propositional logic 1 1.1 Informal introduction

More information

Data Integration: Logic Query Languages

Data Integration: Logic Query Languages Data Integration: Logic Query Languages Jan Chomicki University at Buffalo Datalog Datalog A logic language Datalog programs consist of logical facts and rules Datalog is a subset of Prolog (no data structures)

More information

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55. 1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)

More information

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions. THREE LECTURES ON BASIC TOPOLOGY PHILIP FOTH 1. Basic notions. Let X be a set. To make a topological space out of X, one must specify a collection T of subsets of X, which are said to be open subsets of

More information

Foundations of Databases

Foundations of Databases Foundations of Databases Relational Query Languages with Negation Free University of Bozen Bolzano, 2009 Werner Nutt (Slides adapted from Thomas Eiter and Leonid Libkin) Foundations of Databases 1 Queries

More information

So many Logics, so little time

So many Logics, so little time So many Logics, so little time One classical way to organize them is by tractability vs. expressivity. Description Logics (DLs) are basically subsets of FO logic, located in a 'sweet spot' which provides

More information

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman. The three faces of homotopy type theory Type theory and category theory Michael Shulman 1 A programming language. 2 A foundation for mathematics based on homotopy theory. 3 A calculus for (, 1)-category

More information

Integrity Constraints For Access Control Models

Integrity Constraints For Access Control Models 1 / 19 Integrity Constraints For Access Control Models Romuald THION, Stéphane COULONDRE November 27 2008 2 / 19 Outline 1 Introduction 2 3 4 5 3 / 19 Problem statement From Role-BAC to time (Generalized-Temporal-RBAC,

More information

Database Theory VU , SS Codd s Theorem. Reinhard Pichler

Database Theory VU , SS Codd s Theorem. Reinhard Pichler Database Theory Database Theory VU 181.140, SS 2011 3. Codd s Theorem Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 29 March, 2011 Pichler 29 March,

More information

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré Hoare Logic COMP2600 Formal Methods for Software Engineering Rajeev Goré Australian National University Semester 2, 2016 (Slides courtesy of Ranald Clouston) COMP 2600 Hoare Logic 1 Australian Capital

More information

Automated Reasoning. Natural Deduction in First-Order Logic

Automated Reasoning. Natural Deduction in First-Order Logic Automated Reasoning Natural Deduction in First-Order Logic Jacques Fleuriot Automated Reasoning Lecture 4, page 1 Problem Consider the following problem: Every person has a heart. George Bush is a person.

More information

Semantic data integration in P2P systems

Semantic data integration in P2P systems Semantic data integration in P2P systems D. Calvanese, E. Damaggio, G. De Giacomo, M. Lenzerini, R. Rosati Dipartimento di Informatica e Sistemistica Antonio Ruberti Università di Roma La Sapienza International

More information