Formal specification in Event-B

Size: px
Start display at page:

Download "Formal specification in Event-B"

Transcription

1 2IW80 Software specification and architecture Formal specification in Event-B Alexander Serebrenik, Ulyana Tikhonova

2 Outline Introduction into formal specification Mathematical notation of Event-B Event-B UML-B / SET / W&I 2

3 Resources Summary of the Event-B notation: Tutorials Modeling in Event-B: System and Software Engineering by Jean-Raymond Abrial Repository of Event-B examples: mples / SET / W&I 3

4 Formal specification and formal analysis Formal = mathematical Mathematical notation Theory behind the notation Validation Are we cooking the right product? Verification Are we cooking it right? / SET / W&I 4

5 Formal methods as a specification technique? Unambiguous? Realistic? Verifiable? Evolvable? / SET / W&I 6

6 Event-B Z, B method, Event-B Event-B formalism uses set theory and logic has an extensive tool support relatively simple, but not very expressive / SET / W&I 7

7 Outline Introduction into formal specification Mathematical notation of Event-B Event-B UML-B / SET / W&I 8

8 Predicates Logical primitives:, Logical operators:,,, Quantifiers: x 1, x n P(x 1, x n ) x 1, x n P(x 1, x n ) Equality and inequality: =, / SET / W&I 9

9 Sets Predefined sets: N, Z, BOOL Interval: m..n Sets: {expr 1,, expr n } { x P E } { x x x ^ 2 } partition(s, {expr 1 },, {expr n }) partition(course_2iw80, {Tuesday}, {Thursday}) / SET / W&I 11

10 Sets Membership: a1 S, a4 S Subsets: {a1, a2} S, {b1, b2} S Operations on sets: S T, S T, S T Power sets: P(S) P(S) / SET / W&I 12

11 Is it true or false? { 2..2} \ {0} { x, y x Z y Z x y = 12 x } a. b. / SET / W&I 13

12 Relations Cartesian product A B Pair: a1 b2 Relations: A B, Domain and range: dom(r), ran(r) Relational image r[{a1, a3}] is {b1,b2,b4} / SET / W&I 16

13 Functions Functions: A B, A B, / SET / W&I 17

14 Outline Introduction into formal specification Mathematical notation of Event-B Event-B UML-B / SET / W&I 18

15 File system example In the file system, users can create new files, execute, display (on different output devices) and delete existing files. There is a special type of delete, which removes the file permanently from the file system. The file system makes use of an access right system which specifies who the owner of each file is and what operations are allowed by which users. The owner of each file may change the access rights to the file and give or take other people s permissions to access the file. In addition to the person who creates the file, the administrator is considered the owner of all files. Identify sets and relations / SET / W&I 19

16 What are the sets? In the file system, users can create new files, execute, display (on different output devices) and delete existing files. There is a special type of delete, which removes the file permanently from the file system. The file system makes use of an access right system which specifies who the owner of each file is and what operations are allowed by which users. The owner of each file may change the access rights to the file and give or take other people s permissions to access the file. In addition to the person who creates the file, the administrator is considered the owner of all files. User, File, Operation / SET / W&I 20

17 Sets and subsets User, File, Operation existing_files File opened_files existing_files current_user User partition(operation, {Execute}, {Display}, {Delete}, {Delete_permanently}) User current_user File existing_files opened_files / SET / W&I 21

18 What are the relations? In the file system, users can create new files, execute, display (on different output devices) and delete existing files. There is a special type of delete, which removes the file permanently from the file system. The file system makes use of an access right system which specifies who the owner of each file is and what operations are allowed by which users. The owner of each file may change the access rights to the file and give or take other people s permissions to access the file. In addition to the person who creates the file, the administrator is considered the owner of all files. owner existing_files User access User (Operation existing_files) / SET / W&I 22

19 Relations owner existing_files User access User (Operation existing_files) Operation User access Operation existing_files owner existing_files / SET / W&I 23

20 Other possibilities sets User, File existing_files File owner existing_files P(User) access_display existing_files P(User) access_execute existing_files P(User) access_delete existing_files P(User) access_delete_permanently existing_files P(User) / SET / W&I 24

21 Access control invariant existing_files File opened_files existing_files current_user User access User (Operation existing_files) opened { file Display file access[{current_user}] file } / SET / W&I 25

22 File system specified in Event-B / SET / W&I 26

