Extending the Well-Founded and Valid Semantics for Aggregation. Computer Sciences Department. University of Wisconsin Madison. Raghu Ramakrishnan

Size: px
Start display at page:

Download "Extending the Well-Founded and Valid Semantics for Aggregation. Computer Sciences Department. University of Wisconsin Madison. Raghu Ramakrishnan"

Transcription

1 Extending the Well-Founded and Valid Semantics for Aggregation S. Sudarshan y Rm. 2A-212, AT&T Bell Labs. 600 Mountain Ave. Murray Hill, NJ sudarsha@research.att.com tel: (908) fax: (908) Raghu Ramakrishnan Computer Sciences Department University of Wisconsin Madison Madison, WI raghu@cs.wisc.edu Divesh Srivastava Computer Sciences Department University of Wisconsin Madison Madison, WI divesh@cs.wisc.edu Abstract We present a very general technique for dening semantics for programs that use aggregation. We use the technique to extend the well-founded semantics and the valid semantics, both of which were designed to provide semantics for programs with negation, to handle programs that contain possibly recursive use of aggregation. The generalization is based on a simple but powerful idea of aggregation on three-valued multisets. The use of three-valued multisets makes our extended well-founded semantics, which we call aggregate-well-founded semantics, more intuitive than the extension of well-founded models by Van Gelder [Van92]. Our semantics and Van Gelder's semantics agree on many programs, and on others our semantics provides results that Van Gelder says are intuitive and desirable, but that his semantics does not provide. The extended valid semantics, which we call the aggregate-valid semantics, generalizes the intuition behind several semantics presented earlier for aggregation; for instance, our semantics properly subsumes the semantics dened by Ganguly et al. [GGZ91] for cost-monotonic programs. Keywords: deductive databases, logical extensions, proof theory, non-stratied aggregation The work of Raghu Ramakrishnan and Divesh Srivastava was supported by a David and Lucile Packard Foundation Fellowship in Science and Engineering, a Presidential Young Investigator Award with matching grants from DEC, Tandem and Xerox, and NSF grant IRI The rst author, on behalf of all those alphabetic-order challenged, led a successful crusade to have the names in reverse alphabetical order. The order does not reect on the degree of contribution by the various authors. Extensions planned for the future include height and weight ordering of authors. y All communication may be addressed to the rst author. 0

2 1 Introduction In recent years there has been much interest in dening semantics for deductive databases/logic programs that use negation, aggregation and set-grouping. We call such programs extended logic programs. It is well-known that in the presence of negation, aggregation or set-grouping there is no acceptable unique model semantics based purely on logical implication, and so the meaning of a program is dened either as the result of some `normal form' computation, or as the set of facts in some `intended' model. Early approaches restricted the class of programs to those that are stratied in some fashion [ABW88, Prz88, Ros90, PP88]. More recent approaches, such as the well-founded semantics [VRS91], the three-valued stable model semantics [Prz90] and the valid semantics [BRSS92a] dene semantics for all logic programs with negation and set-grouping. Recently, there have been several proposals to extend the semantics to take into account special properties of aggregate operations [GGZ91, RS92, Van92]. Beeri et al. [BRSS92b] note that the valid semantics can be extended to take into account special properties of some aggregate operations such as min and max. We present a motivating example in Section 1.1, that illustrates the drawbacks of current semantics for nonstratied aggregation. In this paper, we consider how the well-founded semantics and the valid semantics can be extended in a clean fashion to better handle aggregation. The contributions of the paper are as follows. Aggregate-Valid Semantics: This paper denes the aggregate-valid semantics, an extension of the valid semantics to take into account the semantics of aggregate operations. As with the valid semantics, the approach in this paper is based on a `normal form' computation, and is split into two main parts. The rst part denes when a fact `follows from' a rule and a three-valued interpretation (Section 3.3). The denition of `follows from' presented in the paper generalizes that presented in [BRSS92a]. The second part denes when a fact can be assumed false based on default rules, and when a derivation is considered aggregate-valid. An aggregate-valid computation is one where every derivation is aggregate-valid. A complete aggregate-valid computation (i.e., one that cannot be extended to derive new facts) denes the semantics of programs (Section 4). This part of the denition is the same as in [BRSS92a], except for being based on the extended denition of `follows from'. An important part of the extended denition of `follows from' is the novel notion of three-valued multisets and aggregate operations on them. Three-valued sets extend two-valued sets by allowing the membership status of some elements to be undened. Three-valued multisets extend two-valued multisets by allowing true and undened elements to have multiplicities. Since we use three-valued interpretations in dening well-founded and valid semantics, it is quite natural to have aggregation work on three-valued multisets. Three-valued multisets are especially important for aggregate operations such as count greater than 10, or min that can make derivations even when some values are undened. Note that the three-valued multisets need not always be explicitly constructed, but the concept provides a clean way of understanding the use of aggregate operations on partially constructed multisets. Aggregate-Well-Founded Semantics: As shown in [BRSS92a], the well-founded semantics [VRS91] can be dened via well-founded computations, which are a special case of valid computations. By using the extended notion of `follows from' with the denition of well-founded computations, we get a clean extension of the well-founded semantics to aggregation (Section 4.2). We show that the aggregate-well-founded semantics for aggregation is a special case of the aggregate-valid semantics for aggregation, and may be more ecient to compute in general. A Unifying Framework: There have been a number of proposals for dening the declarative semantics of logic programs with aggregation. Some of these semantics are hard to understand, and others are applicable only to special classes of programs. This has led people to question the utility of having a (hard to understand) declarative semantics for logic programs with aggregation. The valid semantics [BRSS92a] provides a framework that unies many semantics proposed earlier, by means of: (1) providing a clean way of understanding the semantics of the program, regardless of the specic details of the special cases, (2) ensuring that the dierent semantics do not conict, and (3) making the task of extending 1

3 semantics to new ways of making inferences very clean by parametrizing the semantics w.r.t. inference rules. These points are demonstrated in this paper by showing how clean and easy it is to extend valid semantics to the aggregate-valid semantics; essentially all that changed was the denition of `follows from'. Once someone has understood the valid semantics, understanding the aggregate-valid semantics is very straightforward since all that has changed is the denition of `follows from'. Part 3 is very important for integrating new features such as quantitative reasoning with the semantics. Ecient Evaluation: Aggregate-well-founded semantics can be computed with eciency similar to well-founded semantics. Evaluation techniques that make use of special properties of special classes of programs, or provide sound approximations to the aggregate-valid semantics, can be computed even more eciently. Several special cases of aggregate-valid semantics, which cover a large class of programs, have been identied and integrated into the CORAL deductive database system ([RSS92b]), and have proven ecient in practice (Section 6). Our semantics has several advantages over earlier semantics. These are briey mentioned in Section 1.1, and discussed in more detail in Section A Motivating Example We consider an example that motivates the results in this paper. We informally describe the notation we use while describing the example; the notation is dened formally later in the paper. On the following example, the semantics proposed earlier either do not apply, or fail to provide intuitive answers and are hard to understand. In Section 7 we present a comparison of our technique with other techniques for dening semantics, and present further examples that illustrate the benet of our technique. Example 1.1 The following program is the extended party invitation program (Example 6.2 in [Van92]). Several people have been invited to a party. Each person has a positive compatibility with some people (values are stored in the relation pos(person1; person2; degree)) and a negative compatibility with others (similarly stored in neg(person1; person2; degree)). A person will come if the total positive compatibility with those who are coming is above a threshold, and the total negative compatibility with those who are coming is below another threshold. The thresholds are stored in a relation thr(person; pos; neg) where the second and third arguments give the positive threshold and the negative threshold respectively. In the following, rel? (a; b; x) is derived if b has accepted, and a has a negative compatibility of x with b; rel+ is similar, but with positive compatibilities. The program is as follows: accept(x) :? goodenough(x); :toobad(x): rel + (X; Y; C) :? accept(y ); pos(x; Y; C): rel? (X; Y; C) :? accept(y ); neg(x; Y; C): goodenough(x) :? groupby(rel + (X; Y; C); [X]; subset(< C >; S)); thr(x; P; N); sum(s) P: toobad(x) :? groupby(rel?(x; Y; C); [X]; subset(< C >; S)); thr(x; P; N); sum(s) > N: Let the database be: thr(a; 1; 0); thr(b; 1; 0); thr(c; 0; 0); pos(a; b; 1); pos(b; a; 1); neg(c; a; 1): The groupby notation is to be understood as follows (formal denitions are presented later). Consider the literal groupby(rel? (X; Y; C); [X]; subset(< C >; S)). For any given binding X=x, (i.e., for the variable in [X] in the literal) consider the facts of the form rel? (x; Y; C). The literal is satised by a binding X=x; Y=y; S=s S if s S is a multiset such that for each element s 2 s S, if the multiplicity of s in s S is k then there are at least k dierent values y such that rel? (x; y; s) is true. Note the `at least' above, which is a result of the use of subset in the groupby literal. Intuitively, the rules, with the given set of facts have the following meaning: a will accept if b does and vice-versa, but neither will accept rst, and c will accept if a does not. In keeping with the intuition behind 2

