2. Abstract State Machines
|
|
|
- Coral Fisher
- 10 years ago
- Views:
Transcription
1 2. Abstract State Machines The notion of Abstract State Machines (ASMs), defined in [20], captures in mathematically rigorous yet transparent form some fundamental operational intuitions of computing, and the notation is familiar from programming practice and mathematical standards.this allows the practitioner to work with ASMs without any further eplanation, viewing them as pseudocode over abstract data which comes with a well defined semantics supporting the intuitive understanding.we therefore suggest to skip this chapter and to come back to it only should the need be felt upon further reading. For the sake of a definite reference, we nevertheless provide in this chapter a survey of the notation, including some etensions of the definition in [20] which are introduced in [7] for structuring comple machines and for reusing machine components.for the reader who is interested in more details, we also provide a mathematical definition of the synta and semantics of ASMs. This definition helps understanding how the ASMs in this book have been made eecutable, despite of their abstract nature; it will also help the more mathematically inclined reader to check the proofs in this book.we stick to non distributed (also called sequential) ASMs because they suffice for modeling Java and the JVM. 2.1 ASMs in a nutshell ASMs are systems of finitely many transition rules of form if Condition then Updates which transform abstract states.(two more forms are introduced below.) The Condition (so called guard) under which a rule is applied is an arbitrary first-order formula without free variables. Updates is a finite set of function updates (containing only variable free terms) of form f (t 1,...,t n ):=t whose eecution is to be understood as changing (or defining, if there was none) the value of the (location represented by the) function f at the given parameters.
2 16 2. Abstract State Machines Fig. 2.1 Control state ASM diagrams if cond 1 & ctl_state = i then ctl_state := j 1 rule 1 cond 1 rule 1 i... cond n j 1 means rule n j n if cond n& ctl_state = i then ctl_state := j n rule n Assume disjoint cond i. Usually the "control states" are notationally suppressed. The global JVM structure is given by so called control state ASMs [3] which have finitely many control states ctl state 1,...,m}, resembling the internal states of classical Finite State Machines.They are defined and pictorially depicted as shown in Fig. 2.1.Note that in a given control state i, these machines do nothing when no condition cond j is satisfied. The notion of ASM states is the classical notion of mathematical structures where data come as abstract objects, i.e., as elements of sets (domains, universes, one for each category of data) which are equipped with basic operations (partial functions) and predicates (attributes or relations).without loss of generality one can treat predicates as characteristic functions. The notion of ASM run is the classical notion of computation of transition systems.an ASM computation step in a given state consists in eecuting simultaneously all updates of all transition rules whose guard is true in the state, if these updates are consistent.for the evaluation of terms and formulae in an ASM state, the standard interpretation of function symbols by the corresponding functions in that state is used. Simultaneous eecution provides a convenient way to abstract from irrelevant sequentiality and to make use of synchronous parallelism.this mechanism is enhanced by the following concise notation for the simultaneous eecution of an ASM rule R for each satisfying a given condition ϕ: forall with ϕ do R A priori no restriction is imposed neither on the abstraction level nor on the compleity nor on the means of definition of the functions used to compute the arguments t i and the new value t in function updates.the major distinction made in this connection for a given ASM M is between static functions which never change during any run of M and dynamic ones which typically do change as a consequence of updates by M or by the environment (i.e., by some other agent than M ).The dynamic functions are further divided into
3 2.1 ASMs in a nutshell 17 four subclasses. Controlled functions (for M ) are dynamic functions which are directly updatable by and only by the rules of M, i.e., functions f which appear in a rule of M as leftmost function (namely in an update f (s) :=t for some s, t) and are not updatable by the environment. Monitored functions are dynamic functions which are directly updatable by and only by the environment, i.e., which are updatable but do not appear as leftmost function in updates of M. Interaction functions are dynamic functions which are directly updatable by rules of M and by the environment. Derived functions are dynamic functions which are not directly updatable neither by M nor by the environment but are nevertheless dynamic because defined (for eample by an eplicit or by an inductive definition) in terms of static and dynamic functions. We will use functions of all these types in this book, their use supports the principles of separation of concerns, information hiding, modularization and stepwise refinement in system design.a frequently encountered kind of static or monitored functions are choice functions, used to abstract from details of static or dynamic scheduling strategies.asms support the following concise notation for an abstract specification of such strategies: choose with ϕ do R meaning to eecute rule R with an arbitrary chosen among those satisfying the selection property ϕ.if there eists no such, nothing is done.for choose and forall rules we also use graphical notations of the following form: choose with R ϕ forall with ϕ R We freely use as abbreviations combinations of where, let, if then else, case and similar standard notations which are easily reducible to the above basic definitions.we usually use the table like case notation with pattern matching and try out the cases in the order of writing, from top to bottom.we also use rule schemes, namely rules with variables and named parametrized rules, but only as an abbreviational device to enhance the readability or as macro allowing us to reuse machines and to display the global machine structure.for eample if...a =(X, Y )... then...x...y... abbreviates if...ispair(a)... then...fst(a)...snd(a)..., sparing us the need to write eplicitly the recognizers and the selectors.similarly, an occurrence of
4 18 2. Abstract State Machines r( 1,..., n ) where a rule is epected stands for the corresponding rule R (which is supposed to be defined somewhere, say by r( 1,..., n )=R).Such a rule call r( 1,..., n ) is used only when the parameters are instantiated by legal values (objects, functions, rules, whatever) so that the resulting rule has a well defined semantical meaning on the basis of the eplanations given above. 2.2 Mathematical definition of ASMs In this section we provide a detailed mathematical definition for the synta and semantics of ASMs.This definition is the basis of the AsmGofer implementation of the ASMs for Java/JVM in this book Abstract states In an ASM state, data come as abstract elements of domains (also called universes, one for each category of data) which are equipped with basic operations represented by functions.without loss of generality we treat relations as boolean valued functions and view domains as characteristic functions, defined on the superuniverse which represents the union of all domains.thus the states of ASMs are algebraic structures, also called simply algebras, as introduced in standard logic or universal algebra tetbooks. Definition (Vocabulary). A vocabulary Σ is a finite collection of function names.each function name f has an arity, a non-negative integer. The arity of a function name is the number of arguments the function takes. Function names can be static or dynamic.nullary function names are often called constants; but be aware that, as we will see below, the interpretation of dynamic nullary functions can change from one state to the net, so that they correspond to the variables of programming.every ASM vocabulary is assumed to contain the static constants undef, True, False. Eample The vocabulary Σ bool of Boolean algebras contains two constants 0 and 1, a unary function name and two binary function names + and.the vocabulary Σ scm of the programming language Scheme contains a constant nil, two unary function names car and cdr and a binary function name cons, etc. Definition (State). A state A of the vocabulary Σ is a non-empty set X, the superuniverse of A, together with interpretations of the function names of Σ.If f is an n-ary function name of Σ, then its interpretation f A is a function from X n into X ;ifc is a constant of Σ, then its interpretation c A is an element of X.The superuniverse X of the state A is denoted by A.
5 2.2 Mathematical definition of ASMs 19 Eample Two states A and B for the vocabulary Σ bool of Eample 2.2.1: The superuniverse of the state A is the set 0, 1}.The functions are interpreted as follows, where a, b are 0 or 1: 0 A := 0 (zero) 1 A := 1 (one) A a := 1 a (logical complement) a + A b := ma(a, b) (logical or) a A b := min(a, b) (logical and) The superuniverse of the state B is the power set of the set of non-negative integers N.The functions are interpreted as follows, where a, b are subsets of N: 0 B := (empty set) 1 B := N (full set) B a := N \ a (set of all n N such that n / a) a + B b := a b (set of all n N such that n a or n b) a B b := a b (set of all n N such that n a and n b) Both states, A and B, are so-called Boolean algebras. Other eamples of algebraic structures are: groups, rings, lattices, etc. Remark Formally, function names are interpreted in states as total functions.we view them, however, as being partial and define the domain of an n-ary function name f in A to be the set of all n-tuples (a 1,...,a n ) A n such that f A (a 1,...,a n ) undef A. Eample In states for the vocabulary Σ scm of Eample 2.2.1, we usually have: car A (nil A )=undef A, cdr A (nil A )=undef A. The constant undef represents an undetermined object, the default value of the superuniverse.it is also used to model heterogeneous domains.in applications, the superuniverse A of a state A is usually divided into smaller universes, modeled by their characteristic functions.the universe represented by f is the set of all elements t for which f (t) undef.if a unary function f represents a universe, then we simply write t f as an abbreviation for the formula f (t) undef. Definition (Term). The terms of Σ are syntactic epressions generated as follows: 1.Variables v 0, v 1, v 2,...are terms. 2.Constants c of Σ are terms. 3.If f is an n-ary function name of Σ and t 1,...,t n are terms, then f (t 1,...,t n ) is a term. Terms are denoted by r, s, t; variables are denoted by, y, z.a term which does not contain variables is called closed.
6 20 2. Abstract State Machines Eample The following are terms of the vocabulary Σ bool : +(v 0, v 1 ), +(1, (v 7, 0)) The are usually written as v 0 + v 1 and 1 + (v 7 0). Since terms are syntactic objects, they do not have a meaning.a term can be evaluated in a state, if elements of the superuniverse are assigned to the variables of the term. Definition (Variable assignment). Let A be a state.a variable assignment for A is a function ζ which assigns to each variable v i an element ζ(v i ) A.We write ζ a for the variable assignment which coincides with ζ ecept that it assigns the element a to the variable.so we have: a, if ζ a (v vi = ; i)= ζ(v i ), otherwise. Given a variable assignment a term can be interpreted in a state. Definition (Interpretation of terms). Let A be a state of Σ, ζ be a variable assignment for A and t be a term of Σ.By induction on the length of t, a value [t ] A ζ A is defined as follows: 1.[v i ] A ζ := ζ(v i), 2.[c ] A ζ := ca, 3.[f (t 1,...,t n )] A ζ := f A ([t 1 ] A ζ,...,[t n ] A ζ ). The interpretation of t depends on the values of ζ on the variables of t only: if ζ() =ξ() for all variables of t, then [t ] A ζ =[[t ]A ξ (Coincidence Lemma). Eample Consider the state A for Σ bool of Eample Let ζ be a variable assignment with ζ(v 0 )=0,ζ(v 1 ) = 1 and ζ(v 2 ) = 1.Then we have: [(v 0 + v 1 ) v 2 ] A ζ =1. The same term can be interpreted in the state B of Eample Let ξ(v 0 )=2, 3, 5}, ξ(v 1 )=2, 7} and ξ(v 2 )=3, 7, 11}.Then we have: [(v 0 + v 1 ) v 2 ] B ξ = 3, 7}. In the first case, the value of the term is a non-negative integer, whereas in the second case the value of the term is a set of non-negative integers. Definition (Formula). Let Σ be a vocabulary.the formulas of Σ are generated as follows: 1.If s and t are terms of Σ, then s = t is a formula. 2.If ϕ is a formula, then ϕ is a formula. 3.If ϕ and ψ are formulas, then (ϕ ψ), (ϕ ψ) and (ϕ ψ) are formulas. 4.If ϕ is a formula and a variable, then ( ϕ) and ( ϕ) are formulas.
7 2.2 Mathematical definition of ASMs 21 The logical connectives and quantifiers have the standard meaning: symbol name meaning negation not conjunction and disjunction or (inclusive) implication if-then universal quantification for all eistential quantification there is A formula s = t is called an equation.the epression s t is an abbreviation for the formula (s = t). In order to increase the readability of formulas parentheses are often omitted. For eample, the following conventions are used: ϕ ψ χ stands for ((ϕ ψ) χ), ϕ ψ χ stands for ((ϕ ψ) χ), ϕ ψ χ stands for ((ϕ ψ) χ), etc. Formulas can be interpreted in a state with respect to a variable assignment. Formulas are either true or false in a state.the truth value of a formula in a state is computed recursively.the classical truth tables for the logical connectives and the classical interpretation of quantifiers are used.the equality sign is interpreted as identity. Definition (Interpretation of formulas). Let A be a state of Σ, ϕ be a formula of Σ and ζ be a variable assignment in A.By induction on the length of ϕ, a truth value [[ϕ] A ζ True, False} is defined as follows: [s = t ] A True, if [s ] ζ := A ζ =[t ]A ζ ; [ ϕ] A True, if [ϕ] ζ := A ζ = False; [ϕ ψ ] A True, if [ϕ] ζ := A ζ = True and [ψ ]A ζ = True; [ϕ ψ ] A True, if [ϕ] ζ := A ζ = True or [ψ ]A ζ = True; [ϕ ψ ] A True, if [ϕ] ζ := A ζ = False or [ψ ]A ζ = True; True, if [ϕ] [ ϕ] A ζ := A ζ = True for all a A ; a True, if [ϕ] [ ϕ] A ζ := A ζ = True for some a A ; a
8 22 2. Abstract State Machines We say that a state A is a model of ϕ, if[ϕ] A ζ assignments ζ. = True for all variable Eample The states A and B of Eample are models of the following equations: ( + y)+z = +(y + z), ( y) z = (y z), + y = y +, y = y, +( y) =, ( + y) =, +(y z) =( + y) ( + z), (y + z) =( y)+( z), +( ) =1, ( ) =0. These formulas are called aioms of a Boolean algebra Transition rules and runs In mathematics, states like Boolean algebras are static.they do not change over time.in computer science, states are dynamic.they evolve by being updated during computations.updating abstract states means to change the interpretation of (some of) the functions in the underlying signature.the way ASMs update states is described by transitions rules of the following form which define the synta of ASM programs. Definition (Transition rules). Let Σ be a vocabulary.the transition rules R, S of an ASM are syntactic epressions generated as follows: 1. Skip Rule: skip Meaning: Do nothing. 2. Update Rule: f (t 1,...,t n ):=s Syntactic conditions: f is an n-ary, dynamic function name of Σ t 1,...,t n and s are terms of Σ Meaning: In the net state, the value of the function f at the arguments t 1,...,t n is updated to s.it is allowed that f is a 0-ary function, i.e., a constant.in this case, the update has the form c := s. 3. Block Rule: RS Meaning: R and S are eecuted in parallel. 4. Conditional Rule: if ϕ then R else S Meaning: If ϕ is true, then eecute R, otherwise eecute S.
9 2.2 Mathematical definition of ASMs Let Rule: let = t in R Meaning: Assign the value of t to and eecute R. 6. Forall Rule: forall with ϕ do R Meaning: Eecute R in parallel for each satisfying ϕ. 7. Call Rule: r(t 1,...,t n ) Meaning: Call r with parameters t 1,...,t n. A rule definition for a rule name r of arity n is an epression r( 1,..., n )=R, where R is a transition rule.in a rule call r(t 1,...,t n ) the variables i in the body R of the rule definition are replaced by the parameters t i. Definition (ASM). An abstract state machine M consists of a vocabulary Σ, an initial state A for Σ, a rule definition for each rule name, and a distinguished rule name of arity zero called the main rule name of the machine. The semantics of transition rules is given by sets of updates.since due to the parallelism (in the Block and the Forall rules), a transition rule may prescribe to update the same function at the same arguments several times, we require such updates to be consistent.the concept of consistent update sets is made more precise by the following definitions. Definition (Update). An update for A is a triple (f, (a 1,...,a n ), b), where f is an n-ary dynamic function name, and a 1,...,a n and b are elements of A. The meaning of the update is that the interpretation of the function f in A has to be changed at the arguments a 1,...,a n to the value b.the pair of the first two components of an update is called a location.an update specifies how the function table of a dynamic function has to be updated at the corresponding location.an update set is a set of updates. In a given state, a transition rule of an ASM produces for each variable assignment an update set.since the rule can contain recursive calls to other rules, it is also possible that it has no semantics at all.the semantics of a transition rule is therefore defined by a calculus in Fig. 2.2.
10 24 2. Abstract State Machines Definition (Semantics of transition rules). The semantics of a transition rule R of a given ASM in a state A with respect to a variable assignment ζ is defined if and only there eists an update set U such that [R ] A ζ U can be derived in the calculus in Fig. 2.2.In that case [R ] A ζ is identified with U. It can happen that the update set [R ] A ζ contains several updates for the same function name f.in this case, the updates have to be consistent, otherwise the eecution stops. Definition (Consistent update set). An update set U is called consistent, if it satisfies the following property: If (f, (a 1,...,a n ), b) U and (f, (a 1,...,a n ), c) U, then b = c. This means that a consistent update set contains for each function and each argument tuple at most one value. If an update set U is consistent, it can be fired in a given state.the result is a new state in which the interpretations of dynamic function names are changed according to U.The interpretations of static function names are the same as in the old state.the interpretation of monitored functions is given by the environment and can therefore change in an arbitrary way. Definition (Firing of updates). The result of firing a consistent update set U in a state A is a new state B with the same superuniverse as A satisfying the following two conditions for the interpretations of function names f of Σ: 1.If (f, (a 1,...,a n ), b) U, then f B (a 1,...,a n )=b. 2.If there is no b with (f, (a 1,...,a n ), b) U and f is not a monitored function, then f B (a 1,...,a n )=f A (a 1,...,a n ). Since U is consistent, for static and controlled functions the state B is determined in a unique way.notice that only those locations can have a new value in state B with respect to state A for which there is an update in U. (In this way ASMs avoid the so called frame problem.) Definition (Run of an ASM). Let M be an ASM with vocabulary Σ, initial state A and main rule name r.let ζ be a variable assignment. A run of M is a finite or infinite sequence B 0, B 1,... of states for Σ such that the following conditions are satisfied: 1. B 0 = A. 2.If [[r ] Bn ζ is not defined or inconsistent, then B n is the last state in the sequence. 3.Otherwise, B n+1 is the result of firing [r ] Bn ζ in B n. If we assume that for each rule definition r( 1,..., n )=R of the machine M the free variables of R are among 1,..., n, then a run is independent of the variable assignment ζ (see Eercise 2.2.2).
11 2.2 Mathematical definition of ASMs 25 Fig. 2.2 The semantics of ASM rules [skip ] A ζ [f (t) :=s ] A ζ (f, a, b)} [R ] A ζ U [S ] A ζ V [RS] A ζ U V if a =[[ t ] A ζ and b =[[ s ] A ζ [R ] A ζ U [if ϕ then R else S ] A ζ U if [[ ϕ] A ζ = True [S ] A ζ U [if ϕ then R else S ] A ζ U if [[ ϕ] A ζ = False [R ] A ζ a U [let = t in R ] A ζ U if a =[[ t ] A ζ [R ] A ζ a U a for each a I [forall with ϕ do R ] A ζ if I = a A :[[ ϕ] A a I Ua ζ a = True} [R ] A ζ a U [r(t)] A ζ U if r() =R is a rule definition and a =[[ t ] A ζ
12 26 2. Abstract State Machines Syntactic sugar To etend a subuniverse of the superuniverse by new elements we use the following notation: create do R The meaning of this construct is let = f new (...) in R where f new (...) is a monitored function (possibly with parameters) which returns a new element of the superuniverse which does not belong to any of the subuniverses. As mentioned above we sometimes use the following notation as syntactic sugar for monitored choice functions: choose with ϕ do R We understand this notation as an abbreviation for the rule let = f ϕ (...) in R, where f ϕ (...) is an monitored choice function updated by the environment which returns elements satisfying the selection condition ϕ.of course different occurrences of choose have to be replaced by different choice functions (possibly with parameters) to guarantee the independence of selection. Another approach would be to add choose as a basic construct to the synta and to etend the calculus in Fig. 2.2 in the following way: [R ] A ζ U a [choose with ϕ do R ] A ζ U if [ϕ]a ζ = True a This approach has the disadvantage that the semantics of a transition rule R is no longer unique, because there can be different update sets U such that [R ] A ζ U is derivable in the calculus Eercises Eercise Prove the following equation: [(if ϕ then R 1 else R 2 ) S ] A ζ Is the following equation true? =[if ϕ then (R 1 S) else (R 2 S)] A ζ [S (if ϕ then R 1 else R 2 )] A ζ =[if ϕ then (S R 1 ) else (S R 2 )] A ζ If yes, why? If not, give a counter eample. Eercise The set of free variables of a term t is defined as follows: 1.FV(v i ):=v i } 2.FV(c) :=
CHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson
Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
[Refer Slide Time: 05:10]
Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture
Testing LTL Formula Translation into Büchi Automata
Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland
Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.
Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets. Logic is the study of reasoning. A language of propositions is fundamental to this study as well as true
Predicate Logic. For example, consider the following argument:
Predicate Logic The analysis of compound statements covers key aspects of human reasoning but does not capture many important, and common, instances of reasoning that are also logically valid. For example,
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00
EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * ABSTRACT
EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * Taje I. Ramsamujh Florida International University Mathematics Department ABSTRACT Equational logic is a formalization of the deductive methods encountered in studying
Mathematical Induction
Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How
A Beginner s Guide to Modern Set Theory
A Beginner s Guide to Modern Set Theory Martin Dowd Product of Hyperon Software PO Box 4161 Costa Mesa, CA 92628 www.hyperonsoft.com Copyright c 2010 by Martin Dowd 1. Introduction..... 1 2. Formal logic......
INTRODUCTORY SET THEORY
M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly
A Propositional Dynamic Logic for CCS Programs
A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are
(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.
(LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
Monitoring Metric First-order Temporal Properties
Monitoring Metric First-order Temporal Properties DAVID BASIN, FELIX KLAEDTKE, SAMUEL MÜLLER, and EUGEN ZĂLINESCU, ETH Zurich Runtime monitoring is a general approach to verifying system properties at
o-minimality and Uniformity in n 1 Graphs
o-minimality and Uniformity in n 1 Graphs Reid Dale July 10, 2013 Contents 1 Introduction 2 2 Languages and Structures 2 3 Definability and Tame Geometry 4 4 Applications to n 1 Graphs 6 5 Further Directions
3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
Computability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.
CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.
CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:
Logic in Computer Science: Logic Gates
Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers
ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS
PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY Physical and Mathematical Sciences 2012 1 p. 43 48 ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS I nf or m at i cs L. A. HAYKAZYAN * Chair of Programming and Information
This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
2. The Language of First-order Logic
2. The Language of First-order Logic KR & R Brachman & Levesque 2005 17 Declarative language Before building system before there can be learning, reasoning, planning, explanation... need to be able to
A Note on Context Logic
A Note on Context Logic Philippa Gardner Imperial College London This note describes joint work with Cristiano Calcagno and Uri Zarfaty. It introduces the general theory of Context Logic, and has been
Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005
Turing Degrees and Definability of the Jump Theodore A. Slaman University of California, Berkeley CJuly, 2005 Outline Lecture 1 Forcing in arithmetic Coding and decoding theorems Automorphisms of countable
CS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
Mathematical Induction
Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,
Non-deterministic Semantics and the Undecidability of Boolean BI
1 Non-deterministic Semantics and the Undecidability of Boolean BI DOMINIQUE LARCHEY-WENDLING, LORIA CNRS, Nancy, France DIDIER GALMICHE, LORIA Université Henri Poincaré, Nancy, France We solve the open
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
Fixed-Point Logics and Computation
1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of
Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.
irst Order Logic Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Are the following sentences propositions? oronto
! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs
,!0((,.+#$),%$(-&.& *,2(-$)%&2.'3&%!&, Logics for Data and Knowledge Representation Alessandro Agostini [email protected] University of Trento Fausto Giunchiglia [email protected] The Logic of Descriptions!$%&'()*$#)
CONTENTS 1. Peter Kahn. Spring 2007
CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................
Basic Concepts of Set Theory, Functions and Relations
March 1, 2006 p. 1 Basic Concepts of Set Theory, Functions and Relations 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2 1.3. Identity and cardinality...3
Introducing Formal Methods. Software Engineering and Formal Methods
Introducing Formal Methods Formal Methods for Software Specification and Analysis: An Overview 1 Software Engineering and Formal Methods Every Software engineering methodology is based on a recommended
Lecture 17 : Equivalence and Order Relations DRAFT
CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion
Functional Programming. Functional Programming Languages. Chapter 14. Introduction
Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The
DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS
DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS ASHER M. KACH, KAREN LANGE, AND REED SOLOMON Abstract. We construct two computable presentations of computable torsion-free abelian groups, one of isomorphism
Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving
Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving Alessandro Armando 1,2 and Silvio Ranise 2, 1 DIST, Università degli Studi di Genova, Italia 2 Security
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
Indiana State Core Curriculum Standards updated 2009 Algebra I
Indiana State Core Curriculum Standards updated 2009 Algebra I Strand Description Boardworks High School Algebra presentations Operations With Real Numbers Linear Equations and A1.1 Students simplify and
First-Order Logics and Truth Degrees
First-Order Logics and Truth Degrees George Metcalfe Mathematics Institute University of Bern LATD 2014, Vienna Summer of Logic, 15-19 July 2014 George Metcalfe (University of Bern) First-Order Logics
Chapter II. Controlling Cars on a Bridge
Chapter II. Controlling Cars on a Bridge 1 Introduction The intent of this chapter is to introduce a complete example of a small system development. During this development, you will be made aware of the
C H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
CS510 Software Engineering
CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se
Background Information on Exponentials and Logarithms
Background Information on Eponentials and Logarithms Since the treatment of the decay of radioactive nuclei is inetricably linked to the mathematics of eponentials and logarithms, it is important that
THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER
THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.
CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs
CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce
Predicate Logic Review
Predicate Logic Review UC Berkeley, Philosophy 142, Spring 2016 John MacFarlane 1 Grammar A term is an individual constant or a variable. An individual constant is a lowercase letter from the beginning
Extending Semantic Resolution via Automated Model Building: applications
Extending Semantic Resolution via Automated Model Building: applications Ricardo Caferra Nicolas Peltier LIFIA-IMAG L1F1A-IMAG 46, Avenue Felix Viallet 46, Avenue Felix Viallei 38031 Grenoble Cedex FRANCE
Rigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical
A first step towards modeling semistructured data in hybrid multimodal logic
A first step towards modeling semistructured data in hybrid multimodal logic Nicole Bidoit * Serenella Cerrito ** Virginie Thion * * LRI UMR CNRS 8623, Université Paris 11, Centre d Orsay. ** LaMI UMR
Software Engineering
Software Engineering Lecture 04: The B Specification Method Peter Thiemann University of Freiburg, Germany SS 2013 Peter Thiemann (Univ. Freiburg) Software Engineering SWT 1 / 50 The B specification method
z 0 and y even had the form
Gaussian Integers The concepts of divisibility, primality and factoring are actually more general than the discussion so far. For the moment, we have been working in the integers, which we denote by Z
Automata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
COMPUTER SCIENCE TRIPOS
CST.98.5.1 COMPUTER SCIENCE TRIPOS Part IB Wednesday 3 June 1998 1.30 to 4.30 Paper 5 Answer five questions. No more than two questions from any one section are to be answered. Submit the answers in five
Invertible elements in associates and semigroups. 1
Quasigroups and Related Systems 5 (1998), 53 68 Invertible elements in associates and semigroups. 1 Fedir Sokhatsky Abstract Some invertibility criteria of an element in associates, in particular in n-ary
Mathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
Lecture 1. Basic Concepts of Set Theory, Functions and Relations
September 7, 2005 p. 1 Lecture 1. Basic Concepts of Set Theory, Functions and Relations 0. Preliminaries...1 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2
A logical approach to dynamic role-based access control
A logical approach to dynamic role-based access control Philippe Balbiani Yannick Chevalier Marwa El Houri Abstract Since its formalization RBAC has become the yardstick for the evaluation of access control
How To Program In Scheme (Prolog)
The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction Next up: Numeric operators, REPL, quotes, functions, conditionals Types and values
LEARNING OBJECTIVES FOR THIS CHAPTER
CHAPTER 2 American mathematician Paul Halmos (1916 2006), who in 1942 published the first modern linear algebra book. The title of Halmos s book was the same as the title of this chapter. Finite-Dimensional
Cassandra. References:
Cassandra References: Becker, Moritz; Sewell, Peter. Cassandra: Flexible Trust Management, Applied to Electronic Health Records. 2004. Li, Ninghui; Mitchell, John. Datalog with Constraints: A Foundation
Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification
Introduction Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification Advanced Topics in Software Engineering 1 Concurrent Programs Characterized by
Handout #1: Mathematical Reasoning
Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or
A Little Set Theory (Never Hurt Anybody)
A Little Set Theory (Never Hurt Anybody) Matthew Saltzman Department of Mathematical Sciences Clemson University Draft: August 21, 2013 1 Introduction The fundamental ideas of set theory and the algebra
THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES
THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES ANDREW E.M. LEWIS 1. Introduction This will be a course on the Turing degrees. We shall assume very little background knowledge: familiarity with
Schema Mappings and Data Exchange
Schema Mappings and Data Exchange Phokion G. Kolaitis University of California, Santa Cruz & IBM Research-Almaden EASSLC 2012 Southwest University August 2012 1 Logic and Databases Extensive interaction
The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About
CHAPTER 7 The Set Data Model The set is the most fundamental data model of mathematics. Every concept in mathematics, from trees to real numbers, is expressible as a special kind of set. In this book,
Chapter 4 Software Lifecycle and Performance Analysis
Chapter 4 Software Lifecycle and Performance Analysis This chapter is aimed at illustrating performance modeling and analysis issues within the software lifecycle. After having introduced software and
it is easy to see that α = a
21. Polynomial rings Let us now turn out attention to determining the prime elements of a polynomial ring, where the coefficient ring is a field. We already know that such a polynomial ring is a UF. Therefore
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
Relational Databases
Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute
Predicate logic. Logic in computer science. Logic in Computer Science (lecture) PART II. first order logic
PART II. Predicate logic first order logic Logic in computer science Seminar: INGK401-K5; INHK401; INJK401-K4 University of Debrecen, Faculty of Informatics [email protected] 1 / 19 Alphabets Logical
Math 223 Abstract Algebra Lecture Notes
Math 223 Abstract Algebra Lecture Notes Steven Tschantz Spring 2001 (Apr. 23 version) Preamble These notes are intended to supplement the lectures and make up for the lack of a textbook for the course
Regular Expressions and Automata using Haskell
Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions
Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013
CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages
OPERATIONAL TYPE THEORY by Adam Petcher Prepared under the direction of Professor Aaron Stump A thesis presented to the School of Engineering of
WASHINGTON NIVERSITY SCHOOL OF ENGINEERING AND APPLIED SCIENCE DEPARTMENT OF COMPTER SCIENCE AND ENGINEERING DECIDING JOINABILITY MODLO GROND EQATIONS IN OPERATIONAL TYPE THEORY by Adam Petcher Prepared
Reading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
1 Sets and Set Notation.
LINEAR ALGEBRA MATH 27.6 SPRING 23 (COHEN) LECTURE NOTES Sets and Set Notation. Definition (Naive Definition of a Set). A set is any collection of objects, called the elements of that set. We will most
Research Note. Bi-intuitionistic Boolean Bunched Logic
UCL DEPARTMENT OF COMPUTER SCIENCE Research Note RN/14/06 Bi-intuitionistic Boolean Bunched Logic June, 2014 James Brotherston Dept. of Computer Science University College London Jules Villard Dept. of
Abstract Data Types in Event-B An Application of Generic Instantiation
Abstract Data Types in Event-B An Application of Generic Instantiation David Basin 1, Andreas Fürst 1, Thai Son Hoang 1, Kunihiko Miyazaki 2, and Naoto Sato 2 1 Institute of Information Security, ETH Zurich
Row Echelon Form and Reduced Row Echelon Form
These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for in-class presentation
Chapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e.
CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e. This chapter contains the beginnings of the most important, and probably the most subtle, notion in mathematical analysis, i.e.,
Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us
Deterministic Finite Automata
1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function