23 File system specified in Event-B deterministic assignment / SET / W&I 27 some User (nondeterministic assignment)

24 File system specified in Event-B: verification inv6: opened { file Display file access[{current_user}] file } / SET / W&I 28

25 File system specified in Event-B: verification New guard: grd2 inv6: opened { file Display file access[{current_user}] file } / SET / W&I 29

26 Specification in Event-B: context component Context Sets data types Constants Axioms MANDATORY: types of constants properties that are assumed to be true / SET / W&I 30

27 Specification in Event-B: machine component Machine sees a context Variables whose values are changed by events Invariants MANDATORY: types of variables properties that need to be checked Events parameters (ANY) guards (WHERE) actions (THEN), executed in parallel / SET / W&I 31

28 Exercise for you: create file and delete file sets File, User, Operation existing_files File opened_files existing_files current_user User owner existing_files User access User (Operation existing_files) / SET / W&I 32

29 Create file / SET / W&I 33

30 Delete file Is it correct? / SET / W&I 34

31 Delete file: verification problems / SET / W&I 35

32 Delete file: improved version Domain and range restrictions / SET / W&I 36

33 Exercise for you: delete file permanently recycle_bin / SET / W&I 37

34 Exercise for you: delete file permanently recycle_bin File recycle_bin existing_files = What events need to be changed? / SET / W&I 38

35 Exercise for you: change access rights Is it correct? Relational override: r1 r2 = {x y x y r1 x dom(r2)} r2 / SET / W&I 39

36 Change access right: verification problems How would you repair this? inv6: opened { file Display file access[{current_user}] file } / SET / W&I 40

37 Change access right: how to repair? inv6: opened { file Display file access[{current_user}] file } Can the access rights to the file be changed when this file is opened? Or: to change access right to a file, this file should be closed Does an owner have the access to display files that he/she owns? Shall we add this to our invariants and guards? / SET / W&I 41

38 Rodin platform Event-B editor Write your specification Proof obligations Generated automatically for each pair from Invariants Events Discharged by automatic provers Model checking Animation of machines Execute your specification Graphical visualization / SET / W&I 42

39 Outline Introduction into formal specification Mathematical notation of Event-B Event-B UML-B / SET / W&I 44

40 UML-B Draw UML diagrams Class diagrams State machine diagrams Generate Event-B specification iuml-b plug-in / SET / W&I 45

41 State machine diagrams in iuml-b / SET / W&I 46

42 Generated Event-B specification Event-B is generated from the state machine! / SET / W&I 47

43 Generated Event-B specification / SET / W&I 48

44 Nested state machine / SET / W&I 49

45 State invariant Added manually / SET / W&I 50

46 Animate state machine diagram / SET / W&I 51

47 What is behind your state machine animation? / SET / W&I 52

48 UML vs. formal specification Using UML we can: a. Draw pictures b. Analyze the system c. Communicate with developers and customers d. Design the system e. Generate source code / SET / W&I 53

49 UML vs. formal specification Using formal specification we can: a. Draw pictures b. Analyze the system c. Communicate with developers and customers d. Design the system e. Generate source code / SET / W&I 54

50 Formal methods as a specification technique? Unambiguous? Realistic? Verifiable? Evolvable? / SET / W&I 55

51 Formal methods as a specification technique? Unambiguous? yes, formal notation and formal theory Realistic? might require a lot of effort on modeling a correct system Verifiable? yes, formal methods Evolvable? real-life systems: a lot of details huge formal specifications, which are hard to maintain / SET / W&I 56

52 Brief recapitulation / SET / W&I 57

Event-B Course. 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol)

Event-B Course. 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol) Event-B Course 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol) Jean-Raymond Abrial September-October-November 2011 Outline 1 - Requirement Document - Refinement Strategy

More information

User Manual of the RODIN Platform

User Manual of the RODIN Platform User Manual of the RODIN Platform October 2007 Version 2.3 User Manual of the RODIN Platform Contents 1 Project 1 1.1 Project Constituents and Relationships........................... 1 1.2 The Project

More information

Cyber Physical System Verification Seminar: Event-B

Cyber Physical System Verification Seminar: Event-B Cyber Physical System Verification Seminar: Event-B Sebastian Schumb University of Kaiserslautern Embedded Systems Group s schumb10@cs.uni-kl.de 1 Introduction A Cyber-physical systems is a system of computer

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

