ISpec: A Compositional Approach to Interface Specification

Slides:



Advertisements
Similar presentations
CBSD – Component Based Software Development - Introduction -
Advertisements

Page 1 Building Reliable Component-based Systems Chapter 2 -Specification of Software Components Chapter 2 Specification of Software Components.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
1 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2002] January 26, 2006.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
What is UML? What is UP? [Arlow and Neustadt, 2005] January 23, 2014
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 A Discipline of Software Design.
An Introduction to Software Architecture
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Introduction to the Unified Modeling Language “The act of drawing a diagram does not constitute analysis or design. … Still, having a well-defined and.
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
By Xiangzhe Li Thanh Nguyen.  Introduction  Terminology  Architecture  Component  Connector  Configuration  Architectural Style  Architectural.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Software Engineering Lecture 8 Object-Oriented Analysis.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 32. Review Behavioral Patterns – Observer Pattern – Chain of command.
Winter 2007SEG2101 Chapter 31 Chapter 3 Requirements Specifications.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Documenting an Architecture 10 pages, half pictures.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
UML (Unified Modeling Language)
Introduction to OOAD and UML
Component-Based Software Engineering Components and Interfaces Paul Krause and Sotiris Moschoyiannis.
Chapter 17 - Component-based software engineering
Formal Specification.
An Overview of Requirements Engineering Tools and Methodologies*
Object-oriented and Structured System Models
UML Diagrams By Daniel Damaris Novarianto S..
Chapter 1: Introduction to Systems Analysis and Design
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
School of Business Administration
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
What is UML? What is UP? [Arlow and Neustadt, 2005] October 5, 2017
Physical Data Model – step-by-step instructions and template
Systems Analysis and Design With UML 2
Use Case Model.
Iterative design and prototyping
OO Domain Modeling With UML Class Diagrams and CRC Cards
UML Diagrams Jung Woo.
HCI in the software process
The design process Software engineering and the design process for interactive systems Standards and guidelines as design rules Usability engineering.
The design process Software engineering and the design process for interactive systems Standards and guidelines as design rules Usability engineering.
Informatics 121 Software Design I
Introduction to Components and Specifications Using RESOLVE
Documenting an Architecture
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Patterns.
Slides by Steve Armstrong LeTourneau University Longview, TX
Component--based development
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Software Design Lecture : 15.
HCI in the software process
An Introduction to Software Architecture
Chapter 1: Introduction to Systems Analysis and Design
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction Modeling Extracted from textbook:
HCI in the software process
Software system modeling
Chapter 1: Introduction to Systems Analysis and Design
Software Development Process Using UML Recap
Formal Methods Lecture 16 March 22, 2011 CS 315 Spring 2011
Software Architecture & Design
Presentation transcript:

ISpec: A Compositional Approach to Interface Specification Hans Jonkers HJ031120-1 ISpec

Introduction ISpec: an incremental, structured, compositional approach to Interface Specification Focus: interfaces in the context of component technology Rationale: increasing use of component technology in Philips PDs importance of interfaces in product family architectures no ready-made practical and sound approach available HJ031120-2 ISpec

Component Technology Component (Szyperski): Component technologies: “A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties.” Component technologies: Provide the “wiring technology” for components Examples: COM(+), .NET, J2EE, CORBA, Koala ISpec focuses on “COM/.NET-like” components HJ031120-3 ISpec

Main Objectives Provide an approach to interface specification that provides a considerable improvement on the current quality of interface specifications is practically feasible and acceptable to industrial software engineers fits in with main-stream O-O modeling techniques (UML) avoids the YASL syndrom HJ031120-4 ISpec

Main Features of ISpec multiple levels of detail and formality a contractual view of interfaces a model-based style of specification restricted use of object-oriented modeling (UML) template-based construction of specifications interface specifications as composable entities HJ031120-5 ISpec

Usage of ISpec Large-scale investments in writing proper interface specifications pay off in case of long-lived interfaces (APIs) only. Usage of ISpec in Philips: Medical Systems: specification of MIP interfaces (Medical Imaging Platform) Semiconductors: specification of DVP interfaces (Digital Video Platform) In both cases customized versions of ISpec are used. HJ031120-6 ISpec

Specification as a Balancing Act HJ031120-7 ISpec

Unit of Specification Possible choices: Interface Group of interfaces associated with the same HW/SW implementation unit (“physical component”) Group of interfaces associated with the same functional unit (“logical component”) interface suite HJ031120-8 ISpec

Interface Suites interface suite: a collection of mutually related interfaces providing access to coherent functionality Example: Microsoft COM connection point interface suite HJ031120-9 ISpec

Contractual View ISpec specifications are based on a contractual view: The specification of an interface suite, is considered a contract between the providers and users of the interfaces in the suite. The contract identifies, among other things: The functionality defined by the suite The interfaces contained in the suite The contractual parties, represented by roles The relations between roles and interfaces (“provides”, “requires”) and between roles (“specializes”) The terms and concepts associated with the suite The rights and obligations associated with the roles HJ031120-10 ISpec

