Refinement formal design with sequence diagrams

Size: px
Start display at page:

Download "Refinement formal design with sequence diagrams"

Transcription

1 Refinement formal design with sequence diagrams Ketil tølen INTEF & University of Oslo Octoer 14, 2011 Overview Oligatory Exercise No. 2 Motivation How can we incrementally develop UML specifications Requirements to TAIR What should we require from a stepwise method for developing UML specifications Explanation through an example A Dinner Restaurant Refinement Comparison with traditional pre-post paradigm

2 Oligatory Exercise No. 2 hould e solved individually y each student The exercise will e made availale next week The deadline is Octoer 25, PM You should send your individual solutions y to kst@sintef.no as an attachment in pdf-format Novemer 2: We will walk through the oligatory exercise and return the individual solutions in the group session Octoer 2 Motivation Exploit classical theory of inement in a practical UML setting From theory to practice, and not the other way around Briefly summarized: we aim to explain how classical theory of inement can e applied to ine specifications expressed with the help of sequence diagrams equence diagrams can e used to capture the meaning of other UML description techniques for ehavior By defining inement for sequence diagrams we theore implicitly define inement for UML

3 Requirements to TAIR hould allow specification of potential ehavior upport for under-specification hould allow specification of mandatory ehavior upport for information hiding (inherent non-determinism, unpredictaility) hould allow specification of negative ehavior in addition to positive ehavior upport for threat modeling hould capture the notion of inement hould formalize incremental development hould support compositional analysis, verification and testing equence diagram message instanceline component sd L1 L2 x output event!x input event?x

4 Weak sequencing sd W L1 L2 x y <!x,?x,!y,?y> <!x,!y,?x,?y> Traces Traces are used to capture executions (ehaviors) semantically Within the field of formal methods there are many variants of traces In TAIR traces are sequences of events <e1, e2, e3, e4, e4, e1, e2, e5, > An event represent either the transmission or reception of messages?m - reception of message m!m - transmission of message m Events are instantaneous A trace may e finite termination, deadlock, infinite waiting, crash A trace may also e infinite infinite loop, intended non termination

5 Example sd Ex A B C a c d This sequence diagram has six traces: <!a,?a,!,?,!c,?c,!d,?d> <!a,?a,!,?,!c,!d,?c,?d> <!a,?a,!,?,!d,!c,?c,?d> <!a,?a,!,!c,?,?c,!d,?d> <!a,?a,!,!c,?,!d,?c,?d> <!a,?a,!,!c,?c,?,!d,?d> Alternative sd A L1 L2 alt x y

6 Parallel execution sd P L1 L2 par x y Interaction overview diagram sd IOD seq (IO par W) seq (IO alt W) IO W IO W

7 Dinner sd Dinner a alad as a starter alad then a main course consisting of an Entree and ideorder in parallel choices sd Entree Vegetarian sd ideorder Baked Potato choices Beef Rice Pork Frites ome potential positive traces of Beef sd Beef Cook tove Refrigerator main dish please turn on heat heat is adequate fetch_meat() fetch_meat():sirloin put on grill (sirloin) fetch_meat() main dish:sirloin fetch_meat():sirloin

8 TAIR semantics: simple case Each positive execution is represented y a trace Each negative execution is represented y a trace The semantics of a sequence diagram is a pair of sets of traces (Positive, Negative) Positive Inconclusive Negative All other traces over the actual alphaet of events are inconclusive Potential negative Beef experiences sd Beef main dish please Cook tove Refrigerator turn on heat fetch_meat() fetch_meat():sirloin heat is adequate negative traces put on grill (sirloin) neg smell of urned meat fetch_meat() main dish:sirloin fetch_meat():sirloin Positive traces Beef with French fries Turkey entree Inconclusive traces Forgotten irloin Negative traces Burned irloin

9 Pre-post specifications Pre-post specifications are ased on the assumption-guarantee paradigm Integer division var dividend, divisor, quotient, rest : Nat pre divisor 0 Assumption aout the state at the moment the execution is initiated post ( dividend = (quotient * divisor) + rest ) & rest < divisor Guarantee with respect to the state at the moment of termination emantics of pre-post specifications pre false initially pre true initially Legal system ehavior Legal, ut aritrary ehavior no constraints on state at termination post true at termination post false at termination Illegal system ehavior

10 Comparing TAIR with pre-post pre=false pre=true assumption inconclusive post=true positive post=false negative guarantee Refinement in pre-post Weakening pre trengthening post pre false initially no constraint on state at termination pre sann i starttilstand pre true initially post true at termination post false at termination post sann i det øyelikk operasjonen terminerer