4 the well-founded semantics for the case of negation (but no aggregation), accept(a) and accept(b) should be false since they are in a \positive cycle". From that it should follow that accept(c) is true. The above semantics is precisely what is provided by the aggregate-valid semantics as well as the aggregate well-founded semantics, which we present in this paper. On the other hand, the semantics of Mumick et al [MPR90], and Ross and Sagiv [RS92] do not work on the above program since it uses aggregation in conjunction with negation. Both the semantics apply only to restricted classes of programs, and in the case of Ross and Sagiv, it is undecidable whether a program falls into their class (i.e., is monotonic) or not. Our semantics applies to all programs. The semantics of Kemp and Stuckey [KS91] also applies to all programs, but leaves all of accept(a); accept(b) and accept(c) undened. The semantics of Van Gelder applies to all programs, as well, but it too makes all of accept(a); accept(b) and accept(c) undened, which Van Gelder says (and we agree) is undesirable. Van Gelder attempts to give semantics to the program through two dierent translations, but both leave all these facts undened. Van Gelder's semantics are, in addition, quite hard to understand since the translations convert aggregation and subset generation into negation, with several levels of cyclic negation being introduced in the process. This example motivates the need for multisets. Both Van Gelder and Ross and Sagiv simulate multisets by assuming that extra arguments are used to distinguish the elements of the set. However, the task is given to the user. Our technique handles multisets in a straightforward way and avoids burdening the user with having to worry about the distinguishing arguments. 2 2 Denitions We assume familiarity with the standard terminology of logic programming, such as variables, constants, function symbols, terms, atoms, facts and rules. A fact that contains no variables is a ground fact. Aggregate operations have traditionally been viewed as functions that map sets of values to values. Examples of aggregate operations include sum, min and max. The sets of values that are aggregated upon are themselves generated from sets of facts, using constructs such as the groupby construct in Example 1.1. The above view of aggregate operations is adequate so long as one can think of a set of facts for a predicate as being the set of true facts for the predicate, and all other facts for the predicate are false, as is the case with the two-valued semantics that have been traditionally used for logic programs. Recently, several very successful proposals have used three-valued models instead of two valued models. The prime candidate is the well-founded semantics [VRS91]. Other proposals include the three-valued stable model semantics [Prz90] and the valid semantics [BRSS92a]. These models map facts to one of the three values true; false or undefined, whereas two-valued models map facts to one of the two values true or false. When using a three-valued model approach, if we generate sets of values using constructs such as the groupby construct, it is but natural to generate three-valued sets of facts, rather than two-valued sets, and to apply aggregate operations on three-valued sets of facts. Doing so provides an elegant way of extending semantics such as the well-founded semantics and the valid semantics to handle aggregate operations. This is precisely what we do in this paper; to the best of our knowledge, the idea has never been proposed before. Another important use of three-valued sets is as concrete representations of partial information about sets that we are trying to construct and apply aggregate operations on. We may have decided on the truth values of some of the elements, but may have yet to decide on the truth values of others these are mapped to undefined. In fact, it is not sucient to deal just with three-valued sets. Aggregate operations are almost always used on multisets of facts, also known as bags, which are basically sets where each element has a multiplicity. For instance, a common operation is to collect values (e.g. salaries in a department) and sum them. If we treated the collection of values as a set, we would eliminate duplicate values and get a wrong sum. Hence it is standard to create multisets of values and aggregate on them. Consequently we need to deal with three-valued multisets of facts. We now dene three-valued multisets. 3

