MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.

Slides:



Advertisements
Similar presentations
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Advertisements

Ch 7 B.
Programming Languages and Paradigms The C Programming Language.
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
Chapter 9: Access Control Lists
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 7: References and Assignment.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
© 2007 Cisco Systems, Inc. All rights reserved.ICND2 v1.0—6-1 Access Control Lists Introducing ACL Operation.
Slide 1 Specification & Description Language (SDL) - Part II.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Fundamentals of Strings and Characters Characters.
Structure of a C program
C Programming Basics Lecture 5 Engineering H192 Winter 2005 Lecture 05
Slide 1 Specification & Description Language (SDL) - Part II.
16-Jun-15 Recursion. 2 Definitions I A recursive definition is a definition in which the thing being defined occurs as part of its own definition Example:
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
28-Jun-15 Recursion. 2 Definitions I A recursive definition is a definition in which the thing being defined occurs as part of its own definition Example:
1 Semester 2 Module 11 Access Control Lists (ACLs) Yuda college of business James Chen
Objectives Configure routing in Windows Server 2008 Configure Network Address Translation 1.
CIS Computer Programming Logic
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
Chapter 4: Control Structures I (Selection). Objectives In this chapter, you will: – Learn about control structures – Examine relational operators – Discover.
Chapter 4: Control Structures I (Selection). Objectives In this chapter, you will: – Learn about control structures – Examine relational and logical operators.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
Saeed Darvish Pazoki – MCSE, CCNA Abstracted From: Cisco Press – ICND 2 – 6 IP Access Lists 1.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
RTL Hardware Design by P. Chu Chapter Basic VHDL program 2. Lexical elements and program format 3. Objects 4. Data type and operators RTL Hardware.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics.
Basic Java Syntax COMP 401, Spring 2014 Lecture 2 1/14/2014.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
Topic 3: C Basics CSE 30: Computer Organization and Systems Programming Winter 2011 Prof. Ryan Kastner Dept. of Computer Science and Engineering University.
Repetition. Loops Allows the same set of instructions to be used over and over again Starts with the keyword loop and ends with end loop. This will create.
 2003 Prentice Hall, Inc. All rights reserved. 1 IS 0020 Program Design and Software Tools Preprocessor Midterm Review Lecture 7 Feb 17, 2004.
Chapter 4: Control Structures I (Selection). Objectives In this chapter, you will: – Learn about control structures – Examine relational and logical operators.
How to write a MSGQ Transport (MQT) Overview Nov 29, 2005 Todd Mullanix.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
CSC 143A 1 CSC 143 Introduction to C++ [Appendix A]
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 5 SQL.
Programmeren 1 6 september 2010 HOORCOLLEGE 2: INTERACTIE EN CONDITIES PROGRAMMEREN 1 6 SEPTEMBER 2009 Software Systems - Programming - Week.
Language Find the latest version of this document at
Place your image on top of this gray box. If no graphic is applicable, delete gray box and notch-out behind gray box, from the Title Master MOTOROLA and.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
FDT Foil no 1 Basic SDL Specification and Description Language Basic SDL.
1 An SDL Tutorial Two primary elements: –Structure –Identifies the various components of the system, and the communication paths among them. –Components:
Presentation By :- Nikhil R. Anande ( ) Electronic & Communication Engineering. 3 nd Year / 5 th Semester FACULTY GUIDE : RAHIUL PATEL SIR MICROCONTROLLER.
CSE 110: Programming Language I Matin Saad Abdullah UB 1222.
1 © 2004, Cisco Systems, Inc. All rights reserved. Introduction to Classless Routing.
Secure Coding Rules for C++ Copyright © 2016 Curt Hill
C LANGUAGE MULITPLE CHOICE QUESTION SET-2
Chapter 1.2 Introduction to C++ Programming
Definition of the Programming Language CPRL
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Protocol Modeling Eng. Ahmed Badr Tutorial 2 Theoretical
Chapter 10 Programming Fundamentals with JavaScript
Input Space Partition Testing CS 4501 / 6501 Software Testing
CS230 Tutorial Week 3.
Secure Coding Rules for C++ Copyright © Curt Hill
Introduction to the C Language
Starting JavaProgramming
Chapter 5 SDL - Data 2007, rev. 08 SEG2101 Chapter 5.
An overview of Java, Data types and variables
Do … Loop Until (condition is true)
SE1H421 Procedural Programming LECTURE 4 Operators & Conditionals (1)
Contents Preface I Introduction Lesson Objectives I-2
Software Engineering Group, Motorola India Electronics Pvt. Ltd.,
2. Second Step for Learning C++ Programming • Data Type • Char • Float
Chap 2. Identifiers, Keywords, and Types
Problem 1 Given n, calculate 2n
Presentation transcript:

MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc June 2004 Guidelines for Using SDL in Product Development Frank Weil Motorola Global Software Group – Software Design Automation

Frank Weil, 04 June Overview General Recommendations for Design Models Recommendations on SDL Usage for Design Performance Considerations Platform Interfaces Portability Issues Example Models

Frank Weil, 04 June SDL for Design Two inherent problems: Bad things can happen behind the scenes –Deadlocks –Signal send to a dead / invalid / unreachable process –…–… –It is hard to prove correctness! Syntactically/semantically correct models can be confusing –Subrange constants are ignored in data type definition –Unused signals, data types, variables, procedures, … –…–… –Excuse: “If they new the semantics better, it would not be confusing” –Obvious things should have obvious semantics

Frank Weil, 04 June General Recommendations Nondeterminism and Fairness –SDL has several nondeterministic features –A good design should be deterministic –Nondeterminism does not imply fairness Abstraction –Everything should be made as simple as possible, but no simpler! - Albert Einstein –Model must capture concepts, not irrelevant details

Frank Weil, 04 June Examples Models First, a bad example Then, a good example for comparison Read the paper for details (please?)

Frank Weil, 04 June system SAM04_bad_example1(1) newtype call_info struct header Integer; path Natural; dest destination_select; toggle Boolean; payload payload_t; level Real; endnewtype; syntype destination_select = Destinations constants 0 : 255 endsyntype; syntype update_type = Integer constants 0, 2, 4, 8 endsyntype; newtype STATUS literals standby, current, update endnewtype; syntype update_interval = Natural constants -10 : 10 endsyntype; syntype cmd_type = Charstring endsyntype; syntype Buffer = Charstring endsyntype; syntype Destinations = Integer constants 1 : 100 endsyntype; syntype payload_t = Charstring constants size(10) endsyntype; signal packet(call_info); signal new_packet(call_info); signal control(Natural); signal updates(update_type); signal status(STATUS); signal command(cmd_type, Buffer); signal config; signallist inbound_signals = packet, control, command, config; signallist outbound_signals = updates, new_packet; switch outbound1 (outbound_signals) traffic (inbound_signals) outbound2 (outbound_signals)

Frank Weil, 04 June block switch1(1) router handler(0) traffic inbound (inbound_signals) internal packet outbound1 odd (outbound_signals) even (outbound_signals) outbound2

Frank Weil, 04 June (2)

Frank Weil, 04 June (2)

Frank Weil, 04 June

Frank Weil, 04 June process router synonym 911 cmd_type = 'EMERGENCY'; synonym REMOVE_CMD cmd_type = 'REMOVE'; synonym max_proc processes = 5; syntype processes = Integer constants 1 : 5 endsyntype; timer TIM;dcl i, d, pow Integer; dcl j processes; dcl ci, ci_tmp call_info; dcl ct cmd_type; dcl ts Boolean := false; dcl b Buffer; /* 16-bit unsigned int, LSB first */ j := 1 d := 1 j <= max_proc set(100, TIM)Handler 'done with initialization'j := j + 1 idle (false)(true) 1(2) number as identifier Charstring instead of enum can be decluttered loop control is wrong Time literal informal text as comment case insensitivity

Frank Weil, 04 June (2) procedure log; fpar in stat Integer; external; C reserved word ambiguous signal send marshaling Duration precision copy of large data structure possibly incompatible ranges can be decluttered invalid String access

Frank Weil, 04 June can be decluttered case insensitivity send to a dead process Real equality Charstring size constraint violation