11 TAIR: supplementing upplementing involves reducing the set of inconclusive traces y redefining inconclusive traces as either positive or negative Positive trace remains positive Negative trace remains negative Positive traces Beef with French fries Turkey entree supplementing Beef with FF Turkey entree Inconclusive traces Negative traces Forgotten irloin Burned irloin Forgotten irloin Burned irloin upplementing in pre-post weakening the assumption pre=false pre=true assumption inconclusive post=true positive post=false negative guarantee

12 TAIR: narrowing Narrowing involves reducing the set of positive traces y redefining them as negative Inconclusive traces remain inconclusive Negative traces remain negative Indian Restaurant Positive traces in sets of traces Vegetarian Beef Pork narrowing Vegetarian Pork Inconclusive traces Negative traces Beef Narrowing in pre-post pre=false pre=true assumption inconclusive post=true positive post=false negative strengthening the guarantee guarantee

13 Indirect definition: Refinement in TAIR A sequence diagram B is a general inement of a sequence diagram A if A and B are semantically identical B can e otained from A y supplementing B can e otained from A y narrowing B can e otained from A y a finite numer of steps A -> C1 -> C2 ->. ->Cn->B each of which is either a supplementing or a narrowing Is B a inement of A? sd A sd B T T e e c c

14 Is B a inement of A? sd A sd B T T e e c c Is B a inement of A? sd A sd B T T e c alt e c d k f

15 Is B a inement A? sd A sd B T T e c e c d k f Is B a inement of A? sd A sd B T T e e c

16 DIRECT DEFINITION: Refinement in TAIR A sequence diagram B is a inement of a sequence diagram A if every trace classified as negative y A is also classified as negative y B every trace classified as positive y A is classified as either positive or negative y B Refinement in TAIR Positive upplementing Inconclusive Negative Narrowing An interaction oligation o'=(p',n') is a inement of an interaction oligation o=(p,n) iff n n' p p'un'

17 Underspecification and non-determinism Underspecification: everal alternative ehaviours are considered equivalent (serve the same purpose). Inherent non-determinism: Alternative ehaviours that must all e possile for the implementation. These two should e descried differently! The need for oth alt and xalt Potential non-determinism captured y alt allows astraction and inessential non-determinism Under-specification Non-critical design decisions may e postponed Mandatory non-determinism captured y xalt characterizes non-determinism that must e lected in every correct implementation Makes it possile to specify games Important in relation to security Also helpful as a means of astraction

18 Restaurant example with oth alt and xalt Entree menus must have the choice of Vegetarian or Meat sd Dinner-2 alad sd Entree xalt sd ideorder alt Vegetarian alt Baked Potato Beef Pork Rice Frites Meat may e either Beef or Pork, ut menus need not have oth choices TAIR Positive Inconclusive Negative Positive Inconclusive Negative Positive Inconclusive Negative xalt Positive Inconclusive Negative Positive Inconclusive Negative Positive Inconclusive Negative

19 alt vs xalt Assume [[ d1 ]] = {(p1,n1)} [[ d2 ]] = {(p2,n2)} alt specifies potential ehaviour: [[ d1 alt d2 ]] = [[ d1 ]] + [[ d2 ]] = {(p1 U p2, n1 U n2)} xalt specifies mandatory ehaviour: [[ d1 xalt d2 ]] = [[ d1 ]] U [[ d2 ]] P1 = {(p1,n1)} U {(p2,n2)} I1 N1 P1 U P2 I N1 U N2 P2 I2 N2 Example: Network communication cs C A:sender :network B:receiver cs N1:N G:N N3:N N2:N N4:N

20 alt vs xalt :network sd _Comm A:sender G:N N1:N N2:N N3:N N4:N B:receiver m xalt m m m alt m m m m A->G->N1->B Everything else A->G->N2->N3->B A->G->N2->N4->B Everything else Mandatory requirements TAIR Haugen, Husa, Runde, tølen: TAIR towards formal design with sequence diagrams, oym, pringer. Runde, Haugen, tølen: The Pragmatics of TAIR, pringer-verlag. LNC NOTE: Next Friday: Refinement III

Why Timed Sequence Diagrams Require Three-Event Semantics

Why Timed Sequence Diagrams Require Three-Event Semantics Why Timed Sequence Diagrams Require Three-Event Semantics Øystein Haugen 1, Knut Eilif Husa 1,2, Ragnhild Kobro Runde 1, and Ketil Stølen 1,3 1 Department of Informatics, University of Oslo 2 Ericsson

More information

Research Report 326 ISBN ISSN

Research Report 326 ISBN ISSN University of Oslo Department of Informatics How to transform UML neg into a useful construct Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen Research Report 326 ISBN 82-7368-280-3 ISSN 0806-3036 November

More information