The Event-B Modelling Notation

The Event-B Modelling Notation The Event-B Modelling Notation J.-R. Abrial October 2007 Version 1.5 The Event-B Modelling Notation Contents 1 Machines and Contexts 1 2 Events 2 3 Variant 3 4 Actions 3 5 Witnesses 4 6 Syntax of the Event-B

More information

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

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

Rodin: An Open Toolset for Modelling and Reasoning in Event-B

Rodin: An Open Toolset for Modelling and Reasoning in Event-B Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Rodin: An Open Toolset for Modelling and Reasoning in Event-B Jean-Raymond Abrial 1 and Michael Butler 2 and Stefan

More information

CS 1200 Discrete Math Math Preliminaries. A.R. Hurson 323 CS Building, Missouri S&T

CS 1200 Discrete Math Math Preliminaries. A.R. Hurson 323 CS Building, Missouri S&T CS 1200 Discrete Math A.R. Hurson 323 CS Building, Missouri S&T hurson@mst.edu 1 Course Objective: Mathematical way of thinking in order to solve problems 2 Variable: holder. A variable is simply a place

More information

From Event-B Models to Dafny Code Contracts

From Event-B Models to Dafny Code Contracts From Event-B Models to Dafny Code Contracts Mohammadsadegh Dalvandi, Michael Butler, Abdolbaghi Rezazadeh Electronic and Computer Science School, University of Southampton Southampton, United Kingdom {md5g11,mjb,ra3}@ecs.soton.ac.uk

More information

Software development using B method. Julien Cervelle LACL - UPEC

Software development using B method. Julien Cervelle LACL - UPEC Software development using B method Julien Cervelle LACL - UPEC Outline Introduction B abstract machine First order logic of set theory Substitutions Proof obligations Refinement Introduction B method

More information

Have we Learned from the Vasa Disaster?

Have we Learned from the Vasa Disaster? Have we Learned from the Vasa Disaster? Jean-Raymond Abrial ETH Zurich September 19th 2006 The Vasa Disaster 1 The Story 2 - August 10, 1628: The Swedish warship Vasa sank. - This was her maiden voyage.

More information

The Needham-Schroeder-Lowe Protocol with Event-B

The Needham-Schroeder-Lowe Protocol with Event-B The Needham-Schroeder-Lowe Protocol with Event-B (February 2011) (version 4) J.R. Abrial 1 1 Introduction This text contains the formal development (with proofs) of the Needham-Schroeder-Lowe Protocol

More information

1 of 7 7/15/2009 3:40 PM Virtual Laboratories > 1. Foundations > 1 2 3 4 5 6 7 8 9 1. Sets Poincaré's quote, on the title page of this chapter could not be more wrong (what was he thinking?). Set theory

More information

The Needham-Schroeder-Lowe Protocol with Event-B

The Needham-Schroeder-Lowe Protocol with Event-B The Needham-Schroeder-Lowe Protocol with Event-B J.R. Abrial 1 1 Introduction This text contains the formal development (with proofs) of the Needham-Schroeder-Lowe Protocol [1] [2] using Event-B [3] and

More information

Finding Deadlocks of Event-B Models by Constraint Solving

Finding Deadlocks of Event-B Models by Constraint Solving B 2011 June 21st, 2011, Limerick, Ireland Finding Deadlocks of Event-B Models by Constraint Solving Stefan Hallerstede, Michael Leuschel Institut für Informatik, Universität Düsseldorf Universitätsstr.

More information

Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain

Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain 1 / Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain Klaus Reichl, Thales Austria GmbH Luis Diaz, Thales España Grp, S.A.U. Dusseldorf, 2014-10-23 2 / Overview 1 2 3 4 5

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

Formal Methods. CITS5501 Software Testing and Quality Assurance

Formal Methods. CITS5501 Software Testing and Quality Assurance Formal Methods CITS5501 Software Testing and Quality Assurance Pressman, R. Software Engineering: A Practitioner s Approach. Chapter 28. McGraw-Hill, 2005 The Science of Programming, David Gries, 1981

More information

Some notes about Event-B and Rodin

Some notes about Event-B and Rodin Some notes about Event-B and Rodin Résumé This document briefly presents the language event-b and the tool Rodin. For a comprehensive presentation, refer to the event-b page http://www.event-b.org/, the

More information

Rodin: an open toolset for modelling and reasoning in Event-B

