A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
5.1 Real Vector Spaces.
Introduction The concept of transform appears often in the literature of image processing and data compression. Indeed a suitable discrete representation.
CSCI 115 Chapter 6 Order Relations and Structures.
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Recursive Definitions and Structural Induction
Determinization of Büchi Automata
Copyright © Cengage Learning. All rights reserved.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS21 Decidability and Tractability
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
1 Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications.
Courtesy Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Discrete Mathematics Lecture 4 Harper Langston New York University.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
SEQUENTIAL ABSTRACT STATE MACHINES CAPTURE SEQUENTIAL ALGORITHMS.
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Normal forms for Context-Free Grammars
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Describing Syntax and Semantics
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Lattice and Boolean Algebra
Abstract State Machines and Computationally Complete Query Languages Andreas Blass,U Michigan Yuri Gurevich,Microsoft Research & U Michigan Jan Van den.
Introduction to ASMs Dumitru Roman Digital Enterprise Research Institute
MATH 224 – Discrete Mathematics
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
CS6133 Software Specification and Verification
Formal Semantics of Programming Languages 虞慧群 Topic 3: Principles of Induction.
Many Sorted First-order Logic Student: Liuxing Kan Instructor: William Farmer Dept. of Computing and Software McMaster University, Hamilton, CA.
Rewriting Logic Model of Compositional Abstraction of Aspect-Oriented Software FOAL '10Mar. 15, 2010 Yasuyuki Tahara, Akihiko Ohsuga The University of.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
LDK R Logics for Data and Knowledge Representation PL of Classes.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
Mathematical Preliminaries
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications Chapter.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
Operational Semantics Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 2 Sets and Functions.
PDAs Accept Context-Free Languages
NPDAs Accept Context-Free Languages
Logics for Data and Knowledge Representation
Alternating tree Automata and Parity games
MA/CSSE 474 More Math Review Theory of Computation
This Lecture Substitution model
Program correctness Axiomatic semantics
Presentation transcript:

A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1

S OME R EVIEW AND R EMINDER ASM is a transition system where each state is an Algebra. An algebra A consists of a non empty set U a (its universe), together with a finitely many functions defined over U a, each with a fixed arity. Therefore, each state of an ASM may naturally include any mathematical data structure that can be described in terms of logic (sets, real numbers, uncomputable function, etc.). A class S of ASMs maybe characterized by answering the following question: Which transition system can be represented by the ASMs in S? 2

Gurevich Answers this question for the class of sequential ASMs. He defines a class of transition systems which he calls sequential algorithms by the next axioms, and proves this class to be equivalent to sequential ASMs : 1. A sequential algorithm consists of a set of states S, a set of initial states, and a next-state function k :S  S. 2. Each state is an algebra 3. preserves the universe of states 4. S and J are closed under isomorphism, and preserves isomorphism 5. A finite set of ground terms is sufficient to characterize In this presentation we define the class of non- deterministic algorithms by 5 axioms, when the first 4 are basically an extension of Gurevich’s original axioms. 3

A XIOM N1 A non-deterministic algorithm N consists of: A set of states S N A set of initial states A next – state relation Each pair is a step on N. A run of N is a sequence A 0 A 1 A 2 … of states with k and for all indices i. This axiom actually assumes that a non-deterministic can be represented by a transition system. 4

S OME NOTIONS Algebras are general enough to describe any static mathematical entity A signature ∑ is used to address to the functions of an algebra, it consists of function symbols. An Algebra A is a ∑-algebra if A determines for each n-ary function symbol f, a unique function f a As an algorithm always has a finite syntactical representation, therefore, a single signature is suffice for all states Which leads us to the 2-nd axiom: 5

A XIOM N2 For a nondeterministic algorithm N, all states in S N are Algebras over the same signature ∑ N 6

S OME MORE NOTIONS The elements of a universe U a of an algebra A are atomic and foundational objects that cannot be decomposed, destroyed or created. Only the functions of A are modified. 7

As an example consider the Euclidian algorithm: it computes the greatest common divisor between two integers. The states of the algorithm are built over the universe of integers. The algorithm defines a new relationship between the integers, but non of the computation in this algorithm add or remove integers from its universe. What leads us to: 8