Report. Stepwise refinement of sequence diagrams with soft real-time requirements. Author(s) Atle Refsdal Ragnhild Kobro Runde, Ketil Stølen

Report. Stepwise refinement of sequence diagrams with soft real-time requirements. Author(s) Atle Refsdal Ragnhild Kobro Runde, Ketil Stølen A19749- Unrestricted Report Stepwise refinement of sequence diagrams with soft real-time requirements Author(s) Atle Refsdal Ragnhild Kobro Runde, Ketil Stølen SINTEF ICT Networked Systems and Services

More information

Relating computer systems to sequence diagrams with underspecification, inherent nondeterminism and probabilistic choice. Part 2

Relating computer systems to sequence diagrams with underspecification, inherent nondeterminism and probabilistic choice. Part 2 University of Oslo Department of Informatics Relating computer systems to sequence diagrams with underspecification, inherent nondeterminism and probabilistic choice Part 2 Atle Refsdal, Ragnhild Kobro

More information

Specification and Refinement of Soft Real-time Requirements Using Sequence Diagrams. Atle Refsdal, Knut Eilif Husa, Ketil Stølen. Technical report 323

Specification and Refinement of Soft Real-time Requirements Using Sequence Diagrams. Atle Refsdal, Knut Eilif Husa, Ketil Stølen. Technical report 323 University of Oslo Department of Informatics Specification and Refinement of Soft Real-time Requirements Using Sequence Diagrams Atle Refsdal, Knut Eilif Husa, Ketil Stølen Technical report 323 ISBN 82-7368-276-5

More information

Refining UML interactions with underspecification and nondeterminism. Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen

Refining UML interactions with underspecification and nondeterminism. Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen University of Oslo Departent of Inforatics Refining UML interactions with underspecification and nondeterinis Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen Research Report 325 ISBN 82-7368-278-1 ISSN

More information

Specification and Refinement of Soft Real-Time Requirements Using Sequence Diagrams

Specification and Refinement of Soft Real-Time Requirements Using Sequence Diagrams Specification and Refinement of Soft Real-Time Requirements Using Sequence Diagrams Atle Refsdal 1, Knut Eilif Husa 1,2,andKetilStølen 1,3 1 Department of Informatics, University of Oslo, Norway 2 Ericsson,

More information

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program Program verification Assertional semantics of a program Meaning of a program: relation between its inputs and outputs; specified by input assertions (pre-conditions) and output assertions (post-conditions)

More information

Multiplying and dividing integers Student Activity Sheet 2; use with Exploring Patterns of multiplying and dividing integers