Rodin: an open toolset for modelling and reasoning in Event-B Int J Softw Tools Technol Transfer DOI 10.1007/s10009-010-0145-y VSTTE 2008 Rodin: an open toolset for modelling and reasoning in Event-B Jean-Raymond Abrial Michael Butler Stefan Hallerstede Thai Son

More information

Software Construction

Software Construction Software Construction The B Method - Event B J. Christian Attiogbé November 2008, maj 02/2011 J. Christian Attiogbé (November 2008, maj 02/2011) Software Construction 1 / 32 Plan Outline J. Christian Attiogbé

More information

Self-Recovering Sensor-Actor Networks

Self-Recovering Sensor-Actor Networks Self-Recovering Sensor-Actor Networks Maryam Kamali, Linas Laibinis, Luigia Petre, Kaisa Sere IT-Department, Åbo Akademi University, Turku, Finland {maryam.kamali,linas.laibinis,luigia.petre,kaisa.sere}@abo.fi

More information

Formal Verification of Distributed Transaction Execution in Replicated Database System using Event - B

Formal Verification of Distributed Transaction Execution in Replicated Database System using Event - B Formal Verification of Distributed Transaction Execution in Replicated Database System using Event - B Pooja Sharma Pranveer Singh Institute of Technology, Kanpur, U.P. (208020) U.P.T.U., Lucknow Raghuraj

More information

A Mechanically and Incremental Development of the Remote Authentication Dial-In User Service Protocol

A Mechanically and Incremental Development of the Remote Authentication Dial-In User Service Protocol A Mechanically and Incremental Development of the Remote Authentication Dial-In User Service Protocol Sanae El Mimouni, Rajaa Filali, Anas Amamou, Bahija Boulamaat and Mohamed Bouhdadi Abstract The Remote

More information

FOUNDATIONS OF THE B METHOD. Dominique Cansell, Dominique Méry 1 INTRODUCTION. 1.1 Overview of B. Computing and Informatics, Vol.

FOUNDATIONS OF THE B METHOD. Dominique Cansell, Dominique Méry 1 INTRODUCTION. 1.1 Overview of B. Computing and Informatics, Vol. Computing and Informatics, Vol. 22, 2003, 1 31 FOUNDATIONS OF THE B METHOD Dominique Cansell, Dominique Méry LORIA BP 239, Campus Scientifique 54506 Vandœuvre-lès-Nancy France e-mail: August 7, 2003- cansell@loria.fr,

More information

Reusable specification templates for defining dynamic semantics of DSLs

Reusable specification templates for defining dynamic semantics of DSLs Softw Syst Model DOI 10.1007/s10270-017-0590-0 REGULAR PAPER Reusable specification templates for defining dynamic semantics of DSLs Ulyana Tikhonova 1 Received: 5 October 2016 / Revised: 25 February 2017

More information

Tutorial on the event-based B method

Tutorial on the event-based B method Tutorial on the event-based B method Dominique Cansell, Dominique Méry To cite this version: Dominique Cansell, Dominique Méry. Tutorial on the event-based B method. IFIP FORTE 2006 Paris, 2006.

More information

FORMAL SPECIFICATION AND VERIFICATION OF TOTAL ORDER BROADCAST THROUGH DESTINATION AGREEMENT USING EVENT-B

FORMAL SPECIFICATION AND VERIFICATION OF TOTAL ORDER BROADCAST THROUGH DESTINATION AGREEMENT USING EVENT-B FORMAL SPECIFICATION AND VERIFICATION OF TOTAL ORDER BROADCAST THROUGH DESTINATION AGREEMENT USING EVENT-B Arun Kumar Singh 1 and Divakar Yadav 2 1 Department of Electronics Engg. IET, Lucknow,India 2

More information

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs? Part II. Hoare Logic and Program Verification Part II. Hoare Logic and Program Verification Dilian Gurov Props: Models: Specs: Method: Tool: safety of data manipulation source code logic assertions Hoare

More information

6. Hoare Logic and Weakest Preconditions

6. Hoare Logic and Weakest Preconditions 6. Hoare Logic and Weakest Preconditions Program Verification ETH Zurich, Spring Semester 07 Alexander J. Summers 30 Program Correctness There are many notions of correctness properties for a given program

More information

Keywords: UML-B, refactoring, refinement, object-oriented design, annealing, introduce