5 A set on domain D can be viewed as a one-to-one mapping from D to ft; Fg. A (two-valued) multiset on a domain D, is a function from D to the cardinals. For simplicity we use N (i.e., the natural numbers) instead of the cardinals in this paper, which is ne with nite universes. Our technique works correctly even with innite universes if we simply take the symbol N to represent the cardinals; thinking in terms of natural numbers helps the intuition. For each element e in a multiset M, M(e) (i.e., the value that e is mapped to) is called its multiplicity. We stress that the multiplicity of an element could be 0. Given two multisets M 1 and M 2 on domain D, their union, M = M1 [ M2 is dened as the multiset M such that 8m 2 D; M(m) = M1(m) + M2(m) We denote the set of all multisets on domain D as M(D). In the special case that the range of a multiset is f0; 1g, the multiset is actually a set we simply think of F as 0 and T as 1. We dene a three-valued set on a domain D as a one-to-one mapping from D to ft; F; Ug, where U stands for `undened'. Intuitively, elements mapped to T are denitely in the set, elements mapped to F are denitely not in the set, and those mapped to U have their inclusion undened. The question now arises as to how to dene three-valued multisets. A rst approach may be to think of them as mappings to N [ fug. An element mapped to 0 would be absent from the set, and an element mapped to U may or may not be in the set. However, this approach loses valuable information. Suppose we use an aggregate operation that counts the number of children of each person. Since we assumed a three-valued semantics is used, the truth value of some facts may be undened. Suppose we know that the following facts are true: parent(mary; john); parent(beth; john); parent(louise; john) and the following facts are undened parent(rama; john); parent(sita; john) and all other facts are false. How can we represent the information about the number of children of john? Using the above approach to dene three-valued sets, we can at best say that john has at least three children, since each value is mapped to only one integer. But we lose the information that john could have at most ve children. Hence we use the following denition. A three-valued multiset on a domain D is a function from D to N N. Let M be a three-valued multiset, and consider an element e that is mapped to hn t ; n u i in M. We interpret the mapping as saying that e has a multiplicity of at least n t, and may have a multiplicity of n u more. We call hn t ; n u i as the three-valued multiplicity of e. We say that e is true in M with multiplicity n t, (or alternatively, e has an true-multiplicity of n t ) and is undened in M with multiplicity n u (or alternatively, e has an undened-multiplicity of n u ). We also say that e is false in M if both n t and n u are 0. In the above example we would map john to h3; 2i. A three-valued set is a special case of three-valued multisets where the range is fh1; 0i; h0; 1i; h0; 0ig. The rst element of the range corresponds to T, the second to U and the third to F. We use M? (D) to denote the set of all three-valued multisets on D. (The motivation for this notation is that? denotes undened.) We have now dened three-valued multisets and sets. We use the following representation for three-valued multisets on domain D: hm T ; M U ; M F i where M T and M U are (two-valued) multisets on domain D, and M F is a set on domain D. The multisets M T and M U, and the set M F are dened follows. Suppose the three-valued multiplicity of an element e is hn t ; n u i. Then the multiplicity of e in M T must be n t, and the multiplicity of e in M U must be n u. Element e is in M F i both n t and n u are 0. 4

6 In the above representation, M F is redundant since it can be derived from M T and M U. We use it to get a triple notation so as to avoid confusion with the pair notation hs T ; S F i which is often used to represent three-valued sets (where S T is the set of elements mapped to T, and S F is the set of elements mapped to F ). Given (two-valued) multisets M1 and M2 on domain D, we say that M1 M2 (or, M1 is contained in M2) i 8m 2 M1; M1(m) M2(m) In other words, the multiplicity of each element in M1 is less than its multiplicity in M2. Containment of three-valued multisets is more complicated, but the intuitive idea is that if M 1 is contained in M2, then M2 can be obtained from M1 by moving (some copies of) some elements from undened to true, and similarly from undened to false. Formally, containment of three-valued multisets is dened as follows. Given three-valued multisets M1 = hm1 T ; M1 U ; M1 F i and M2 = hm2 T ; M2 U ; M2 F i on domain D, we say that M1 M2 i (1) M1 T M2 T and (2) (M2 T [ M2 U ) (M1 T [ M1 U ). The rst condition above is obvious. The second condition ensures that the sum of the true and undened multiplicities of an element in M 2 has to be the same or less than in M 1. Distributing some (copies of) elements from undened to true and false cannot increase the sum of the true and undened multiplicities for any element. It is very important to note that if M1 M2, then M1 F M2 F ; the result follows from the denition of since an element is false i both its true and undened multiplicities are zero. We say that M2 extends M1 (alternatively, M2 is an extension of M1) if M1 M2. We note that is the multiset extension of the information-theoretic containment operator. Given a two-valued multiset M 1 on the domain D, we say that M1 v ht 1; U1; F 1i if M1 T 1. We say that a fact f1 covers fact f2 if f1 subsumes f2. The denition of covers is extended to sets of facts and to three-valued sets of facts in the natural manner a three-valued set of facts covers another three-valued set of facts if it extends it. 1 We assume familiarity with the notion of the universe of a program. Given a program and a universe for the program, the set of all ground facts that can be created using predicates from the program and values from the universe is a base for the program. Suppose for instance that p is the sole predicate symbol in a program, and p has arity 2. If the universe of the program is fa; bg, then the base of the program is fp(a; a); p(a; b); p(b; a); p(b; b)g. A three-valued interpretation of a program maps each ground atom in the base to one of ft; F; Ug. A threevalued interpretation is thus a three-valued set whose domain is the base. An interpretation ht 1; F 1i is 2-valued precisely when F 1 is the complement of T 1 with respect to the base. For example, hfp(a; a); p(b; b)g; fp(a; b)gi is a three-valued interpretation for the base of the example described above, while hfp(a; a); p(b; b)g; fp(a; b); p(b; a)gi is a two-valued interpretation for the same base. Given a set of facts A, A denotes the complement of A w.r.t. the base. Note that we use three-valued sets of facts rather than multisets or three-valued multisets of facts (as opposed to multisets of values, which we do handle). Our semantics can be generalized to handle multisets of facts, but we do not pursue the idea further in this paper. 3 Syntax and Semantics Preliminaries We denote by U the universe of the program. In the initial part of the paper, we shall assume for concreteness that the Herbrand universe of the program along with the database is used. Unless otherwise specied, the domain of a set and a three-valued set is the universe. 1 We do not consider non-ground facts in this paper, but our results can be generalized to handle non-ground facts in a manner similar to [BRSS92b]. 5

7 3.1 Aggregate Functions Traditionally, aggregate functions have been applied to two-valued multisets. We extend aggregate functions to work on three-valued multisets for the following intuitive reason. In the course of a computation for a program, facts start o with their truth status undened, and this status may change to either true or false (but not vice versa). At some stage in the computation, we may want to partially construct a multiset using the groupby construct (dened formally later) and (possibly) aggregate on it. But we don't know the truth value of all facts, so we represent a partially constructed multiset as a three-valued multiset. For each element in the multiset we have a multiplicity for the `true' part (possibly 0), and a multiplicity for the `unknown' part (also possibly 0). As we continue the computation, facts mapped to unknown may change to true or to false. Correspondingly, if we re-evaluate the groupby literal, in the three-valued multiset that we construct, the multiplicity of the unknown part may decrease as facts change from undened to true or false, and the multiplicity of the true part may increase correspondingly. The false part may also grow correspondingly. By operating on three-valued multisets, aggregate operations can use information about `false' values and `undened' values, in addition to information about `true' values. Consider the special case of three-valued sets. Even though some values may be mapped to undened, an aggregate operation such as min may be able to provide an answer. For instance, given a three-valued set of reals S such that 5 is true (i.e., mapped to T ), and every real less than 5 is false (i.e., mapped to F ), the min operator on S can return an answer of 5 the information on what is false is critical for making this derivation. Any extension of the set can only result in some values greater than 5 that were undened in the set (i.e., mapped to U) being mapped to T or F, which does not aect the result of the min operation. If some values less than 5 (the least true value in S) were undened in S, min must return the result? (undened), since dierent extensions of the set have dierent minimum values. The intuition behind the use of min on the particular example above can be generalized to allow aggregate operations to be used on three-valued multisets. But since we allow aggregate operations to be applied before the entire multiset is constructed, we have to be careful to ensure that the result does not change as the multiset gets extended. We therefore introduce a monotonicity condition. Intuitively, the result v1 of an aggregate operation on a three-valued multiset must either be undened (?), or v1 must also be the result of the aggregation on every extension of the three-valued multiset (recall the denition of extension from Section 2). The formal denition of aggregate functions is as follows: Denition 3.1 A function aggfn is dened to be an aggregate function if: 1. The domain of aggfn is M? (U), and the range is U [ f?g (where? stands for undened). 2. If M1 M2, where M1 and M2 are three-valued multisets with domain U, and aggfn(m1) 6=?, then aggfn(m1) = aggfn(m2). 2 The rst condition states that aggregate functions can be partial functions, i.e., they can map some threevalued multisets to? (i.e., undened). The rst condition also requires that the result of the aggregate function should either be in the universe or should be undened (?). The second condition is the monotonicity condition. Note that the domain of the aggregate function is M? (U), the set of three-valued multisets on U. This set can contain elements that are not in the universe, and hence the aggregate function may be applied on multisets that are not themselves in the universe. Aggregate functions return a single value on a given three-valued multiset. However, there are aggregate operations that `return' multiple values given a multiset. For instance, if we want to select the least three elements of a multiset, rather than the minimum element, we might like to have an aggregate operation that returns each of these independently. Similarly, there are many cases when we want to generate subsets of a given multiset of values. Aggregate functions can be generalized to aggregate predicates for this purpose; details are presented in the full version of the paper. An example of an aggregate predicate is subset(t; S), which is satised by a substitution [T=t; S=s] if s is a two-valued multiset, t is a three-valued multiset, and s v t. For a 6

8 given binding T =t there are many bindings for S that satisfy the predicate. Another example is 3val subset(t; S) which is satised by [T=t; S=s] if s t. 3.2 Grouping Atoms A grouping atom has one of the following forms: 2 groupby(p(t); [X]; S = aggfn < Y >) where X and Y appear in t, and aggfn is an aggregate function, or groupby(p(t); [X]; aggpred(< Y >; S)) where X and Y appear in t, and aggpred is an aggregate predicate. Since any aggregate function can be also represented as an aggregate predicate, the rst form is basically a special case of the second form. The semantics of grouping atoms is discussed later, when we dene satisfaction. A literal is either an atom, a negative atom, or a grouping atom. The denitions of rules and facts follow the standard terminology, except for the following restrictions on aggregation: (G1) A grouping literal may appear only in the body of a rule, never in its head, and (G2) A grouping literal may not be negated. As a special case of restriction G1, a grouping atom can never be a fact. Restriction G2 is essentially to keep the discussion simple, and can be worked around easily. 3.3 Satisfaction and Rule Application We now dene when a literal is satised in a given interpretation, and when a fact `follows from' a rule. The denition for rules without aggregation is the same as in [BRSS92b], although we couch it in a dierent notation. Denition 3.2 Satisfaction : Suppose we are given an interpretation I = ht I ; F I i and a substitution. Given a positive non-grouping literal q i (t i ), we say that q i (t i )[] is satised in I if q i (t i )[] is covered by T I. Similarly, for a negative non-grouping literal :q i (t i ), we say that :q i (t i )[] is satised in I if q i (t i )[] is covered by F I. For a grouping literal of the form groupby(p(t); [X]; S = aggfn < Y >), we say that groupby(p(t); [X]; S = aggfn < Y >)[] is satised in I if there is a three-valued multiset hm T ; M U ; M F i with domain U such that: (GF0) : grounds all variables in fx; S; Y g: (GF1) : S[] = aggfn(hm T ; M U ; M F i). (Note that since is a substitution, S[] 6=?). (GF2) : Let be the set of all ground substitutions on variables in t such that T I covers p(t)[] and agrees with on the variables of X. Then M T = [Y []j 2 ] (where [: : :] is the multiset analog of the set constructor f: : :g.) (GF3) : Let 0 be the set of all ground substitutions on variables in t such that F I covers p(t)[] and agrees with on the variables of X. Then M F = fy []j 2 0 g. (GF4) Let U I be the set of undened facts in ht I ; F I i. (U I = B? T I? F I, where B is base of the program.) Let 00 be the set of all ground substitutions on variables in t such that U I covers p(t)[] and agrees with on the variables of X. Then M U = [Y []j 2 00 ] (where [: : :] is the multiset analog of the set constructor f: : :g.) 2 The syntax is dierent from the syntax that we used in [BRSS92a]. The current syntax corresponds closely to that used in [MPR90]. 7

9 The denition of satisfaction for groupby(p(t); [X]; aggpred(< Y >; S))[] is the same as above, except that GF1 is changed to \(hm T ; M U ; M F i; S[]) is in the extension of aggpred". 2 The denitions of M T and M F are monotonic in that if we have two interpretations M1 and M2 such that M1 M2, then M1 T M2 T, and M1 F M2 F, where Mi T and Mi F are respectively the M T and M F multisets generated by Mi, for i = 1; 2. The denition of M U is anti-monotonic. Note that in the above, M T and M U are multisets while M F is a set. We do not require M T, M F, M U or hm T ; M U ; M F i to be in the universe. The above denition diers from earlier denitions of satisfaction with aggregation since it allows the aggregate operation to work on three-valued multisets rather than just two-valued multisets. The generalization is important, since it is often possible to make derivations using aggregate functions even when some elements are undened. We have now dened the notion of satisfaction for all types of literals. We now dene when a fact `follows from' a rule, given an interpretation. It is important to note that the rest of the semantics is parametrized by the denition of `follows from', and is essentially unchanged from [BRSS92a]. Denition 3.3 Follows from : Consider a rule R : p(t):?q 1 (t 1 ); : : :; q n (t n ) We say that the body of the rule is satised in I = ht I ; F I i by a substitution if for each i; 1 i n, q i (t i )[] is satised in I. We say that a fact p(t)[] follows from I by a substitution, using rule R, if the body of R is satised in I by Discussion An important concern with grouping is that even when M T is nite, M F and M U may be innite, making it very hard to generate them before performing the aggregate operation. However, in typical applications we would never generate these multisets explicitly. The multisets M F and M U need be computed only if required, and are often known implicitly. For example, if we know that a multiset cannot have any negative numbers, we know that all negative numbers are in M F, and a test such as sum greater than 10 succeeds if the sum of elements in M T is greater than 10. For the cheapest path problem, if we use Dijkstra's algorithm ([AHU74]), facts are generated in increasing order of cost, and once a fact with a cost 10 is generated we know that all facts with cost less than 10 are false. Here again, the implicit knowledge of false facts lets us make a derivation using the minimum of the current set of true facts. We discuss the idea in more detail in Example 4.1. The denition of `follows from' has an important property, that we call derivation monotonicity if a derivation `follows from' a three-valued interpretation I1, it also `follows from' every interpretation I2 that extends I1. Intuitively, derivations using grouping literals satisfy this property because of the monotonicity requirement on aggregate functions. More formally, we have the following proposition. Proposition 3.1 If a derivation (using a rule R and substitution ) `follows from' an interpretation ht 1; F 1i, and there is an interpretation ht 2; F 2i such that T 2 T 1 and F 2 F 1, then the derivation also `follows from' ht 2; F 2i using R and. 2 As noted in [BRSS92b], this is the only property of `follows from' that is used in the denitions and proofs related to the well-founded semantics and the valid semantics (described later in this paper). This makes the semantics easy to understand as well as easy to extend to allow new ways of making deductions. 4 Computations In this section we dene the notion of `bottom-up' computations, using the notion of `follows from' dened earlier. Informally, a computation is a sequence of derivations. We use the term computation to refer to any such sequence. However, to dene the semantics of a program we want to consider only computations where 8

10 each step follows, in some sense, from earlier ones. Each derivation is made on the basis of some set of facts being true and some set of facts being false. It makes intuitive sense to choose as the set of true facts the facts in the given database along with the facts derived earlier in the computation. But how about the set of false facts? We have no program rules that derive such false facts program rules derive only true facts. Therefore we use some form of default rule to decide which facts are false. There are several possible default rules. One choice leads to the well-founded semantics [VRS91], and another choice leads to the valid semantics [BRSS92a]. Both choices were discussed in [BRSS92a] for the case of programs without aggregation. We now extend the discussion to include aggregation. The basic denitions of the semantics are very similar to those in [BRSS92a] since they were already parametrized by the deduction rules that are used to derive facts. In Section 4.1 we discuss the default rule that leads to the aggregate-valid semantics. In Section 4.2 we discuss the default rule that leads to the aggregate-well-founded semantics. To dene computations of a program P, we consider transnite sequences of triples of the form (R; p(s); ), where R is a rule of the program, p(s) is an instance of R's head, and is a substitution on the variables of R. It is important to not restrict ourselves to nite computations, as discussed in [BRSS92b], although in practice we will only be able to completely evaluate programs that have nite computations. However, in the case of programs with nite universes we can restrict ourselves to nite sequences. A computation C is a mapping from all ordinals that are smaller than some ordinal to the set of such triples. The ordinal is the length of the computation. We call each triple in C a step, and refer to R as the rule of the step, and to p(s) as the fact of the step. We also sometimes refer to the derivation made in the step as a ring of rule R. Given a computation C, and a set of facts T, for each ordinal length(c) we dene M (C; T ) (the set of facts associated with ) inductively as follows: M 0 (C; T ) is dened to be T, M +1 (C; T ) is dened by adding to M (C; T ) the fact derived by step, and for limit ordinals we take the union of facts derived before. A more formal denition is presented in the full version of the paper. If C is a computation of length from a set of facts T, then the set associated with in C is called the result of C on T, and we denote it by M(C; T ). A special case of the denition above is when T is the given database D. Then we have computations from D. We usually omit D, talk about computations rather than computations from a set of facts, and write M(C), rather than M(C; D). 4.1 Valid Computations We now examine the default rule for deriving false facts that leads to the aggregate-valid semantics. We rst dene `lenient extensions' of computations, which can assume a fact to be false if it has not been derived earlier, even if it happens to be derived later. Thus, lenient extensions impose few restrictions on when a fact can be assumed to be false, and there are many possible lenient extensions of a computation. We then dene `valid computations' as computations where a fact is deduced to be false at some step only if there is no lenient extension of the computation up to that step that can derive the fact. The default rule is quite intuitive, and we show that this default rule denes a unique semantics for the program. We also provide examples where the semantics provides intuitive results. A computation C is a lenient computation of program P on a set of facts T if it satises the following condition: (CC1) : If the 'th triple is (R; p(s); ), then p(s) `follows from' hm (C; T ); M (C; T )i by R, using substitution (where M (C; T ) denotes the complement of M (C; T ) with respect to the base of the program). Condition CC1 embodies the requirement that each triple is indeed a step where a rule is used to derive a fact, assuming that each fact that does not unify with any fact derived so far is false. The adjective `lenient' refers to the fact that in such a computation we may use a fact negatively, yet infer it in a subsequent step. Thus, the constraint in the denition of the term `lenient computation' is rather weak; lenient extensions are 9

11 used to provide upper bounds on what can possibly be derived. Notice that each step in a lenient computation depends on the set of facts generated earlier, but not on the exact sequence of earlier derivations. Hence a lenient computation from a set of facts is equivalent to a lenient extension of a computation that generates that set of facts (database facts are assumed to be generated already). Denition 4.1 If C 1 is a lenient computation, and C 2 is a lenient computation from the set of facts M(C 1 ), then we say that C 2 is a lenient extension of C 1 ; we also say that M(C 2 ) is a lenient extension of M(C 1 ). 2 Denition 4.2 F v (T ) : Let T be a set of facts. We associate with it a set of facts, called the set of facts assumed false on the basis of T, denoted F v (T ), dened as follows. 3 A fact p(s) is in F v (T ) i there is no fact that is in T, or is derived in a lenient computation from T, that unies with p(s). 2 The intuition above is that we can assume some facts to be false by default if there is no `reasonable' way of deriving the facts. The interpretation given to `derived in any reasonable way' is `derived in a lenient computation'. It follows from the denition that T \ F v (T ) = ;. Based on the denition of what can be assumed false by default, we can now dene aggregate-valid computations. Denition 4.3 Aggregate-Valid Computations : Let C be a lenient computation (from a database D), and for each step : (R; p(s); ), let C be the prex of C up to (but not including) step. We say that derivation step is aggregate-valid if p(s) follows from hm(c ); F v (M(C ))i using R and. We say that C is an aggregate-valid computation if all the steps in it are aggregate-valid. 2 The denition of aggregate-valid computations is the same as the denition of valid computations in [BRSS92a], except for the fact that an extended notion of `follows from' is being used to deal with aggregation. Example 4.1 Consider the following program used to dene cheapest paths: R1 : cost(x; Y; C) :? edge(x; Y; C): R2 : cost(x; Y; C) :? edge(x; Z; C1); mincost(z; Y; C2); C = C1 + C2: R3 : mincost(x; Y; C) :? groupby(cost(x; Y; C1); [X; Y ]; C = min < C1 >): Also suppose we have the following facts. edge(a; b; 2): edge(b; c; 3): edge(a; c; 6): edge(c; a; 1): To keep the description of computations concise, we omit rule names and substitutions whenever they can be inferred from the context. The following computation uses only rule R1, and it is trivial to see that it is an aggregate-valid computation: C1 : cost(a; b; 2); cost(b; c; 3); cost(a; c; 6); cost(c; a; 1): However, C1 is not `complete' it can be extended. The following are some lenient extensions of C1: L1 : cost(a; b; 2); cost(b; c; 3); cost(a; c; 6); cost(c; a; 1); mincost(a; b; 2): L2 : cost(a; b; 2); cost(b; c; 3); cost(a; c; 6); cost(c; a; 1); mincost(a; c; 6): L3 : cost(a; b; 2); cost(b; c; 3); cost(a; c; 6); cost(c; a; 1); mincost(b; c; 3); cost(a; c; 5): These lenient extensions are obtained by computing min (in rule R3) using the current set of cost facts, assuming every fact that is not currently true is false. (There is no benet to assuming fewer facts to be false doing so does not result in any more derivations, due to the property of derivation monotonicity.) There is a lenient extension (L3) that derives a fact cost(a; c; 5); hence cost(a; c; 5) is not in the F v set, and is undened after computation C1. The step in L2 that computes mincost(a; c; 6) is not aggregate-valid since it does not follow if cost(a; c; 5) is undened. However, the derivation of mincost(a; b; 2) in L1 is agggregate-valid for the following reason. No lenient extension of C1 can derive a fact cost(a; b; C) such that C < 2, and hence all such facts are in the F v set. Given that cost(a; b; 2) is in the T v set, and all the above facts are in the F v set, the 3 F v stands for False under the aggregate-valid semantics. 10

12 min aggregate operation can deduce that the minimum value for the group [a; b] is 2. Since all its steps are aggregate-valid, L1 is an aggregate-valid computation. We can extend L1 to get the following aggregate-valid computation. C2:cost(a; b; 2); cost(b; c; 3); cost(a; c; 6); cost(c; a; 1); mincost(a; b; 2); mincost(b; c; 3); mincost(c; a; 1); cost(a; c; 5); cost(c; b; 3); cost(b; a; 4); mincost(a; c; 5); mincost(c; b; 3); mincost(b; a; 4); cost(a; a; 6); cost(a; a; 7); cost(b; b; 6); cost(c; c; 6); mincost(a; a; 6); mincost(b; b; 6); mincost(c; c; 6): The intuition is as follows. Steps that derive cost facts are trivially valid steps since they don't use aggregation, and make use of database facts and facts derived earlier. Steps that generate mincost facts are valid since no lenient extension can derive a cost fact for the same pair of nodes, but with lesser cost. Derivations of mincost facts as above are not valid by the denition in [BRSS92a], since there are cycles, and we have not determined the truth value of all required cost facts when we make a mincost derivation. The aggregate-valid semantics makes use of the set of false facts, and can make an aggregate derivation even when some facts in the set are undened. 2 In the above example, we have not specied in general how exactly we deduce eciently that no cost fact with lesser cost can be derived; the denition in terms of lenient extensions appears to require constructing every lenient extension and checking if a derivation follows after each of them. For special classes of programs such as the various forms of stratication, and Cost-Monotonic programs [GGZ91] (which includes the cheapest path program), it is possible to deduce that a derivation is aggregate-valid, without computing all lenient extensions (Section 7). Another option is to compute a superset of all facts that can be computed using lenient extensions from a computation; for example, using aggregate-well-founded extensions (see Section 4.2) Aggregate-Valid Semantics We present some properties of aggregate-valid computations, and then dene the semantics of programs based on the facts computed by `complete' aggregate-valid computations. We shall use the notation F v (C), where C is a computation, to denote F v (M(C)), and T v (C) to denote M(C). Obviously, the set of facts in T v for any lenient computation (not necessarily aggregate-valid) grows monotonically as more steps are performed. It turns out this is also true for the set of facts assumed false, and we can prove the following: If C 1 is a prex of a lenient computation C, then F v (C 1 ) F v (C). We can also show that if C 1 ; C 2 are aggregate-valid computations from D, then their concatenation in any order is also an aggregate-valid computation from D. Denition 4.4 Complete aggregate-valid computation : We say that an aggregate-valid computation is complete if in each of its aggregate-valid extensions the fact derived by every step is covered by the set of facts that have already been derived in the aggregate-valid computation. 2 We can show that all complete aggregate-valid computations C of a program on a given database have the same T v (C) sets, and the same F v (C) sets. The fact that the concatenation of two aggregate-valid computations is an aggregate-valid computation is important to show the above result. We can also show that for each program P, and each database D, there exists a complete aggregate-valid computation of P on D. Given these results, we dene a semantics for programs, as follows. Denition 4.5 Aggregate-Valid Semantics : Assume we have a program, a database, and a given generalized universe. Let T C denote the set of facts computed in any complete aggregate-valid computation C of the program, and let F C = F v (C) (i.e., the set of facts that can be assumed false at the end of the computation). We call the pair ht C ; F C i the aggregate-valid semantics of the program (on the given database, in the given universe). 2 Theorem 4.1 The aggregate-valid semantics of a program always exists, and is unique. 2 11

13 Example 4.2 We continue with Example 4.1. Consider the valid computation C2 shown in that example. There is no extension of this computation that generates a new fact for every pair of nodes (x; y) we have derived a mincost fact, and no more mincost facts can be derived. All cost facts that can be derived from the mincost facts have also been derived. Hence C2 is a complete aggregate-valid computation. The complete aggregate-valid computation C2 denes the set of true facts in the aggregate-valid semantics. The set of false facts in general is the set of facts that do not unify with any fact derived either in C2 or in any lenient extension of C2. In this example, there is no lenient extension of C2 that derives any new fact even the grouping rule cannot deduce any more facts, regardless of any assumptions it makes about facts being false. Hence the set of false facts in this case is the complement of the set of true facts. As a result, the semantics is two valued, although in general it can be three valued (the facts that do not unify with any fact in C2 but unify with a fact derived in a lenient extension of C2 would be undened). 2 We have the following result. Theorem 4.2 For programs that do not use groupby, the valid semantics and the aggregate-valid semantics coincide Aggregate-Well-Founded Semantics The well-founded semantics diers from the valid semantics in the default rule that is used, as noted in [BRSS92a]. In this section we dene the default rule using WF-lenient computations instead of lenient computations, and use the default rule to dene aggregate-well-founded computations. Denition 4.6 A computation S is a WF-lenient computation from a set of facts T, if in every step = (R; p(s); ) of S, p(s) follows from hm (S; T ); Ti by R using substitution (where T is the complement of T with respect to the base of the program). The set of facts that can be assumed false w.r.t. to the WF semantics given T (denoted F w (T )), is dened as follows: a fact p(s) is in F w (T ) i there is no fact that is in T, or is derived in a WF-lenient computation from T, that unies with it. 2 A very important point to note in the above denition of WF-lenient extensions, is that M (S; T ) and T may not be disjoint, that is, a fact may be in both sets this is forced on us by the denition of the well-founded model [VRS91]. Thus hm (S; T ); Ti is not an interpretation by our earlier denition. Furthermore, as a result of the above, in the denition of satisfaction for grouping literals (Denition 3.2) M F may contain elements whose multiplicity in either M F or M U is non-zero. Therefore hm T ; M U ; M F i does not represent a three-valued multiset. The denitions of aggregate functions, aggregate predicates and of satisfaction need to be generalized to use extended three-valued multisets that allow an element to be in M F while having non-zero true-multiplicity or undened-multiplicity. We now discuss how to extend the earlier denitions. Extending the denition of aggregate functions (Denition 3.1) requires only extending the denition of M? (U). We dene the three-valued reduction of ht 1; U1; F 1i as ht 1; U1; F 0 i, where F 0 is the set of all elements f in the domain such that T 1(f) = U1(f) = 0. The result of aggregate functions such as min, max and others we discussed in this paper, on an extended three-valued set S are dened to be the results of the aggregate functions on the three-valued reduction of S. Thus the extra false facts are ignored. The denition of aggregate predicates can be extended similarly. The denition of satisfaction can be used unchanged, with the word interpretation taken to mean the extended denition of interpretations. While we could have presented the extended denitions in earlier sections, we postponed the task so as to avoid confusing the reader. The problems caused by the denition of well-founded semantics are intrinsic, and not due to our formulation, and we believe they indicate that the denition is unintuitive in some ways. We dene aggregate-well-founded computations exactly like we dene aggregate-valid computations, except that we use F w (C) instead of F v (C). That is, in an aggregate-well-founded computation, at any step we can 12

Constraint Objects. Abstract. We describe the Constraint Object Data Model (CODM),

Constraint Objects. Abstract. We describe the Constraint Object Data Model (CODM), Constraint Objects Divesh Srivastava 1, Raghu Ramakrishnan 2, Peter Z. Revesz 3 1 AT&T Bell Laboratories, Murray Hill, NJ 07974, USA 2 University of Wisconsin, Madison, WI 53706, USA 3 University of Nebraska,

More information

contribution of this paper is to demonstrate that rule orderings can also improve eciency by reducing the number of rule applications. In eect, since

contribution of this paper is to demonstrate that rule orderings can also improve eciency by reducing the number of rule applications. In eect, since Rule Ordering in Bottom-Up Fixpoint Evaluation of Logic Programs Raghu Ramakrishnan Divesh Srivastava S. Sudarshan y Computer Sciences Department, University of Wisconsin-Madison, WI 53706, U.S.A. Abstract

More information

has phone Phone Person Person degree Degree isa isa has addr has addr has phone has phone major Degree Phone Schema S1 Phone Schema S2

has phone Phone Person Person degree Degree isa isa has addr has addr has phone has phone major Degree Phone Schema S1 Phone Schema S2 Schema Equivalence in Heterogeneous Systems: Bridging Theory and Practice R. J. Miller y Y. E. Ioannidis z R. Ramakrishnan x Department of Computer Sciences University of Wisconsin-Madison frmiller, yannis,

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

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

LP attracted two kinds of enthousiasts engineers/programmers \Never had I experienced such ease in getting a complex program coded and running" D.H.D.

LP attracted two kinds of enthousiasts engineers/programmers \Never had I experienced such ease in getting a complex program coded and running D.H.D. Logic Programming Revisited Logic Programs as Inductive Denitions An engineers' view Maurice Bruynooghe Katholieke Universiteit Leuven, Belgium Partly based on work of Marc Denecker In the beginning (1974),

More information

,, 1{48 () c Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Optimal Representations of Polymorphic Types with Subtyping * ALEXAN

,, 1{48 () c Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Optimal Representations of Polymorphic Types with Subtyping * ALEXAN ,, 1{48 () c Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Optimal Representations of Polymorphic Types with Subtyping * ALEXANDER AIKEN aiken@cs.berkeley.edu EECS Department, University

More information

Part I Logic programming paradigm

Part I Logic programming paradigm Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two

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

THE FREUDENTHAL-HOPF THEOREM

THE FREUDENTHAL-HOPF THEOREM THE FREUDENTHAL-HOPF THEOREM SOFI GJING JOVANOVSKA Abstract. In this paper, we will examine a geometric property of groups: the number of ends of a group. Intuitively, the number of ends of a group is

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD

Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD CAR-TR-728 CS-TR-3326 UMIACS-TR-94-92 Samir Khuller Department of Computer Science Institute for Advanced Computer Studies University of Maryland College Park, MD 20742-3255 Localization in Graphs Azriel

More information

Consistency and Set Intersection

Consistency and Set Intersection Consistency and Set Intersection Yuanlin Zhang and Roland H.C. Yap National University of Singapore 3 Science Drive 2, Singapore {zhangyl,ryap}@comp.nus.edu.sg Abstract We propose a new framework to study

More information

Checking: Trading Space for Time. Divesh Srivastava. AT&T Research. 10]). Given a materialized view dened using database

Checking: Trading Space for Time. Divesh Srivastava. AT&T Research. 10]). Given a materialized view dened using database Materialized View Maintenance and Integrity Constraint Checking: Trading Space for Time Kenneth A. Ross Columbia University kar@cs.columbia.edu Divesh Srivastava AT&T Research divesh@research.att.com S.

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

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times 3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

More information

Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee. The Chinese University of Hong Kong.

Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee. The Chinese University of Hong Kong. Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee Department of Computer Science and Engineering The Chinese University of Hong Kong Shatin, N.T., Hong Kong SAR, China fyclaw,jleeg@cse.cuhk.edu.hk

More information

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

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

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

to automatically generate parallel code for many applications that periodically update shared data structures using commuting operations and/or manipu

to automatically generate parallel code for many applications that periodically update shared data structures using commuting operations and/or manipu Semantic Foundations of Commutativity Analysis Martin C. Rinard y and Pedro C. Diniz z Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 fmartin,pedrog@cs.ucsb.edu

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

Bootcamp. Christoph Thiele. Summer An example of a primitive universe

Bootcamp. Christoph Thiele. Summer An example of a primitive universe Bootcamp Christoph Thiele Summer 2012 0.1 An example of a primitive universe A primitive universe consists of primitive objects and primitive sets. This allows to form primitive statements as to which

More information

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1 CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are

More information

Select (SumSal > Budget) Join (DName) E4: Aggregate (SUM Salary by DName) Emp. Select (SumSal > Budget) Aggregate (SUM Salary by DName, Budget)

Select (SumSal > Budget) Join (DName) E4: Aggregate (SUM Salary by DName) Emp. Select (SumSal > Budget) Aggregate (SUM Salary by DName, Budget) ACM SIGMOD Conference, June 1996, pp.447{458 Materialized View Maintenance and Integrity Constraint Checking: Trading Space for Time Kenneth A. Ross Columbia University kar@cs.columbia.edu Divesh Srivastava

More information

Designing Views to Answer Queries under Set, Bag,and BagSet Semantics

Designing Views to Answer Queries under Set, Bag,and BagSet Semantics Designing Views to Answer Queries under Set, Bag,and BagSet Semantics Rada Chirkova Department of Computer Science, North Carolina State University Raleigh, NC 27695-7535 chirkova@csc.ncsu.edu Foto Afrati

More information

Forcing in disjunctive logic programs

Forcing in disjunctive logic programs Forcing in disjunctive logic programs Marina De Vos Free University of Brussels, VUB marinadv@tinf1vubacbe Dirk Vermeir Free University of Brussels, VUB dvermeir@vubacbe Abstract We propose a semantics

More information

Condition Using Constraints. Stratication conditions for logic programs aim to ensure a two-valued semantics

Condition Using Constraints. Stratication conditions for logic programs aim to ensure a two-valued semantics A Syntactic Stratication Condition Using Constraints Kenneth A. Ross Department of Computer Science Columbia University New York, NY 10027 kar@cs.columbia.edu Abstract Stratication conditions for logic

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

Topic 3: Propositions as types

Topic 3: Propositions as types Topic 3: Propositions as types May 18, 2014 Propositions as types We have seen that the main mathematical objects in a type theory are types. But remember that in conventional foundations, as based on

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

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

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

Reconciling Dierent Semantics for Concept Denition (Extended Abstract) Giuseppe De Giacomo Dipartimento di Informatica e Sistemistica Universita di Ro

Reconciling Dierent Semantics for Concept Denition (Extended Abstract) Giuseppe De Giacomo Dipartimento di Informatica e Sistemistica Universita di Ro Reconciling Dierent Semantics for Concept Denition (Extended Abstract) Giuseppe De Giacomo Dipartimento di Informatica e Sistemistica Universita di Roma \La Sapienza" Via Salaria 113, 00198 Roma, Italia

More information

Parallel Rewriting of Graphs through the. Pullback Approach. Michel Bauderon 1. Laboratoire Bordelais de Recherche en Informatique

Parallel Rewriting of Graphs through the. Pullback Approach. Michel Bauderon 1. Laboratoire Bordelais de Recherche en Informatique URL: http://www.elsevier.nl/locate/entcs/volume.html 8 pages Parallel Rewriting of Graphs through the Pullback Approach Michel Bauderon Laboratoire Bordelais de Recherche en Informatique Universite Bordeaux

More information

Let v be a vertex primed by v i (s). Then the number f(v) of neighbours of v which have

Let v be a vertex primed by v i (s). Then the number f(v) of neighbours of v which have Let v be a vertex primed by v i (s). Then the number f(v) of neighbours of v which have been red in the sequence up to and including v i (s) is deg(v)? s(v), and by the induction hypothesis this sequence

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

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations Outline Computer Science 331 Data Structures, Abstract Data Types, and Their Implementations Mike Jacobson 1 Overview 2 ADTs as Interfaces Department of Computer Science University of Calgary Lecture #8

More information

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA A taxonomy of race conditions. D. P. Helmbold, C. E. McDowell UCSC-CRL-94-34 September 28, 1994 Board of Studies in Computer and Information Sciences University of California, Santa Cruz Santa Cruz, CA

More information

Hyperplane Ranking in. Simple Genetic Algorithms. D. Whitley, K. Mathias, and L. Pyeatt. Department of Computer Science. Colorado State University

Hyperplane Ranking in. Simple Genetic Algorithms. D. Whitley, K. Mathias, and L. Pyeatt. Department of Computer Science. Colorado State University Hyperplane Ranking in Simple Genetic Algorithms D. Whitley, K. Mathias, and L. yeatt Department of Computer Science Colorado State University Fort Collins, Colorado 8523 USA whitley,mathiask,pyeatt@cs.colostate.edu

More information

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable A Simplied NP-complete MAXSAT Problem Venkatesh Raman 1, B. Ravikumar 2 and S. Srinivasa Rao 1 1 The Institute of Mathematical Sciences, C. I. T. Campus, Chennai 600 113. India 2 Department of Computer

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

MAX-PLANCK-INSTITUT F UR. Ordered Semantic Hyper-Linking. David A. Plaisted. MPI{I{94{235 August 1994 INFORMATIK. Im Stadtwald. D Saarbrucken

MAX-PLANCK-INSTITUT F UR. Ordered Semantic Hyper-Linking. David A. Plaisted. MPI{I{94{235 August 1994 INFORMATIK. Im Stadtwald. D Saarbrucken MAX-PLANCK-INSTITUT F UR INFORMATIK Ordered Semantic Hyper-Linking David A. Plaisted MPI{I{94{235 August 1994 k I N F O R M A T I K Im Stadtwald D 66123 Saarbrucken Germany Authors' Addresses David Plaisted

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

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the The Semi-Full Closure of Pure Type Systems? Gilles Barthe Institutionen for Datavetenskap, Chalmers Tekniska Hogskola, Goteborg, Sweden Departamento de Informatica, Universidade do Minho, Braga, Portugal

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Core Membership Computation for Succinct Representations of Coalitional Games

Core Membership Computation for Succinct Representations of Coalitional Games Core Membership Computation for Succinct Representations of Coalitional Games Xi Alice Gao May 11, 2009 Abstract In this paper, I compare and contrast two formal results on the computational complexity

More information

Typed Racket: Racket with Static Types

Typed Racket: Racket with Static Types Typed Racket: Racket with Static Types Version 5.0.2 Sam Tobin-Hochstadt November 6, 2010 Typed Racket is a family of languages, each of which enforce that programs written in the language obey a type

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

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in  . 0.1 More on innity.math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in email. 0.1.1 If you haven't read 1.3, do so now! In notes#1

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

Eulerian disjoint paths problem in grid graphs is NP-complete

Eulerian disjoint paths problem in grid graphs is NP-complete Discrete Applied Mathematics 143 (2004) 336 341 Notes Eulerian disjoint paths problem in grid graphs is NP-complete Daniel Marx www.elsevier.com/locate/dam Department of Computer Science and Information

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

(Refer Slide Time: 4:00)

(Refer Slide Time: 4:00) Principles of Programming Languages Dr. S. Arun Kumar Department of Computer Science & Engineering Indian Institute of Technology, Delhi Lecture - 38 Meanings Let us look at abstracts namely functional

More information

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya Department of Information Science, Graduate School of Science, University of Tokyo hagiyais.s.u-tokyo.ac.jp Abstract

More information

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

More information

Semantics. A. Demers Jan This material is primarily from Ch. 2 of the text. We present an imperative

Semantics. A. Demers Jan This material is primarily from Ch. 2 of the text. We present an imperative CS411 Notes 1: IMP and Large Step Operational Semantics A. Demers 23-25 Jan 2001 This material is primarily from Ch. 2 of the text. We present an imperative language called IMP; wegive a formal definition

More information

Type Checking and Type Equality

Type Checking and Type Equality Type Checking and Type Equality Type systems are the biggest point of variation across programming languages. Even languages that look similar are often greatly different when it comes to their type systems.

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics 400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {

More information

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen Formal semantics of loosely typed languages Joep Verkoelen Vincent Driessen June, 2004 ii Contents 1 Introduction 3 2 Syntax 5 2.1 Formalities.............................. 5 2.2 Example language LooselyWhile.................

More information

Operational Semantics

Operational Semantics 15-819K: Logic Programming Lecture 4 Operational Semantics Frank Pfenning September 7, 2006 In this lecture we begin in the quest to formally capture the operational semantics in order to prove properties

More information

Incompatibility Dimensions and Integration of Atomic Commit Protocols

Incompatibility Dimensions and Integration of Atomic Commit Protocols The International Arab Journal of Information Technology, Vol. 5, No. 4, October 2008 381 Incompatibility Dimensions and Integration of Atomic Commit Protocols Yousef Al-Houmaily Department of Computer

More information

Fundamental Concepts. Chapter 1

Fundamental Concepts. Chapter 1 Chapter 1 Fundamental Concepts This book is about the mathematical foundations of programming, with a special attention on computing with infinite objects. How can mathematics help in programming? There

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

II (Sorting and) Order Statistics

II (Sorting and) Order Statistics II (Sorting and) Order Statistics Heapsort Quicksort Sorting in Linear Time Medians and Order Statistics 8 Sorting in Linear Time The sorting algorithms introduced thus far are comparison sorts Any comparison

More information

Handout 9: Imperative Programs and State

Handout 9: Imperative Programs and State 06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 9: Imperative Programs and State Imperative

More information

time using O( n log n ) processors on the EREW PRAM. Thus, our algorithm improves on the previous results, either in time complexity or in the model o

time using O( n log n ) processors on the EREW PRAM. Thus, our algorithm improves on the previous results, either in time complexity or in the model o Reconstructing a Binary Tree from its Traversals in Doubly-Logarithmic CREW Time Stephan Olariu Michael Overstreet Department of Computer Science, Old Dominion University, Norfolk, VA 23529 Zhaofang Wen

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

Introduction to Homotopy Type Theory

Introduction to Homotopy Type Theory Introduction to Homotopy Type Theory Lecture notes for a course at EWSCS 2017 Thorsten Altenkirch March 5, 2017 1 What is this course about? To explain what Homotopy Type Theory is, I will first talk about

More information

Solutions to Homework 10

Solutions to Homework 10 CS/Math 240: Intro to Discrete Math 5/3/20 Instructor: Dieter van Melkebeek Solutions to Homework 0 Problem There were five different languages in Problem 4 of Homework 9. The Language D 0 Recall that

More information

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C. 219 Lemma J For all languages A, B, C the following hold i. A m A, (reflexive) ii. if A m B and B m C, then A m C, (transitive) iii. if A m B and B is Turing-recognizable, then so is A, and iv. if A m

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2 2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of

More information

Topic 1: What is HoTT and why?

Topic 1: What is HoTT and why? Topic 1: What is HoTT and why? May 5, 2014 Introduction Homotopy type theory (HoTT) is a newly emerging field of mathematics which is currently being developed as a foundation of mathematics which is in

More information

for the MADFA construction problem have typically been kept as trade secrets (due to their commercial success in applications such as spell-checking).

for the MADFA construction problem have typically been kept as trade secrets (due to their commercial success in applications such as spell-checking). A Taxonomy of Algorithms for Constructing Minimal Acyclic Deterministic Finite Automata Bruce W. Watson 1 watson@openfire.org www.openfire.org University of Pretoria (Department of Computer Science) Pretoria

More information

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was

More information

SORT INFERENCE \coregular" signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp

SORT INFERENCE \coregular signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp Haskell Overloading is DEXPTIME{complete Helmut Seidl Fachbereich Informatik Universitat des Saarlandes Postfach 151150 D{66041 Saarbrucken Germany seidl@cs.uni-sb.de Febr., 1994 Keywords: Haskell type

More information

Reasoning With Characteristic Models

Reasoning With Characteristic Models This papers appears in the Proceedings of the Eleventh National Conference on Artificial Intelligence (AAAI-93), Washington, D.C., 1993. Reasoning With Characteristic Models Henry A. Kautz, Michael J.

More information

An Algorithm for Computing Semi-Stable Semantics

An Algorithm for Computing Semi-Stable Semantics An Algorithm for Computing Semi-Stable Semantics Martin Caminada Department of Information and Computing Sciences, Utrecht University Technical Report UU-CS-2007-010 www.cs.uu.nl ISSN: 0924-3275 An Algorithm

More information

A Model of Machine Learning Based on User Preference of Attributes

A Model of Machine Learning Based on User Preference of Attributes 1 A Model of Machine Learning Based on User Preference of Attributes Yiyu Yao 1, Yan Zhao 1, Jue Wang 2 and Suqing Han 2 1 Department of Computer Science, University of Regina, Regina, Saskatchewan, Canada

More information

This chapter describes the syntax and semantics of the safemos programming language,

This chapter describes the syntax and semantics of the safemos programming language, A Real-time Programming Language R.W.S. Hale and He Jifeng Overview URL: http://www.cam.sri.com/tr/crc039/paper.ps.z Towards Verified Systems, Jonathan Bowen (ed.), Elsevier; 1992 This chapter describes

More information

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F 1 Logical Operations 1.1 And The and operator is a binary operator, denoted as, &,, or sometimes by just concatenating symbols, is true only if both parameters are true. A B A B F T F F F F The expression

More information

Aggregates in Recursion: Issues and Solutions

Aggregates in Recursion: Issues and Solutions Aggregates in Recursion: Issues and Solutions Alpen-Adria-Universität Klagenfurt RuleML Webinar, 2018-05-25 Outline 1 2 3 4 Coincidence Results Complexity Results : Aggregates Aggregates facilitate problem

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

Lecture 9: Datalog with Negation

Lecture 9: Datalog with Negation CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 9: Datalog with Negation In this lecture we will study the addition of negation to Datalog. We start with an example.

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

More information

The Typed λ Calculus and Type Inferencing in ML

The Typed λ Calculus and Type Inferencing in ML Notes on Types S. Arun-Kumar Department of Computer Science and Engineering Indian Institute of Technology New Delhi, 110016 email: sak@cse.iitd.ernet.in April 14, 2002 2 Chapter 1 The Typed λ Calculus

More information

Chapter S:V. V. Formal Properties of A*

Chapter S:V. V. Formal Properties of A* Chapter S:V V. Formal Properties of A* Properties of Search Space Graphs Auxiliary Concepts Roadmap Completeness of A* Admissibility of A* Efficiency of A* Monotone Heuristic Functions S:V-1 Formal Properties

More information

A Boolean Expression. Reachability Analysis or Bisimulation. Equation Solver. Boolean. equations.

A Boolean Expression. Reachability Analysis or Bisimulation. Equation Solver. Boolean. equations. A Framework for Embedded Real-time System Design? Jin-Young Choi 1, Hee-Hwan Kwak 2, and Insup Lee 2 1 Department of Computer Science and Engineering, Korea Univerity choi@formal.korea.ac.kr 2 Department

More information

detected inference channel is eliminated by redesigning the database schema [Lunt, 1989] or upgrading the paths that lead to the inference [Stickel, 1

detected inference channel is eliminated by redesigning the database schema [Lunt, 1989] or upgrading the paths that lead to the inference [Stickel, 1 THE DESIGN AND IMPLEMENTATION OF A DATA LEVEL DATABASE INFERENCE DETECTION SYSTEM Raymond W. Yip and Karl N. Levitt Abstract: Inference is a way tosubvert access control mechanisms of database systems.

More information

IEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3

IEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3 LANGUAGE REFERENCE MANUAL Std P1076a-1999 2000/D3 Clause 10 Scope and visibility The rules defining the scope of declarations and the rules defining which identifiers are visible at various points in the

More information

Static Program Analysis CS701

Static Program Analysis CS701 Static Program Analysis CS701 Thomas Reps [Based on notes taken by Aditya Venkataraman on Oct 6th, 2015] Abstract This lecture introduces the area of static program analysis. We introduce the topics to

More information

Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development

Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development Tim Felgentreff, Todd Millstein, Alan Borning and Robert Hirschfeld Viewpoints

More information

Lecture 5: The Halting Problem. Michael Beeson

Lecture 5: The Halting Problem. Michael Beeson Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it

More information

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Technical Report UU-CS-2008-042 December 2008 Department of Information and Computing Sciences Utrecht

More information

PCP and Hardness of Approximation

PCP and Hardness of Approximation PCP and Hardness of Approximation January 30, 2009 Our goal herein is to define and prove basic concepts regarding hardness of approximation. We will state but obviously not prove a PCP theorem as a starting

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