Multiplying and dividing integers Student Activity Sheet 2; use with Exploring Patterns of multiplying and dividing integers 1. Study the multiplication problems in the tables. [EX2, page 1] Factors Product Factors Product (4)(3) 12 ( 4)(3) 12 (4)(2) 8 ( 4)(2) 8 (4)(1) 4 ( 4)(1) 4 (4)(0) 0 ( 4)(0) 0 (4)( 1) 4 ( 4)( 1) 4 (4)(

More information

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

EE249 - Fall 2012 Lecture 18: Overview of Concrete Contract Theories. Alberto Sangiovanni-Vincentelli Pierluigi Nuzzo EE249 - Fall 2012 Lecture 18: Overview of Concrete Contract Theories 1 Alberto Sangiovanni-Vincentelli Pierluigi Nuzzo Outline: Contracts and compositional methods for system design Where and why using

More information

Top Down Design. Gunnar Gotshalks 03-1

Top Down Design. Gunnar Gotshalks 03-1 Top Down Design 03-1 Top Down Description Top down is also known as step wise refinement and functional decomposition Given an operation, there are only the following three choices for refinement» Sequence

More information

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples Hoare Logic I Introduction to Deductive Program Verification Işıl Dillig Program Spec Deductive verifier FOL formula Theorem prover valid contingent Example specs: safety (no crashes), absence of arithmetic

More information

Hoare Logic (I): Axiomatic Semantics and Program Correctness

Hoare Logic (I): Axiomatic Semantics and Program Correctness Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan

More information

Stepwise Refinement! Top Down Design!

Stepwise Refinement! Top Down Design! Stepwise Refinement Top Down Design 11-1 On Top Down Design Useful in creating a function or algorithm when the input and output data structures correspond» If the input and output data structures do not

More information

Axiomatic Verification II

Axiomatic Verification II Axiomatic Verification II Software Testing and Verification Lecture Notes 18 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Axiomatic Verification II Reasoning about iteration (while loops)

More information

Design of Distributed Systems Melinda Tóth, Zoltán Horváth

Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052

More information

Failure detectors Introduction CHAPTER

Failure detectors Introduction CHAPTER CHAPTER 15 Failure detectors 15.1 Introduction This chapter deals with the design of fault-tolerant distributed systems. It is widely known that the design and verification of fault-tolerent distributed

More information

Floyd-Hoare Style Program Verification

Floyd-Hoare Style Program Verification Floyd-Hoare Style Program Verification Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 9 Feb 2017 Outline of this talk 1 Overview 2 Hoare Triples 3

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, also known as fix-point semantics,

More information

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017 Program Analysis Lecture 5 Rayna Dimitrova WS 2016/2017 2/21 Recap: Constant propagation analysis Goal: For each program point, determine whether a variale has a constant value whenever an execution reaches

More information

Menu Calendar Nutrient Analysis Report - August, 2018 Site: ALL Date: 08/01/ /31/2018

Menu Calendar Nutrient Analysis Report - August, 2018 Site: ALL Date: 08/01/ /31/2018 Item me Wed - ServingDate: 08/22/2018 Cheeseburger - LR- 1147 (1 1174 (1 General Tso's Chicken - LR-1051 (1/2 Rice Brown Cooked - LR-1422 (1/2 Baked Beans - LR-1177 (1/2 (1 1118 (1 1069 (1 Strawberry Applesauce

More information

Temporal & Modal Logic. Acronyms. Contents. Temporal Logic Overview Classification PLTL Syntax Semantics Identities. Concurrency Model Checking

Temporal & Modal Logic. Acronyms. Contents. Temporal Logic Overview Classification PLTL Syntax Semantics Identities. Concurrency Model Checking Temporal & Modal Logic E. Allen Emerson Presenter: Aly Farahat 2/12/2009 CS5090 1 Acronyms TL: Temporal Logic BTL: Branching-time Logic LTL: Linear-Time Logic CTL: Computation Tree Logic PLTL: Propositional

More information

The WHILE Hierarchy of Program Schemes is Infinite

The WHILE Hierarchy of Program Schemes is Infinite The WHILE Hierarchy of Program Schemes is Infinite Can Adam Alayrak and Thomas Noll RWTH Aachen Ahornstr. 55, 52056 Aachen, Germany alayrak@informatik.rwth-aachen.de and noll@informatik.rwth-aachen.de

More information

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

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

Hoare Logic and Model Checking

Hoare Logic and Model Checking Hoare Logic and Model Checking Kasper Svendsen University of Cambridge CST Part II 2016/17 Acknowledgement: slides heavily based on previous versions by Mike Gordon and Alan Mycroft Introduction In the

More information

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University Trace semantics: towards a unification of parallel paradigms Stephen Brookes Department of Computer Science Carnegie Mellon University MFCSIT 2002 1 PARALLEL PARADIGMS State-based Shared-memory global

More information

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors Math.3336: Discrete Mathematics Primes and Greatest Common Divisors Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

CMPT 310 Artificial Intelligence Survey. Simon Fraser University Summer Instructor: Oliver Schulte

CMPT 310 Artificial Intelligence Survey. Simon Fraser University Summer Instructor: Oliver Schulte CMPT 310 Artificial Intelligence Survey Simon Fraser University Summer 2017 Instructor: Oliver Schulte Assignment 3: Chapters 13, 14, 18, 20. Probabilistic Reasoning and Learning Instructions: The university

More information

Program Analysis Part I : Sequential Programs

Program Analysis Part I : Sequential Programs Program Analysis Part I : Sequential Programs IN5170/IN9170 Models of concurrency Program Analysis, lecture 5 Fall 2018 26. 9. 2018 2 / 44 Program correctness Is my program correct? Central question for

More information

Vertical Implementation

Vertical Implementation Information and Computation 70, 95 33 (00) doi:0.006/inco.00.967, availale online at http://www.idealirary.com on Vertical Implementation Arend Rensink Faculty of Informatics, University of Twente, Postus

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Lecture Notes: Axiomatic Semantics and Hoare-style Verification Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has

More information

2nd Exam. First Name: Second Name: Matriculation Number: Degree Programme (please mark): CS Bachelor CS Master CS Lehramt SSE Master Other:

2nd Exam. First Name: Second Name: Matriculation Number: Degree Programme (please mark): CS Bachelor CS Master CS Lehramt SSE Master Other: 2 Concurrency Theory WS 2013/2014 Chair for Software Modeling and Verification Rheinisch-Westfälische Technische Hochschule Aachen Prof. Dr. Ir. Joost-Pieter Katoen apl. Prof. Dr. Thomas Noll S. Chakraorty,

More information

A Short Introduction to Hoare Logic

A Short Introduction to Hoare Logic A Short Introduction to Hoare Logic Supratik Chakraborty I.I.T. Bombay June 23, 2008 Supratik Chakraborty (I.I.T. Bombay) A Short Introduction to Hoare Logic June 23, 2008 1 / 34 Motivation Assertion checking

More information

What happens to the value of the expression x + y every time we execute this loop? while x>0 do ( y := y+z ; x := x:= x z )

What happens to the value of the expression x + y every time we execute this loop? while x>0 do ( y := y+z ; x := x:= x z ) Starter Questions Feel free to discuss these with your neighbour: Consider two states s 1 and s 2 such that s 1, x := x + 1 s 2 If predicate P (x = y + 1) is true for s 2 then what does that tell us about

More information

Downloaded from

Downloaded from Question 1: Exercise 2.1 The graphs of y = p(x) are given in following figure, for some polynomials p(x). Find the number of zeroes of p(x), in each case. (i) (ii) (iii) Page 1 of 24 (iv) (v) (v) Page

More information

Integers and Division

Integers and Division Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random

More information

Bounded Retransmission in Event-B CSP: a Case Study

Bounded Retransmission in Event-B CSP: a Case Study Available online at www.sciencedirect.com Electronic Notes in Theoretical Computer Science 280 (2011) 69 80 www.elsevier.com/locate/entcs Bounded Retransmission in Event-B CSP: a Case Study Steve Schneider

More information

ERASMUS UNIVERSITY ROTTERDAM Information concerning the Entrance examination Mathematics level 2 for International Business Administration (IBA)

ERASMUS UNIVERSITY ROTTERDAM Information concerning the Entrance examination Mathematics level 2 for International Business Administration (IBA) ERASMUS UNIVERSITY ROTTERDAM Information concerning the Entrance examination Mathematics level 2 for International Business Administration (IBA) General information Availale time: 2.5 hours (150 minutes).

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Model-Based Design of Game AI

Model-Based Design of Game AI Model-Based Design of Game AI Alexandre Denault, Jörg Kienzle and Hans Vangheluwe School of Computer Science, McGill University Montréal, Canada, H3A 2A7 email: {adenau,joerg,hv}@cs.mcgill.ca KEYORDS Modern

More information

Synthesizing Robust Systems

Synthesizing Robust Systems Synthesizing Robust Systems Roderick Bloem and Karin Greimel (TU-Graz) Thomas Henzinger (EPFL and IST-Austria) Barbara Jobstmann (CNRS/Verimag) FMCAD 2009 in Austin, Texas Barbara Jobstmann 1 Motivation

More information

Axiomatic Semantics. Lecture 9 CS 565 2/12/08

Axiomatic Semantics. Lecture 9 CS 565 2/12/08 Axiomatic Semantics Lecture 9 CS 565 2/12/08 Axiomatic Semantics Operational semantics describes the meaning of programs in terms of the execution steps taken by an abstract machine Denotational semantics

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Intermediate Math Circles February 26, 2014 Diophantine Equations I Intermediate Math Circles February 26, 2014 Diophantine Equations I 1. An introduction to Diophantine equations A Diophantine equation is a polynomial equation that is intended to be solved over the integers.

More information

First Order Predicate Logic

First Order Predicate Logic Wolfgang Schreiner and Wolfgang Windsteiger http://www.risc.jku.at 1/22 First Order Predicate Logic Pragmatics Wolfgang Schreiner and Wolfgang Windsteiger Wolfgang.(Schreiner Windsteiger)@risc.jku.at Research

More information

Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft)

Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft) Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft) Jayadev Misra December 18, 2015 Contents 1 Introduction 3 2 Program and Execution Model 4 2.1 Program Structure..........................