A XIOM N3 For a nondeterministic algorithm N, the following holds: for each step (A,A’) of N, A and A’ have the same universe 9

S OME MORE NOTIONS As we already seen in previous lectures, Isomorphic algebras only differ I their concrete representation of the universe The functions of both algebras are essentially the same In general, the algorithm does not distinguish isomorphic states This insight is formalized by: 10

A XIOM N4 For a nondeterministic algorithm N, the following holds: (i) S N and J N are closed under isomorphism (ii) Let (A,A’) be a step of N and let with an isomorphism. Then there is a step (B,B’) of N such that is an isomorphism. 11

S OME ADDITIONAL NOTIONS Every real-world processor we know, such as a computer, a human being, performs only bounded time of work each step. It is quite natural then, to require an algorithm to limit the amount of work to be done in each step. 12

As we already seen, for a step (A,A’), A and A’ only differ in their function values For convenience, in order to represent such differences formally, we will now consider a state A as a set of location-value-triples. A location consists of n-ary function symbol f, and n-ary argument tuple a. Each location (f,a) of A defines a unique value v=f A (a). 13

A triple (f,a,v) represents a small component of A which we call a molecule of A. A state is completely described by a set of molecules. 14

In order to formalize the idea of “performing bounded work in each step”, we should only allow a bounded part of A to contribute to each step. We call each a subset of A A substep changes a substate M by updating the values of the molecules in M 15

In order to capture the “amount of work” performed by a step of N: Each step (A,A’) is decomposed into a substep (M,M’) and a substate E such that: In this case, the substep (M,M’) describes the actual work performed by the step We call (A,A’) a completion of (M,M’) 16

A “bounded amount of work then is captured by a substep bounded in size: for a natural number k, a substep (M,M’) is k- bounded iff |M|< k We are now able to formulate the final axiom stating that the steps of a nondeterministic algorithm performs only bounded substeps: 17

A XIOM N5 For a nondeterministic algorithm N there exists a constant and a set W of k- bounded substeps such that for all states A,A’ of N, the following holds: (A,A’) is a step of N iff (A,A’) is an completion of a substep in W We call W a bounded-work witness of N. 18

From now on, we call any entity satisfying the Axioms N1-N5 a nondeterministic algorithm. This raises the question, is there a language expressive enough to describe any nondeterministic algorithm? In the following we answer this question positively by presenting to you the nondeterministic ASMs. 19

We start by introducing the syntax and semantics of nondeterministic ASM rules which form the syntactical basis of nondeterministic ASMs introduced afterwards 20

A SSIGNMENT RULES ∑-terms are constructed inductively from a signature ∑ and a set of variables V Given a ∑-algebra A and a variable assignment, each ∑-term t is evaluated to a unique value Terms are used to form assignment rules which update a single function value of an algebra 21

The general form of an assignment rule is: f(t 1,…,t n ):=t’ where t 1,…,t n and t’ are ∑-terms, and f is n-ary function symbol of ∑. Applied at a state A and variable assignment kj, the rule updates the value of the function symbol at f at the argument jkjkjk by the value ASM may update a few locations each time, that is represented by an update set. 22

C ONDITIONAL RULES The general form of a conditional rule is: if then ASSIGN Where is a Boolean formula and ASSIGN is an assignment rule. ASSIGN is executed if the condition is satisfied by A and, otherwise the state stays untouched. For technical convenience, we assume every assignment rule has a special conditional rule whose condition holds in every state. 23

P ARALLEL R ULES Several condition rules nay be executed simultaneously, which is represented by a parallel rule. The general form of an assignment rule Par is: par Cond 1 …Cond n endpar Where Cond 1 …Cond n are conditional rules. Executing Par at a state A and variable assignment will result in a simultaneous execution of the updates performed by Cond 1 …Cond n. For technical convenience, we assume every conditional Cond as a parallel rule par Cond endpar. 24

C HOICE R ULES Choice rule allow nondeterministic choice of elements of the universe of a state. The general form of a choice rule is: Choose x 1,…,x n with do Par Where x 1,…,x n are variables, is a Boolean formula, and Par is a parallel rule such that and Par contain only variables from {x 1,…,x n }. 25