Interface-Role Model The interface-role model takes a central place in an ISpec specification. It is an enhanced UML class diagram summarizing the main ingredients of the contract: the roles the interfaces associated with roles the provides and requires relation between roles and interfaces the specializes relation between roles HJ031120-11 ISpec

Observer Interface-Role Model HJ031120-12 ISpec

Contractual Interpretation An implementer that signs for one or more roles in an i-spec S has the right to use an interface I defined in S if and only if he has signed for a role that requires I. has the right to provide an interface I defined in S if and only if he has signed for a role R that provides I. has the obligation to provide all interfaces provided by the roles he signed for. HJ031120-13 ISpec

AnalogAudioDecoder IR-Model HJ031120-14 ISpec

IR Model: UML Notations HJ031120-15 ISpec

Why Roles? We need some way to refer to the providers and users of interfaces without referring to implementation entities Roles embody the relations between interfaces Roles help in structuring the functionality Roles are placeholders for specifying behavior; interfaces act as the ‘windows’ on this behavior Roles support the construction of a specification as a contract HJ031120-16 ISpec

API Specifications as Contracts identifies the functionality identifies the interfaces identifies the roles defines the terms and concepts defines the rights and obligations of roles HJ031120-17 ISpec

Implementing = “Signing” the Contract (1) HJ031120-18 ISpec

Implementing = “Signing” the Contract (2) HJ031120-19 ISpec

Implementing Roles The implementer of a role should guarantee that all obligations of the role are satisfied may rely on the obligations of other roles being satisfied An implementation of an interface defined by an i-spec is an implementation of the role providing the interface. HJ031120-20 ISpec

Playing Roles An object may play multiple roles A role may be played by multiple objects HJ031120-21 ISpec

ISpec Contract Structure HJ031120-22 ISpec

Observer I-Spec interface-role diagram abstract-model diagram semantic constraints attach Signature void attach( Observer obs ) Summary Registers an observer. Parameters obs: the observer to be registered. Return value None Precondition true Action modify observers Postcondition observers = observers’  { obs } ..... HJ031120-23 ISpec

Model-Based Specification Specifying a system by means of an abstract model amounts to defining an “abstract implementation” of the system. An implementation conforms to the specification if it behaves “in the same way” as the abstract model. Essential notion: observable behaviour HJ031120-24 ISpec

Observable Behaviour An implementation conforms to a model-based specification if its observable behaviour is consistent with that of the model. This requires a proper definition of which parts of the behaviour of a model are observable. General definition: The observable behaviour of a model consists of the interactions that can be observed at the external software and hardware interfaces of roles. Consequence: Defining observable behaviour may require explicit hardware modelling. HJ031120-25 ISpec

Impressionistic versus Expressionistic Modeling ISpec HJ031120-26 ISpec

Abstract Model Diagram The abstract model diagram is defined by specializing the interface- role diagram, i.e. by associating attributes and relations with roles introducing auxiliary roles and methods where appropriate It defines the vocabulary of an i-spec HJ031120-27 ISpec

Observer Abstract Model Diagram HJ031120-28 ISpec

Specifying Behaviour Behaviour is specified in terms of the vocabulary defined by the abstract model diagram Attributes associate state with roles Elementary actions: state transitions method calls method returns Behaviour is phrased in terms of rights and obligations associated with roles Only observable behaviour is relevant HJ031120-29 ISpec

Method Behaviour HJ031120-30 ISpec

Behavioral Aspects of Methods initial state final state modification rights out-calls interaction threading activation timing How to specify:  precondition  postcondition  action clause  Thread class  activation tables  clock HJ031120-31 ISpec

Extended Pre & Post Specs An extended pre- and post-condition specification has an additional action clause providing an abstract operational description of the method. Method Specification Method f(...) Precondition P Action A Postcondition Q Contractual Interpretation if the caller guarantees condition P is true immediately before the call then the callee will perform action A and guarantees that condition Q is true immediately after the call HJ031120-32 ISpec

Example Method void increment() Precondition x  0 Action modify x y.foo() Postcondition x = x’ + 1 changes value of x in unspecified way out-call refers to ‘old’ value of x HJ031120-33 ISpec

Composing Specifications Unit of interface specification: interface suite Interface suite is specified in separate document: s-doc An s-doc S may be based on s-docs S1, ..., Sn implying that S includes the texts of S1, ..., Sn additions of S to S1, ..., Sn are conservative (“Closed World Assumption”) delta-spec HJ031120-34 ISpec

Composing the Observer Spec In delta-spec of ConcreteObserver: update() should call getState() so as to update state HJ031120-35 ISpec

Composing the AA Decoder Spec HJ031120-36 ISpec

Interface Suite Hierarchy HJ031120-37 ISpec

Document Structure Main Purpose list the external interface suites used explain the concepts define the semantics map to the technology provide hints for interface users provide hints for interface providers provide an alphabetical list of terms the contractual stuff HJ031120-38 ISpec

Specification Templates HJ031120-39 ISpec

More on ISpec General: Hans Jonkers, ISpec: Towards Practical and Sound Interface Specifications, IFM 2000. Compositionality: Hans Jonkers, Interface-Centric Architecture Descriptions, WICSA 2001. HJ031120-40 ISpec