More information

Semantics and Verification of Software

Semantics and Verification of Software Semantics and Verification of Software Thomas Noll Software Modeling and Verification Group RWTH Aachen University http://moves.rwth-aachen.de/teaching/ss-15/sv-sw/ The Denotational Approach Denotational

More information

ON DEFINING PROOFS OF KNOWLEDGE IN THE BARE PUBLIC-KEY MODEL

ON DEFINING PROOFS OF KNOWLEDGE IN THE BARE PUBLIC-KEY MODEL 1 ON DEFINING PROOFS OF KNOWLEDGE IN THE BARE PUBLIC-KEY MODEL GIOVANNI DI CRESCENZO Telcordia Technologies, Piscataway, NJ, USA. E-mail: giovanni@research.telcordia.com IVAN VISCONTI Dipartimento di Informatica

More information

Schema Mappings for Data Graphs

Schema Mappings for Data Graphs Schema Mappings for Data Graphs Nadime Francis 1 Leonid Likin 2 1 Université Paris-Est Marne-la-Vallée 2 University of Edinurgh BDA 2017 Nancy, Novemer, 16th Results originally pulished in PODS 2017 1

More information

Axiomatic Semantics. Hoare s Correctness Triplets Dijkstra s Predicate Transformers

Axiomatic Semantics. Hoare s Correctness Triplets Dijkstra s Predicate Transformers Axiomatic Semantics Hoare s Correctness Triplets Dijkstra s Predicate Transformers Goal of a program = IO Relation Problem Specification Properties satisfied by the input and expected of the output (usually

More information

Base Menu Spreadsheet

Base Menu Spreadsheet Menu Name: New Elementary Lunch Include Cost: No Site: Report Style: Detailed Monday - 02/04/2019 ursable Meal Total 3 001014 Scrambled Eggs 2 oz 1 184 5.30 253 *1 12.81 0.00 381 2.34 0.02 13.53 *641 *56.4

More information

Hoare Logic: Part II

Hoare Logic: Part II Hoare Logic: Part II COMP2600 Formal Methods for Software Engineering Jinbo Huang Australian National University COMP 2600 Hoare Logic II 1 Factorial {n 0} fact := 1; i := n; while (i >0) do fact := fact

More information

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM CS103 Handout 03 Fall 2012 September 28, 2012 Problem Set 1 This first problem set is designed to help you gain a familiarity with set theory and basic proof techniques. By the time you're done, you should

More information

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions Chapter 1 Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions 1.1 The IMP Language IMP is a programming language with an extensible syntax that was developed in the late 1960s. We will

More information

A General Testability Theory: Classes, properties, complexity, and testing reductions

A General Testability Theory: Classes, properties, complexity, and testing reductions A General Testability Theory: Classes, properties, complexity, and testing reductions presenting joint work with Luis Llana and Pablo Rabanal Universidad Complutense de Madrid PROMETIDOS-CM WINTER SCHOOL

More information

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security Carlos Olarte and Frank D. Valencia INRIA /CNRS and LIX, Ecole Polytechnique Motivation Concurrent

More information

C241 Homework Assignment 7

C241 Homework Assignment 7 C24 Homework Assignment 7. Prove that for all whole numbers n, n i 2 = n(n + (2n + The proof is by induction on k with hypothesis H(k i 2 = k(k + (2k + base case: To prove H(, i 2 = = = 2 3 = ( + (2 +

More information

Foundations of Computation

Foundations of Computation The Australian National University Semester 2, 2018 Research School of Computer Science Tutorial 6 Dirk Pattinson Foundations of Computation The tutorial contains a number of exercises designed for the

More information

Hoare Calculus and Predicate Transformers

Hoare Calculus and Predicate Transformers Hoare Calculus and Predicate Transformers Wolfgang Schreiner Wolfgang.Schreiner@risc.uni-linz.ac.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.uni-linz.ac.at

More information

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

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated

More information

Class 7 Integers. Answer the questions. Choose correct answer(s) from the given choices. Fill in the blanks

Class 7 Integers. Answer the questions. Choose correct answer(s) from the given choices. Fill in the blanks ID : in-7-integers [1] Class 7 Integers For more such worksheets visit www.edugain.com Answer the questions (1) An integer is divided by 4 and gives a remainder of 3. The resulting quotient is divided

More information

Static Program Analysis using Abstract Interpretation

Static Program Analysis using Abstract Interpretation Static Program Analysis using Abstract Interpretation Introduction Static Program Analysis Static program analysis consists of automatically discovering properties of a program that hold for all possible

More information

#A50 INTEGERS 14 (2014) ON RATS SEQUENCES IN GENERAL BASES

#A50 INTEGERS 14 (2014) ON RATS SEQUENCES IN GENERAL BASES #A50 INTEGERS 14 (014) ON RATS SEQUENCES IN GENERAL BASES Johann Thiel Dept. of Mathematics, New York City College of Technology, Brooklyn, New York jthiel@citytech.cuny.edu Received: 6/11/13, Revised:

More information

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2) CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2) Tim Roughgarden February 2, 2016 1 Recap This is our third lecture on linear programming, and the second on linear programming

More information

Hoare Logic: Reasoning About Imperative Programs

Hoare Logic: Reasoning About Imperative Programs Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2017 Catch Up / Drop in Lab When Fridays, 15.00-17.00 Where N335, CSIT Building

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Branching Bisimilarity with Explicit Divergence

Branching Bisimilarity with Explicit Divergence Branching Bisimilarity with Explicit Divergence Ro van Glaeek National ICT Australia, Sydney, Australia School of Computer Science and Engineering, University of New South Wales, Sydney, Australia Bas

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata Theorem: Every regular language is accepted by some finite automaton. Proof: We proceed by induction on the (length of/structure of) the description of the regular

More information

Selected problems from past exams

Selected problems from past exams Discrete Structures CS2800 Prelim 1 s Selected problems from past exams 1. True/false. For each of the following statements, indicate whether the statement is true or false. Give a one or two sentence

More information

Scenarios and Covert channels: another game...

Scenarios and Covert channels: another game... Scenarios and Covert channels: another game... Loïc Hélouët 1 IRISA/INRIA, Campus de Beaulieu, 35042 Rennes Cedex, France Marc Zeitoun 2 LIAFA, Case 7014, 2 place Jussieu 75251 Paris Cedex 05, France Aldric

More information

Base Menu Spreadsheet

Base Menu Spreadsheet Values Menu Name: New Elementary Lunch Include Cost: No Site: Report Style: Detailed Thursday - 11/01/2018 ursable Meal Total 4 000814 Pizza, Cheese K-8 1/8 pizza 1 275 2.54 564 *2 8.19 *0.00 10 35.78

More information

Long division for integers

Long division for integers Feasting on Leftovers January 2011 Summary notes on decimal representation of rational numbers Long division for integers Contents 1. Terminology 2. Description of division algorithm for integers (optional

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1 Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1 Stavros Tripakis 2 VERIMAG Technical Report TR-2004-26 November 2004 Abstract We introduce problems of decentralized

More information

CSC 7101: Programming Language Structures 1. Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11.

CSC 7101: Programming Language Structures 1. Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11. Axiomatic Semantics Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 1 Overview We ll develop proof rules, such as: { I b } S { I } { I } while b do S end { I b } That allow us to verify

More information

Week 2: Counting with sets; The Principle of Inclusion and Exclusion (PIE) 13 & 15 September 2017

Week 2: Counting with sets; The Principle of Inclusion and Exclusion (PIE) 13 & 15 September 2017 (1/25) MA204/MA284 : Discrete Mathematics Week 2: Counting with sets; The Principle of Inclusion and Exclusion (PIE) Dr Niall Madden 13 & 15 September 2017 A B A B C Tutorials (2/25) Tutorials will start

More information

Crash course Verification of Finite Automata Binary Decision Diagrams

Crash course Verification of Finite Automata Binary Decision Diagrams Crash course Verification of Finite Automata Binary Decision Diagrams Exercise session 10 Xiaoxi He 1 Equivalence of representations E Sets A B A B Set algebra,, ψψ EE = 1 ψψ AA = ff ψψ BB = gg ψψ AA BB

More information

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014 Outline 1 midterm exam on Friday 11 July 2014 policies for the first part 2 questions with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014 Intro

More information

Basic System and Subsystem Structures in the Dataflow Algebra. A. J. Cowling

Basic System and Subsystem Structures in the Dataflow Algebra. A. J. Cowling Verification Testing Research Group, Department of Computer Science, University of Sheffield, Regent Court, 211, Portobello Street, Sheffield, S1 4DP, United Kingdom Email: A.Cowling @ dcs.shef.ac.uk Telephone:

More information

Introduction to Computer Science Lecture 5: Algorithms

Introduction to Computer Science Lecture 5: Algorithms Introduction to Computer Science Lecture 5: Algorithms Tian-Li Yu Taiwan Evolutionary Intelligence Laboratory (TEIL) Department of Electrical Engineering National Taiwan University tianliyu@cc.ee.ntu.edu.tw

More information

Işık University Math 230 Exam I Exam Duration : 1 hr 30 min Nov. 12, Last Name : First Name : Student Number : Section :

Işık University Math 230 Exam I Exam Duration : 1 hr 30 min Nov. 12, Last Name : First Name : Student Number : Section : Işık University Math 230 Exam I Exam Duration : 1 hr 30 min Nov. 12, 2012 Last Name : First Name : Student Number : Section : 1 2 3 Instructor :Deniz Karlı Row #: / Sinan Özeren Directions. Please read

More information

ERASMUS UNIVERSITY ROTTERDAM

ERASMUS UNIVERSITY ROTTERDAM Information concerning Colloquium doctum Mathematics level 2 for International Business Administration (IBA) and International Bachelor Economics & Business Economics (IBEB) General information ERASMUS

More information

ESE601: Hybrid Systems. Introduction to verification

ESE601: Hybrid Systems. Introduction to verification ESE601: Hybrid Systems Introduction to verification Spring 2006 Suggested reading material Papers (R14) - (R16) on the website. The book Model checking by Clarke, Grumberg and Peled. What is verification?

More information

Class 8: Numbers Exercise 3B

Class 8: Numbers Exercise 3B Class : Numbers Exercise B 1. Compare the following pairs of rational numbers: 1 1 i First take the LCM of. LCM = 96 Therefore: 1 = 96 Hence we see that < 6 96 96 1 1 1 1 = 6 96 1 or we can say that

More information

Non-regular languages

Non-regular languages Non-regular languages (Pumping Lemma) Fall 2017 Costas Busch - RPI 1 Non-regular languages { a n n : n 0} { vv R : v{ a, }*} Regular languages a* * c a c( a )* etc... Fall 2017 Costas Busch - RPI 2 How

More information

A number that can be written as, where p and q are integers and q Number.

A number that can be written as, where p and q are integers and q Number. RATIONAL NUMBERS 1.1 Definition of Rational Numbers: What are rational numbers? A number that can be written as, where p and q are integers and q Number. 0, is known as Rational Example:, 12, -18 etc.

More information

MAS114: Solutions to Exercises

MAS114: Solutions to Exercises MAS114: s to Exercises Up to week 8 Note that the challenge problems are intended to be difficult! Doing any of them is an achievement. Please hand them in on a separate piece of paper if you attempt them.

More information

Algebra SUMMER PACKET Ms. Bank

Algebra SUMMER PACKET Ms. Bank 2016-17 SUMMER PACKET Ms. Bank Just so you know what to expect next year We will use the same text that was used this past year: published by McDougall Littell ISBN-13:978-0-6185-9402-3. Summer Packet

More information

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth Sets We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth century. Most students have seen sets before. This is intended

More information

On Equilibria of Distributed Message-Passing Games

On Equilibria of Distributed Message-Passing Games On Equilibria of Distributed Message-Passing Games Concetta Pilotto and K. Mani Chandy California Institute of Technology, Computer Science Department 1200 E. California Blvd. MC 256-80 Pasadena, US {pilotto,mani}@cs.caltech.edu

More information

Agreement Protocols. CS60002: Distributed Systems. Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur

Agreement Protocols. CS60002: Distributed Systems. Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Agreement Protocols CS60002: Distributed Systems Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Classification of Faults Based on components that failed Program

More information

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006 Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 2.4 2.6 of Rosen Introduction I When talking

More information

Automatic Synthesis of Distributed Protocols

Automatic Synthesis of Distributed Protocols Automatic Synthesis of Distributed Protocols Rajeev Alur Stavros Tripakis 1 Introduction Protocols for coordination among concurrent processes are an essential component of modern multiprocessor and distributed

More information

States and Actions: An Automata-theoretic Model of Objects

States and Actions: An Automata-theoretic Model of Objects States and Actions: An Automata-theoretic Model of Objects Uday S. Reddy 1 Brian P. Dunphy 2 1 University of Birmingham 2 University of Illinois at Urbana-Champaign Portland, Oct 2011 Uday S. Reddy (Univ

More information

OWO Lecture: Modular Arithmetic with Algorithmic Applications

OWO Lecture: Modular Arithmetic with Algorithmic Applications OWO Lecture: Modular Arithmetic with Algorithmic Applications Martin Otto Winter Term 2008/09 Contents 1 Basic ingredients 1 2 Modular arithmetic 2 2.1 Going in circles.......................... 2 2.2

More information

G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV

G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV Henrik Nilsson University of Nottingham, UK G54FOP: Lecture 17 & 18 p.1/33 These Two Lectures Revisit attempt to define denotational

More information

Loop Convergence. CS 536: Science of Programming, Fall 2018

Loop Convergence. CS 536: Science of Programming, Fall 2018 Solved Loop Convergence CS 536: Science of Programming, Fall 2018 A. Why Diverging programs aren t useful, so it s useful to know how to show that loops terminate. B. Objectives At the end of this lecture

More information

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

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 KAT and Hoare Logic In this lecture and the next we show that KAT subsumes propositional Hoare logic (PHL). Thus the specialized

More information

Analysis of a Randomized Local Search Algorithm for LDPCC Decoding Problem

Analysis of a Randomized Local Search Algorithm for LDPCC Decoding Problem Analysis of a Randomized Local Search Algorithm for LDPCC Decoding Problem Osamu Watanabe, Takeshi Sawai, and Hayato Takahashi Dept. of Mathematical and Computing Sciences, Tokyo Institute of Technology

More information

Benchmarking Model Checkers with Distributed Algorithms. Étienne Coulouma-Dupont

Benchmarking Model Checkers with Distributed Algorithms. Étienne Coulouma-Dupont Benchmarking Model Checkers with Distributed Algorithms Étienne Coulouma-Dupont November 24, 2011 Introduction The Consensus Problem Consensus : application Paxos LastVoting Hypothesis The Algorithm Analysis

More information

Ch 4.2 Divisibility Properties

Ch 4.2 Divisibility Properties Ch 4.2 Divisibility Properties - Prime numbers and composite numbers - Procedure for determining whether or not a positive integer is a prime - GCF: procedure for finding gcf (Euclidean Algorithm) - Definition:

More information