Keywords: UML-B, refactoring, refinement, object-oriented design, annealing, introduce Computing and Informatics, Vol. 35, 2016, 411 440 A SET OF REFACTORING RULES FOR UML-B SPECIFICATIONS Mehrnaz Najafi, Hassan Haghighi, Tahereh Zohdi Nasab Faculty of Computer Science and Engineering Shahid

More information

Rodin. User s Handbook. Covers Rodin v.2.8. Michael Jastram (Editor) Foreword by Prof. Michael Butler. This work is sponsored by the Deploy Project

Rodin. User s Handbook. Covers Rodin v.2.8. Michael Jastram (Editor) Foreword by Prof. Michael Butler. This work is sponsored by the Deploy Project Rodin User s Handbook Covers Rodin v.2.8 Michael Jastram (Editor) Foreword by Prof. Michael Butler This work is sponsored by the Deploy Project Contents Contents 1 Preface 7 Foreword 9 1 Introduction

More information

TIETS14 Introduction to Formal Specification

TIETS14 Introduction to Formal Specification TIETS14 Introduction to Formal Specification 5 ECTS Teacher: Timo Nummenmaa timo.nummenmaa@staff.uta.fi Executable Formal Specifications in Game Development: Design, Validation and Evolution Teaching times:

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics About the Tutorial Discrete Mathematics is a branch of mathematics involving discrete elements that uses algebra and arithmetic. It is increasingly being applied in the practical fields of mathematics

More information

IFAD. VDMTools Validated. Design through Modelling. Overview of VDM -SL/++ IFAD. IFAD A/S Forskerparken 10 DK-5230 Odense M Denmark.

IFAD. VDMTools Validated. Design through Modelling. Overview of VDM -SL/++ IFAD. IFAD A/S Forskerparken 10 DK-5230 Odense M Denmark. VDMTools Validated Design through Modelling Overview of VDM -SL/++ www.ifad.dk A/S Forskerparken 10 DK-5230 Odense M Denmark 1 VDM-SL ISO Standard 1996 for flat language Different module proposals A de-facto

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

1 The Axiom of Extensionality

1 The Axiom of Extensionality 1 The Axiom of Extensionality Primitive notion: Set A set is a group, a collection, or an aggregate of things. In fact, the words set, group, collection, and aggregate are all synonyms denoting the same

More information

13. The Leader Election Protocol (IEEE 1394) Jean-Raymond Abrial

13. The Leader Election Protocol (IEEE 1394) Jean-Raymond Abrial 13. The Leader Election Protocol (IEEE 1394) Jean-Raymond Abrial 2009 Outline of Lecture 1 - Background :-) - An informal presentation of the protocol :-) - Step by step formal design :- - Short Conclusion.

More information

Verifying Java Programs Verifying Java Programs with KeY

Verifying Java Programs Verifying Java Programs with KeY Verifying Java Programs Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Formal Verification for UML/SysML models

Formal Verification for UML/SysML models Formal Verification for UML/SysML models IBM Research Lab - Haifa Content Formal verification v.s. testing Correctness properties Formal verification for Rhapsody models 2 Formal Verification Desired Properties

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

B Specification Example

B Specification Example B Specification Example Peter H. Schmitt Universität Karlsruhe P. Schmitt: Formal Specification and Verification of Software p.1 Task: Lift Controller 1. In every lift cabin there is a series of push buttons,

More information

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014 CMPSCI 250: Introduction to Computation Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014 Things, Sets, and Strings The Mathematical Method Administrative Stuff The Objects of Mathematics

More information

Semantics. There is no single widely acceptable notation or formalism for describing semantics Operational Semantics

Semantics. There is no single widely acceptable notation or formalism for describing semantics Operational Semantics There is no single widely acceptable notation or formalism for describing semantics Operational Describe the meaning of a program by executing its statements on a machine, either simulated or actual. The

More information

Axiomatic Specification. Al-Said, Apcar, Jerejian

Axiomatic Specification. Al-Said, Apcar, Jerejian Axiomatic Specification Al-Said, Apcar, Jerejian 1 Axioms: Wffs that can be written down without any reference to any other Wffs. Wffs that are stipulated as unproved premises for the proof of other wffs

More information

Language and Tool Support for Class and State Machine Refinement in UML-B

Language and Tool Support for Class and State Machine Refinement in UML-B Language and Tool Support for Class and State Machine Refinement in UML-B Mar Yah Said, Michael Butler and Colin Snook (mys05r,mjb,cfs)@ecs.soton.ac.uk School of Electronic and Computer Science Outline