First, for a given state A, the choice rule chooses nondeterministically a variable assignment, such that is satisfied by A and. Then Par is executed by use of the variable assignment. 26

N ONDETERMINISTIC ASM S In conclusion, ASM M consists of: A signature ∑ M A set of ∑ M -algebras S M, closed under isomorphism (the states of M) A set J M S M, closed under isomorphism (the initial states of M) A choice rule CHOICE built over the signature ∑ M. 27

T HE E QUIVALENCE T HEOREM Nondeterministic algorithms and non- deterministic ASMs describe the same set of transition systems. 28 Now, let’s prove it!

P ART 1 OF THE PROOF We need to show that every nondeterministic ASM represents a nondeterministic algorithm. Let M be a nondeterministic ASM with CHOICE its choice rule. All we need to do is to verify that M satisfies the axioms N1-N5. 29

Axioms N1 and N2 are satisfied by the definition of nondeterministic ASMs. Axioms N3 and N4 are properties of the semantics of CHOICE that are easily verified. Axiom N5 holds due to the fact that in each step (A,A’)of M, CHOICE access and modifies only a bounded subset of A. 30

P ART 2 OF THE PROOF We need to show that every nondeterministic algorithm can be represented by a nondeterministic ASM. Let N be a nondeterministic algorithm. Let W be a bounded work witness for N. 31

L EMMA 1 Let and let. Then (A,A’) is a completion of (M,M’) iff and. 32

L EMMA 2 Let denote the next state computed by Par at state A and variable assignment. Let Par be a parallel rule over a signature ∑, let A,B be a ∑-algebras with an isomorphism i: A  B, and let be a variable assignment with values in U A. Then khkhkhkhkhkhkhkh also is an isomorphism. 33

L EMMA 3 Let (A,A’) be a step of N. Then there is a choice rule CHOICE such that and implies for all states B,B’ of N. 34

P ROOF OF L EMMA 3 By axiom N5, there exists a subset such that (A,A’) is a completion of (M,M’). Let denote the elements of the universe of A occurring in M and M’. As the size of M is bounded, V is finite. For each element, choose a unique variable x v. 35

Define the Boolean formulas and by: 36

Construct for each molecule the assignment rule. Combine all these assignment rules to a single parallel rule Par. Let v 1,…,v n be the elements in V. Define CHOICE as: choose with do Par According to axiom N5, the size of M and M’ is bounded by a constant k. Consequently, the size of CHOICE also is bounded by a constant c. 37

We first show that : Let be the variable assignment defined by for all. Then and are satisfied by A and. Further, by construction of Par, we have kjkjkjkjkjk. There fore,, by Lemma 1, 38

Finally, let B,B’ be states of N such that hlhlhlhlhlhlhlh We need to show that As, there is a variable assignment such that and are satisfied at B and, and. Construct from B an isomorphic state C: for each, replace the element by v, and replace every other element in U B by a new element not contained in U B. This construction is well defined. Let i: B  C be the corresponding isomorphism. 39

As is satisfied by B and, one can show that. By construction of Par, we have = M’. Let. By lemma 2, is an isomorphism. As B,B’ are states of N, Axiom N4 implies that C,C’ also are states of N. As and by definition of we conclude. 40

As, lemma 1 implies that (C,C’) is a completion of (M,M’). By axiom N5, (C,C’) is a step of N. As, and are isomorphisms, Axiom N5 implies that (B,B’) also is a step of N 41

L EMMA 4 Let CHOICE 1,…CHOICE n be choice rules. Then there exists a single choice rule Union such that CHOICE is the union of CHOICE 1,…CHOICE n. The proof is by presenting a nested choice rule, when every nested choice rule can be transformed in an un-nested choice rule. 42

F INAL PROOF OF THE THEOREM For all steps (A,A’), derive a choice rule CHOICE (A,A’) by applying Lemma 3. Let S be the set of all these choice rules By lemma 4, let CHOICE be the union of all choice rules. Then for all states A,A’ of N, we have iff 43 The end!