Causality Interfaces and Compositional Causality Analysis

Similar documents
Causality Interfaces for Actor Networks

Using the Principles of Synchronous Languages in Discrete-event and Continuous-time Models

Concurrent Semantics without the Notions of State or State Transitions

Using the Principles of Synchronous Languages in Discrete-event and Continuous-time Models

-- Technical Memorandum UCB/ERL M97/11 --

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016

CPO Semantics of Timed Interactive Actor Networks

Fundamental Algorithms for System Modeling, Analysis, and Optimization

A PRELIMINARY VERSION OF A DENOTATIONAL FRAMEWORK FOR COMPARING MODELS OF COMPUTATION. Abstract

Semantic Foundation of the Tagged Signal Model

A DENOTATIONAL SEMANTICS FOR DATAFLOW WITH FIRING. Abstract

Concurrent Models of Computation in System Level Design

Algebraic Trace Theory

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Algebraic Trace Theory

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EE249 - Fall 2012 Lecture 18: Overview of Concrete Contract Theories. Alberto Sangiovanni-Vincentelli Pierluigi Nuzzo

Relational Interfaces and Refinement Calculus for Compositional System Reasoning

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014

Concurrent Models of Computation

Towards a Denotational Semantics for Discrete-Event Systems

Embedded system design with the Polychronous paradigm Albert Benveniste Inria/Irisa

Operational Semantics of Hybrid Systems

The Semantics of Dataflow with Firing

Definability in Boolean bunched logic

Synchronous Reactive Systems

03 Review of First-Order Logic

UML modeling for INF5150

Homogeneous Semantics Preserving Deployments of Heterogeneous Networks of Embedded Systems

Model Checking: An Introduction

Actors without Directors: A Kahnian View of Heterogeneous Systems

Modeling and Analysis of Communicating Systems

Component-Based Construction of Deadlock-Free Systems

Lecture 2: Axiomatic semantics

Combinational Logic Design Principles

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:

Deductive Verification

Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems

CHAPTER 6. Copyright Cengage Learning. All rights reserved.

A Fixed Point Representation of References

A Modular Formal Semantics for Ptolemy 1 2

Modal Logics. Most applications of modal logic require a refined version of basic modal logic.

A Programming Model for Time-Synchronized Distributed Real-Time Systems

Reasoning about Contracts

An Introduction to Modal Logic III

A framework for modeling the distributed deployment of synchronous designs

Structuring Safety Requirements in ISO using Contract Theory

Causality and Scheduling Constraints in Heterogeneous Reactive Systems Modeling

Equalities and Uninterpreted Functions. Chapter 3. Decision Procedures. An Algorithmic Point of View. Revision 1.0

A BOUNDARY NOTATION FOR VISUAL MATHEMATICS Jeffrey James and William Bricken September Published in IEEE Visual Languages'92 ABSTRACT

Embedded Systems 5. Synchronous Composition. Lee/Seshia Section 6.2

Lecture 4 Event Systems

N-Synchronous Kahn Networks A Relaxed Model of Synchrony for Real-Time Systems

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

ONE of the key ideas in system engineering

Introduction to Embedded Systems

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

A Deterministic Logical Semantics for Esterel

The AADL behavior annex - experiments and roadmap

Hybrid Systems Modeling Challenges caused by CPS

Refinement-Robust Fairness

Bridging the Gap between Reactive Synthesis and Supervisory Control

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

Formal Verification. Lecture 1: Introduction to Model Checking and Temporal Logic¹

Partial model checking via abstract interpretation

Sémantique des jeux asynchrones et réécriture 2-dimensionnelle

Finite-State Model Checking

Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs. Mladen Skelin.

Automata-Theoretic Model Checking of Reactive Systems

Towards a formal language for systemic requirements

Topics in Concurrency

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Interface Input/Output Automata Larsen, Kim Guldstrand; Nyman, Ulrik Mathias; Wasowski, Andrzej

18.175: Lecture 2 Extension theorems, random variables, distributions

First Order Logic vs Propositional Logic CS477 Formal Software Dev Methods

Benefits of Interval Temporal Logic for Specification of Concurrent Systems

A Brief Introduction to Model Checking

2. Introduction to commutative rings (continued)

Introduction to Kleene Algebras

Towards a Bigraphical Encoding of Actors

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Mapping to Parallel Hardware

Artificial Intelligence

Logic Model Checking

Topics in Concurrency

Interfaces for Stream Processing Systems

Applications of Petri Nets

Interchange Semantics For Hybrid System Models

A Compositional Approach to Bisimulation of Arenas of Finite State Machines

DES. 4. Petri Nets. Introduction. Different Classes of Petri Net. Petri net properties. Analysis of Petri net models

Modeling Synchronous Systems in BIP

Correlated Information: A Logic for Multi-Partite Quantum Systems

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

On the satisfiability problem for a 4-level quantified syllogistic and some applications to modal logic

Static Program Analysis using Abstract Interpretation