More information

CSE20: Discrete Mathematics

CSE20: Discrete Mathematics Spring 2018 Summary Last time: Today: Introduction to Basic Set Theory (Vardy) More on sets Connections between sets and logic Reading: Chapter 2 Set Notation A, B, C: sets A = {1, 2, 3}: finite set with

More information

UNIVERSITY OF SOUTHAMPTON Faculty of Engineering and Applied Science Department of Electronics and Computer Science

UNIVERSITY OF SOUTHAMPTON Faculty of Engineering and Applied Science Department of Electronics and Computer Science UNIVERSITY OF SOUTHAMPTON Faculty of Engineering and Applied Science Department of Electronics and Computer Science A progress report submitted for continuation towards a PhD Supervisor: Prof. Michael

More information

Summary of Course Coverage

Summary of Course Coverage CS-227, Discrete Structures I Spring 2006 Semester Summary of Course Coverage 1) Propositional Calculus a) Negation (logical NOT) b) Conjunction (logical AND) c) Disjunction (logical inclusive-or) d) Inequalities

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

Proceedings of the 12th International Workshop on Automated Verification of Critical Systems (AVoCS 2012)

Proceedings of the 12th International Workshop on Automated Verification of Critical Systems (AVoCS 2012) Electronic Communications of the EASST Volume 53 (2012) Proceedings of the 12th International Workshop on Automated Verification of Critical Systems (AVoCS 2012) E-SPARK: Automated Generation of Provably

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods

Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods Outline The Unified Modeling Language Opportunities and Challenges for Formal Methods An update on UML Language definition Tools A precise OO meta-modeling facility - MMF Stuart Kent University of Kent

More information

Chapter 3. Describing Syntax and Semantics ISBN

Chapter 3. Describing Syntax and Semantics ISBN Chapter 3 Describing Syntax and Semantics ISBN 0-321-49362-1 Chapter 3 Topics Describing the Meanings of Programs: Dynamic Semantics Copyright 2015 Pearson. All rights reserved. 2 Semantics There is no

More information

Numerical Computations and Formal Methods

Numerical Computations and Formal Methods Program verification Formal arithmetic Decision procedures Proval, Laboratoire de Recherche en Informatique INRIA Saclay IdF, Université Paris Sud, CNRS October 28, 2009 Program verification Formal arithmetic

More information

Formal analysis of imprecise system requirements with Event B

Formal analysis of imprecise system requirements with Event B DOI 10.1186/s40064-016-2657-8 RESEARCH Open Access Formal analysis of imprecise system requirements with Event B Hong Anh Le 1*, Shin Nakajima 2 and Ninh Thuan Truong 3 *Correspondence: lehonganh@humg.edu.vn

More information

Redevelopment of an Industrial Case Study Using Event-B and Rodin

Redevelopment of an Industrial Case Study Using Event-B and Rodin Redevelopment of an Industrial Case Study Using Event-B and Rodin Abdolbaghi Rezazadeh 1, Neil Evans 2 and Michael Butler 1 1 School of Electronics and Computer Science, University of Southampton, UK 2

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

Formal Specification: Z Notation. CITS5501 Software Testing and Quality Assurance

Formal Specification: Z Notation. CITS5501 Software Testing and Quality Assurance Formal Specification: Z Notation CITS5501 Software Testing and Quality Assurance The Zed Notation, J.M.Spivey. Semester 1, 2017 A Formal Specification Notation A Syntax - often based on set theory and

More information

Lecture 11 Lecture 11 Nov 5, 2014

Lecture 11 Lecture 11 Nov 5, 2014 Formal Verification/Methods Lecture 11 Lecture 11 Nov 5, 2014 Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems to be analyzed, and

More information

Logik für Informatiker Logic for computer scientists

Logik für Informatiker Logic for computer scientists Logik für Informatiker for computer scientists WiSe 2011/12 Overview Motivation Why is logic needed in computer science? The LPL book and software Scheinkriterien Why is logic needed in computer science?

More information

Chapter 3 (part 3) Describing Syntax and Semantics

Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings

More information

Formal Verification. Lecture 10

Formal Verification. Lecture 10 Formal Verification Lecture 10 Formal Verification Formal verification relies on Descriptions of the properties or requirements of interest Descriptions of systems to be analyzed, and rely on underlying

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