Frank Weil, 04 June block switch1(1) router handler(0) traffic inbound (inbound_signals) internal packet outbound1 odd (outbound_signals) even (outbound_signals) outbound2 C keyword no max number of process instances

Frank Weil, 04 June system SAM04_bad_example 1(1) newtype call_info struct header Integer; path Natural; dest destination_select; toggle Boolean; payload payload_t; level Real; endnewtype; syntype destination_select = Destinations constants 0 : 255 endsyntype; syntype update_type = Integer constants 0, 2, 4, 8 endsyntype; newtype STATUS literals standby, current, update endnewtype; syntype update_interval = Natural constants -10 : 10 endsyntype; syntype cmd_type = Charstring endsyntype; syntype Buffer = Charstring endsyntype; syntype Destinations = Integer constants 1 : 100 endsyntype; syntype payload_t = Charstring constants size(10) endsyntype; signal packet(call_info); signal new_packet(call_info); signal control(Natural); signal updates(update_type); signal status(STATUS); signal command(cmd_type, Buffer); signal config; signallist inbound_signals = packet, control, command, config; signallist outbound_signals = updates, new_packet; switch outbound1 (outbound_signals) traffic (inbound_signals) outbound2 (outbound_signals) unused signals and data types signal not used in this version marshaling unbounded / incorrectly bounded aggregate data types underconstrained sort nonsensical / confusing data type definitions C keyword

Frank Weil, 04 June system SAM04_good_example1(1) newtype call_info struct header Integer; path path_t; dest destination_select; toggle Boolean; payload payload_t; level Real; endnewtype; syntype path_t = Natural constants 0 : 1 endsyntype; syntype destination_select = Natural constants 0 : 255 endsyntype; syntype payload_t = Charstring constants size(5) endsyntype; signal packet(call_info); signal new_packet(call_info); signal emergency(Integer); signal remove; signal config; signallist inbound_signals = packet, emergency, remove, config; signallist outbound_signals = new_packet; switcher outbound1 (outbound_signals) traffic (inbound_signals) outbound2 (outbound_signals)

Frank Weil, 04 June block switcher 1(1) synonym max_proc Natural = 5; signal dead(processes), okay; syntype processes = Natural constants 1 : max_proc endsyntype; router(1,1) handler (0, max_proc) traffic inbound (inbound_signals) internal packet, okay dead outbound1 odd (outbound_signals) even (outbound_signals) outbound2

Frank Weil, 04 June process router1(2) timer TIM;dcl d destination_select := 1; dcl j processes := 1; dcl ci call_info; dcl ts Boolean := false; dcl count processes := max_proc; newtype pids Array(processes, Pid) endnewtype; dcl handlers pids; dcl next_handler processes := 1; procedure heartbeat; fpar in stat Integer; external; set_next_handler * confighandled in phase 2 handler(j) - handlers(j) := offspring j < max_proc j := j + 1set(now , TIM)done with initialization idle (true)(false)

Frank Weil, 04 June process router2(2) idle dead(j)TIMpacket(ci)emergency(d)remove okay to senderheartbeat(1) ci!dest := d, ci!toggle := ts ts := not ts countset(now+7325, TIM) packet(ci) to handlers(next_handler) handlers(j) := Null, count := count - 1 set_next_handler - else (1)

Frank Weil, 04 June

Frank Weil, 04 June ; fpar me processes; process handler1(1) dcl ci call_info; dying build_payload okay* near idle - packet(ci) ci!payload := call build_payload(ci!path, ci!toggle) ci!path call near(ci!level, 3.0) ci!level := ci!level * 5 new_packet(ci) via evennew_packet(ci) via odd ci!header dead(me) dying- (1)(0) (false) (true) (0) else

Frank Weil, 04 June ; fpar in path path_t, in toggle Boolean; returns payload_t; procedure build_payload1(1) syntype position = Integer constants 4 : 5 endsyntype; dcl insert position; dcl payload payload_t; path payload := 'even ', insert := 5 payload := 'odd ', insert := 4 toggle payload(insert) := 'T'payload(insert) := 'F' payload (0)(1) (true)(false)

Frank Weil, 04 June ; fpar in a Real, in b Real; returns Boolean; procedure near1(1) synonym epsilon Real = ; fix((a - b) / epsilon) = 0