Lectures on Separation Logic. Lecture 2: Foundations

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Review for B33DV2-Digital Design. Digital Design

Transcription:

Causality Interfaces and Compositional Causality Analysis Edward A. Lee Haiyang Zheng Ye Zhou {eal,hyzheng,zhouye}@eecs.berkeley.edu Center for Hybrid and Embedded Software Systems (CHESS) Department of Electrical Engineering and Computer Sciences University of California at Berkeley Workshop on Foundations of Interface Technologies Satellite to CONCUR 2005 Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 1 / 34

Objectives Focus on concurrent software components: actors, which are in charge of their actions objects, which are acted upon Develop causality interfaces for actors in actor-oriented design and an algebra for composing these interfaces. Deploy causality interfaces to determine existence and uniqueness of behaviors of compositions of actors under certain models of computation. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 2 / 34

Outline 1 Actor-Oriented Design 2 Causality The Tagged Signal Model Composition of Actors 3 Causality Interfaces Definitions Compositional Analysis Dynamic Causality Interfaces Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 3 / 34

Outline 1 Actor-Oriented Design 2 Causality The Tagged Signal Model Composition of Actors 3 Causality Interfaces Definitions Compositional Analysis Dynamic Causality Interfaces Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 4 / 34

Actor-Oriented Design Offers complementary approaches (to object-oriented design) for modeling compositions of concurrent components. Object orientation: Actor orientation: call class name data methods return actor name data (state) parameters ports Input data Output data what flows through an object is sequential control. what flow through an actor are streams of data. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 5 / 34

Models of Computation The patterns of interactions between concurrent components are called models of computation. Classical actor model [Agha, 1990][Hewitt, 1977] Synchronous languages [Benveniste, Berry, 1991] Discrete event models [Cassandras, 1993] Dataflow models Kahn-MacQueen process networks [Kahn, MacQueen, 1977] Dennis-style dataflow [Dennis, 1974] Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 6 / 34

Interfaces for Actors Analogous to the type signatures of an abstract data type in object-oriented design: Static structure interface: ports parameters their type constraints Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 7 / 34

Richer Interfaces for Actors Interaction semantics [Talcott, 1996] Behavioral subtyping [Liskov, Wing, 1999] Interface theories [de Alfaro, Henzinger, 2001] Behavioral type systems [Lee, Xiong, 2004] Abstract behavioral types [Arbab, 2005] Note These interface theories cover behavioral properties, not just static structure. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 8 / 34

Causality Interfaces for Actors A special family of behavioral interfaces that capture the causality properties of actors, which reflect the dependency of particular outputs having on particular inputs. Useful for determining existence and uniqueness of behaviors of compositions under certain models of computation. Related to causalities properties of stream functions in [Broy, 1995] Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 9 / 34

Outline 1 Actor-Oriented Design 2 Causality The Tagged Signal Model Composition of Actors 3 Causality Interfaces Definitions Compositional Analysis Dynamic Causality Interfaces Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 10 / 34

The Tagged Signal Model We use a formal and denotational framework for studying and comparing actor-oriented models of computation, which is called the Tagged Signal Model [Lee, Sangiovanni-Vincentelli, 1998]. Related to Interaction semantics [Talcott, 1996] Behavioral types [Arbab, 2005] Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 11 / 34

Actors, Formally signals Event e: (t, v) pair, where t T and v V. T is a partially or totally ordered set. V is a set of possible values. e E = T V, where E := the set of all events. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 12 / 34

Actors, Formally signals Signal s: a set of events For example, a token stream of infinite length s E, S := the set of all signals. s S = P(E), the power set. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 13 / 34

Actors, Formally signals An actor operates on signals. Behavior σ: a total function from ports to signals Actor a: a set of behaviors σ : P S, a [P a S]. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 14 / 34

Actors, Formally P i P o signals Functional actor: has input ports P i and output ports P o defines a function from input behaviors to output behaviors F a : [P i S] [P o S]. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 15 / 34

Composition of Actors Actors are composed by connecting ports with connectors. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 16 / 34

Composition of Actors the same signal A connector c between ports P c is the constraint on ports. It is also a set of behaviors. c [P c S] σ c, s S s.t. p P c, σ(p) = s Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 17 / 34

Composition of Actors A composition behavior is the intersection of the actor and connector behaviors. a b c = {σ σ Pa a and σ Pb b and σ Pc c}. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 18 / 34

Example of Composition series composition parallel composition feedback composition Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 19 / 34

Feedback Composition Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 20 / 34

Fixed Point Behavior Recall that F a denotes the behaviors of actor a: F a : [P i S] [P o S], P i P o = P a The input behavior of the left feedback composition is a function: f : {p1, p2, p3} S. The above behavior is a fixed point of F a. That is, F a (f ) = f. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 21 / 34

Questions about Fixed Point Behavior F a (f ) = f Problem (1) Does such a fixed point f exist? Problem (2) Is the fixed point f unique? Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 22 / 34