University of Southampton Research Repository eprints Soton

University of Southampton Research Repository eprints Soton University of Southampton Research Repository eprints Soton Copyright and Moral Rights for this thesis are retained by the author and/or other copyright owners. A copy can be downloaded for personal non-commercial

More information

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/ SECTION 5.5 Application: Correctness of Algorithms Copyright Cengage Learning. All

More information

INTEGRATION OF AUTOMATIC THEOREM PROVERS IN EVENT-B PATTERNS

INTEGRATION OF AUTOMATIC THEOREM PROVERS IN EVENT-B PATTERNS INTEGRATION OF AUTOMATIC THEOREM PROVERS IN EVENT-B PATTERNS Eman Elsayed 1, Gaber El-Sharawy 2 and Enas El-Sharawy 3 123 Faculty of Science(girls), Al-Azhar University, Cairo, Egypt emankaram10@azhar.ed.eg,

More information

The learning objectives of this chapter are the followings. At the end of this chapter, you shall

The learning objectives of this chapter are the followings. At the end of this chapter, you shall Chapter 5 Sequence diagrams In the previous chapters, we have seen different diagrams. Use case diagrams describe tasks that a system is supposed to perform. It gives high-level information about how a

More information

Defining Classes and Methods

Defining Classes and Methods Defining Classes and Methods Chapter 5 Objects and References: Outline Variables of a Class Type Defining an equals Method for a Class Boolean-Valued Methods Parameters of a Class Type Variables of a Class

More information

Syntax and Grammars 1 / 21

Syntax and Grammars 1 / 21 Syntax and Grammars 1 / 21 Outline What is a language? Abstract syntax and grammars Abstract syntax vs. concrete syntax Encoding grammars as Haskell data types What is a language? 2 / 21 What is a language?

More information

Mathematics for Computer Scientists 2 (G52MC2)

Mathematics for Computer Scientists 2 (G52MC2) Mathematics for Computer Scientists 2 (G52MC2) L07 : Operations on sets School of Computer Science University of Nottingham October 29, 2009 Enumerations We construct finite sets by enumerating a list

More information

CMSC 330: Organization of Programming Languages. Operational Semantics

CMSC 330: Organization of Programming Languages. Operational Semantics CMSC 330: Organization of Programming Languages Operational Semantics Notes about Project 4, Parts 1 & 2 Still due today (7/2) Will not be graded until 7/11 (along with Part 3) You are strongly encouraged

More information

FMSE: Lecture 1. The Specification Language Z: Introduction

FMSE: Lecture 1. The Specification Language Z: Introduction FMSE: Lecture 1 The Specification Language Z: Introduction 1 FMSE: Lecture 1 2 Goals of Lecture 1 At the end of this lecture you should be able to: write down schemas for simple specification problems

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

Relations. Power set Cartesian product Relation Function

Relations. Power set Cartesian product Relation Function Relations Relations By the end of this part of the course the student should understand and be able to use the concepts of relations and functions in a Z specification. The concepts introduced are: Power

More information

SMT solvers for Rodin

SMT solvers for Rodin SMT solvers for Rodin David Déharbe 1, Pascal Fontaine 2, Yoann Guyot 3, and Laurent Voisin 3 1 Universidade Federal do Rio Grande do Norte, Natal, RN, Brazil david@dimap.ufrn.br 2 University of Nancy

More information

Event B Development of a Synchronous AADL Scheduler

Event B Development of a Synchronous AADL Scheduler Available online at www.sciencedirect.com Electronic Notes in Theoretical Computer Science 280 (2011) 23 33 www.elsevier.com/locate/entcs Event B Development of a Synchronous AADL Scheduler Jean-Paul Bodeveix

More information

Applying Atomicity and Model Decomposition to a Space Craft System in Event-B

Applying Atomicity and Model Decomposition to a Space Craft System in Event-B Applying Atomicity and Model Decomposition to a Space Craft System in Event-B Asieh Salehi Fathabadi 1, Abdolbaghi Rezazadeh 2, and Michael Butler 3 University of Southampton, UK asf08r 1,ra3 2,mjb 3 @ecs.soton.ac.uk

More information

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008 SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 5: OCL, ParTeG Course Outline L1: Introduction

