Rebecca Modeling Language

18
Rebecca Modeling Language Mahdieh Ahmadi Verification of Reactive Systems March 2014

description

Rebecca Modeling Language. Mahdieh Ahmadi Verification of Reactive Systems March 2014. Outline. Motivation Actor-based Language Rebeca Syntax Semantics Compositional Verification of Rebeca Supporting Tools. Motivation. Establishing a F ormal verification method, - PowerPoint PPT Presentation

Transcript of Rebecca Modeling Language

Page 1: Rebecca Modeling Language

Rebecca Modeling LanguageMahdieh AhmadiVerification of Reactive SystemsMarch 2014

Page 2: Rebecca Modeling Language

Rebeca Modeling Language2

Outline• Motivation• Actor-based Language Rebeca• Syntax• Semantics• Compositional Verification of Rebeca• Supporting Tools

March 2014

Page 3: Rebecca Modeling Language

Rebeca Modeling Language3

Motivation

March 2014

Establishing a• Formal verification method, • Easy to use for software engineers

For developing reliable systems in concurrent and distributed applications.

Formal verification method:Modeling language + Verification mechanism

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 4: Rebecca Modeling Language

Rebeca Modeling Language4

Motivation :: Idea• Popularity of Object Oriented Design Between Practitioners•Actor-based modeling language

• Abstraction and Modular Verification•Plus component notation•Asynchronous message passing•No shared variables

• Formal Verification Support•Tools for direct verification

March 2014

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 5: Rebecca Modeling Language

Rebeca Modeling Language5

Actor-based Language Rebeca :: Actor• A reference model for concurrent computation

• Consisting of concurrent, distributed active objects

Proposed by Hewitt as an agent-based language (MIT, 1971)

Developed by Agha as a concurrent object-based language (Illinois, since 1984)

March 2014

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 6: Rebecca Modeling Language

Rebeca Modeling Language6

Actor-based Language Rebeca :: Rebeca• Reactive object language

• Bridge the gap between formal verification approaches and real applications

Introduced by Sirjani and Movaghar, 2001

March 2014

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 7: Rebecca Modeling Language

7

Actor-based Language Rebeca :: Rebeca:: Key Features• Independent active objects• Asynchronous message passing• Unbounded buffers for messages• Dynamically changing topology• Dynamic creation of active objects

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 8: Rebecca Modeling Language

8

Actor-based Language Rebeca :: Rebeca:: Added Features• Add class declarations to the syntax : Rebecs•Encapsulation of data and process, no shared variable

• Grouping a set of reactive objects as an open component• Allow a set of more tightly coupled objects to be

grouped as a component• A higher level of abstraction in software design

• Tool supported•Model checking Rebeca code using back-end model checkers•Direct Verification capability using RMC

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 9: Rebecca Modeling Language

9

Syntax• Actor-based computational model•Units of concurrency and distribution: Reactive objects •Simple and natural• Objects are threads.

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 10: Rebecca Modeling Language

Rebeca Modeling Language10

Syntax• Communication:

•Asynchronous message passing•Unbounded message queue for each rebec•No explicit receive

• Computation:•Take a message from top of the queue and execute it•Event-driven

Introduced by Sirjani and Movaghar, 2001

March 2014

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 11: Rebecca Modeling Language

11

Syntax

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Set of Reactive ClassesInitial

ConfigurationUpper bound on the Length

of the Message QueueInitial Communication

Topology of the System

Page 12: Rebecca Modeling Language

12

Syntax :: Example

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 13: Rebecca Modeling Language

13

Semantics

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

• Formal semantics• Labeled transition system• A solid basis for verification

• The state of a rebec, is the valuation of• state variables, and• the unbounded buffer (queue) for incoming messages.

• The state of the system, is the product of• local object states

• A state transition: • an atomic execution of a method off the top of the rebec’s queue.

Page 14: Rebecca Modeling Language

14

Compositional Verification of Rebeca :: Inherent Modularity in Rebeca• Only consider LTL and ACTL properties• State explosion problem• Solution: •Modularity•Abstraction

• Rebecs are inherently • Independent, decoupled, encapsulated

=> Leads to natural modularity and abstraction techniques

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 15: Rebecca Modeling Language

15

Compositional Verification of Rebeca :: Components• What we had: •Decomposing a model for verification purposes• In a top-down manner.

• What we added: •Notion of components•Re-usable parts•Fixed proven specifications •Build a system in bottom-up fashion

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 16: Rebecca Modeling Language

16

Compositional Verification of Rebeca• Decompose a model into components,• Verify some specific properties for these components,

and then deduce the system’s property from the properties of its components.• Components are sets of reactive objects• Components interact•via broadcasting •asynchronous•anonymous messages

March 2014 Rebeca Modeling Language

Motivation

Actor-based

Language Rebeca

Syntax

Semantics

Compositional

Verification of

Rebeca

Supporting Tools

Page 17: Rebecca Modeling Language

Supporting Tools• Enter a model in Rebeca,

• Translate it into SMV (or Promela),• Specify properties at Rebeca source code level (based on

state variables),• Translate the properties to NuSMV (or Spin) format,• Model check using NuSMV (or Spin).• Direct model Checking of Rebeca

March 2014 Rebeca Modeling Language17

MotivationActor-based Language Rebeca

Syntax SemanticsComposition

al Verification of Rebeca

Supporting Tools

Direct model Checking of Rebeca

Page 18: Rebecca Modeling Language

References• Marjan Sirjani, Ali Movaghar, Amin Shali, and Frank S. de

Boer. 2004. Modeling and Verification of Reactive Systems using Rebeca. Fundam. Inf. 63, 4 (June 2004), 385-410.• Marjan Sirjani and Mohammad Mahdi Jaghoori. 2011. Ten

years of analyzing actors: Rebeca experience. In Formal modeling, Gul Agha, José Meseguer, and Olivier Danvy (Eds.). Springer-Verlag, Berlin, Heidelberg 20-56.

March 2014 Rebeca Modeling Language18

MotivationActor-based Language Rebeca

Syntax SemanticsComposition

al Verification of Rebeca

Supporting Tools