Causality is the Key Synchronous Languages No causality loop. Discrete-Event Models Contraction map. Dataflow Models No deadlock. The key is to determine the causality properties of actor a from the causality properties of its components, the actors and connectors contained inside. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 23 / 34

Outline 1 Actor-Oriented Design 2 Causality The Tagged Signal Model Composition of Actors 3 Causality Interfaces Definitions Compositional Analysis Dynamic Causality Interfaces Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 24 / 34

Causality Interfaces D is an ordered set with elements called dependencies. A causality interface for an actor a with input ports P i and output ports P o is a function δ a : P i P o D A causality interface for a connector c that links output ports P o to input ports P i is a function δ c : P o P i D Interpretation δ(p 1, p 2 ) denotes the dependency that port p 2 has on p 1. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 25 / 34

Dependency Set D as an Algebra D is an ordered set with two binary operations and that satisfy the axioms given below. Axioms of D (Associativity) d 1, d 2, d 3 D, (d 1 d 2 ) d 3 = d 1 (d 2 d 3 ), d 1, d 2, d 3 D, (d 1 d 2 ) d 3 = d 1 (d 2 d 3 ). (Commutativity) (Distributivity) d 1, d 2 D, d 1 d 2 = d 2 d 1, d 1, d 2 D, d 1 d 2 = d 2 d 1. d 1, d 2, d 3 D, d 1 (d 2 d 3 ) = (d 1 d 2 ) (d 1 d 3 ). (Null and Identity Elements) 0, 1 D, such that d D, d 0 = d, d d = d, d 0 = 0, d 1 = d. H. Zheng Causality Interfaces and Compositional Causality Analysis FIT 2005 24 / 27 Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 26 / 34

Examples of Dependency Sets Boolean Dependencies D = {true, false}, where false < true, 0 = true, and 1 = false. is logical and, is logical or. δ(p 1, p 2 ) = false means that P 2 depends immediately on P 1. Weighted Dependencies 1 D = R + { }, where < is as usual, 0 =, and 1 = 0. is the minimum function, is addition. δ(p 1, p 2 ) = 0 means that P 2 depends immediately on P 1. The identity, 1, means immediate dependency. 1 This set is also called a min-plus algebra [Baccelli, 1992]. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 27 / 34

Compositional Analysis Problem Given a set of actors, a set of connectors, and their causality interfaces, determine the causality interface of their composition. In the following example, we want to determine the function: δ a : {p1} {p4} D. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 28 / 34

Solving the Example Causalities interfaces of actors: δ 1 (p1, p5) = 1 δ 3 (p7, p6) = 1 δ 2 (p3, p4) = 1 δ 2 (p2, p4) 1 Causalities interfaces of connectors: p P o, p P i, P i P o = P c, δ c (p, p ) = 1 Combine the interfaces of connectors and actors using the operator for series compositions and the operator for parallel compositions. δ a (p1, p4) = δ 1 (p1, p5) (δ c (p5, p2) δ 2 (p2, p4) δ c (p5, p7) δ 3 (p7, p6) δ c (p6, p3) δ 2 (p3, p4)) = 1 Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 29 / 34

Existence and Uniqueness of Behaviors Problem Given the causality properties of a composition of a set of actors and connectors, determine the existence and uniqueness of the behaviors of the composition. A unique behavior exists if there exists no port that has an immediate dependency ( identity, 1 ) on itself. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 30 / 34

Application to Synchronous Languages Apply boolean dependencies, where 0 = true and 1 = false. Note that is logical and, is logical or. A unique behavior exists if there exists no port that has a dependency on itself with value false. δ(p4, p4) = δ c (p4, p1) δ a (p1, p5) δ c (p5, p2) (δ a (p2, p4) δ a (p2, p6) δ c (p6, p3) δ a (p3, p4)) = false false false (true false false false) = false. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 31 / 34

Application to Discrete-Event Models Apply weighted dependencies, where 0 = and 1 = 0. Note that is the minimum function, and is addition. A unique behavior exists if there exists no port that has a dependency on itself with value 0. δ(p4, p4) = δ c (p4, p1) δ a (p1, p5) δ c (p5, p2) (δ a (p2, p4) δ a (p2, p6) δ c (p6, p3) δ a (p3, p4)) = 0 0 0 (2.0 0 0 0) = 0. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 32 / 34

Dynamic Causality Interfaces Causality interfaces of a modal mode may vary due to the change of its internal states. Let X denote the set of states, then the causality interfaces are given by a function δ : P i P o X D. A simple static and conservative analysis approach: for an input port p i P i and an output port p o P o of an actor, δ(p i, p o ) = x X δ (p i, p o, x). This simple method may be too conservative in practice. A more precise static analysis may not be always available. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 33 / 34

Summary An interface theory for causality interfaces of actors and their composition. Applications to determining existence and uniqueness of behaviors for synchronous languages and discrete-event models. Lee, Zheng, Zhou Causality Interfaces and Compositional Causality Analysis FIT 2005 34 / 34