More information

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD Recap. Growth rates: Arrange the following functions in ascending order of growth rate: n 2 log n n log n 2 log n n/ log n n n Introduction Algorithm: A step-by-step way of solving a problem. Design of

More information

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents. Chapter 1 SPECIFYING SYNTAX 1 Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren

More information

Verification Condition Generation

Verification Condition Generation Verification Condition Generation Jorge Sousa Pinto Departamento de Informática / Universidade do Minho jsp@di.uminho.pt www.di.uminho.pt/~jsp Outline (1) - From Hoare Logic to VCGen algorithms: an architecture

More information

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England The Formal Semantics of Programming Languages An Introduction Glynn Winskel The MIT Press Cambridge, Massachusetts London, England Series foreword Preface xiii xv 1 Basic set theory 1 1.1 Logical notation

More information

1 Introduction... 1 1.1 A Database Example... 1 1.2 An Example from Complexity Theory...................... 4 1.3 An Example from Formal Language Theory................. 6 1.4 An Overview of the Book.................................

More information

An introduction to Category Theory for Software Engineers*

An introduction to Category Theory for Software Engineers* An introduction to Category Theory for Software Engineers* Dr Steve Easterbrook Associate Professor, Dept of Computer Science, University of Toronto sme@cs.toronto.edu *slides available at http://www.cs.toronto.edu/~sme/presentations/cat101.pdf

More information

Distributed Systems Programming (F21DS1) Formal Verification

Distributed Systems Programming (F21DS1) Formal Verification Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on

More information

Haskell Overview II (2A) Young Won Lim 8/9/16

Haskell Overview II (2A) Young Won Lim 8/9/16 (2A) Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published

More information

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion Using a Lazy CNF Conversion Stéphane Lescuyer Sylvain Conchon Université Paris-Sud / CNRS / INRIA Saclay Île-de-France FroCoS 09 Trento 18/09/2009 Outline 1 Motivation and background Verifying an SMT solver

More information

Abstract Interpretation

Abstract Interpretation Abstract Interpretation Ranjit Jhala, UC San Diego April 22, 2013 Fundamental Challenge of Program Analysis How to infer (loop) invariants? Fundamental Challenge of Program Analysis Key issue for any analysis

More information

Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C

Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C David Bühler CEA LIST, Software Safety Lab Frama-C & SPARK Day 2017 May 30th, 2017 David

More information

Domain Specific Languages. Requirements (Engineering)

Domain Specific Languages. Requirements (Engineering) Domain Specific Languages and Requirements (Engineering) Andreas Graf Andreas.graf@itemis.de Markus Voelter www.voelter.de voelter@acm.org What are Requirements? a requirement is a singular documented

More information

Research Collection. Reusable mathematical models. Master Thesis. ETH Library. Author(s): Widmer, Tobias K. Publication Date: 2004

Research Collection. Reusable mathematical models. Master Thesis. ETH Library. Author(s): Widmer, Tobias K. Publication Date: 2004 Research Collection Master Thesis Reusable mathematical models Author(s): Widmer, Tobias K. Publication Date: 2004 Permanent Link: https://doi.org/10.3929/ethz-a-005115737 Rights / License: In Copyright

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 (1/25) MA284 : Discrete Mathematics Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 1 Definitions 1. A graph 2. Paths and connected graphs 3. Complete graphs 4. Vertex degree

More information

Verification and Validation

Verification and Validation Cycle Ingénieur 2 ème année Département Informatique Verification and Validation Part IV : Proof-based Verification (I) Burkhart Wolff Département Informatique Université Paris-Sud / Orsay 2013-2014 What

More information

Verification and Validation

Verification and Validation 2017-2018 Cycle Ingénieur 2 ème année Département Informatique Verification and Validation Part IV : Proof-based Verification (I) Burkhart Wolff Département Informatique Université Paris-Sud / Orsay Difference

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

Automated Requirements-Based Testing

Automated Requirements-Based Testing Automated Requirements-Based Testing Tuesday, October 7 th 2008 2008 The MathWorks, Inc. Dr. Marc Segelken Senior Application Engineer Overview Purposes of Testing Test Case Generation Structural Testing

More information

Discharching Event-B Proof Obligations

Discharching Event-B Proof Obligations Discharching Event-B Proof Obligations Studienarbeit am Institut für Theoretische Informatik Prof. Dr. rer. nat. Peter H. Schmitt Fakultät für Informatik Universität Karlsruhe (TH) von cand. inform. Christopher

More information