Page 1 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Chapter 6 Semantic Integrity in Component.

Slides:



Advertisements
Similar presentations
Copyright W. Howden1 Programming by Contract CSE 111 6/4/2014.
Advertisements

Component Oriented Programming 1 Chapter 2 Theory of Components.
 Both System.out and System.err are streams—a sequence of bytes.  System.out (the standard output stream) displays output  System.err (the standard.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
ISBN Chapter 3 Describing Syntax and Semantics.
Feb 2003 R McFadyen1 Contracts (Ch 13) Used to help understand requirements more completely based on assertions; assertions are applicable to any.
Basic Concepts in Component-Based Software Engineering
Page 1 Building Reliable Component-based Systems Chapter 16 - Component based embedded systems Chapter 16 Component based embedded systems.
Page 1 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Chapter 13 Components in Real-Time Systems.
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Karlstad University Computer Science Component Based Software Engineering, Västerås Semantic Integrity in Component Based Development Martin.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
1 Specifying Object Interfaces. 2 Major tasks in this stage: --are there any missing attributes or operations? --how can we reduce coupling, make interface.
Software Testing and Quality Assurance
Page 1 Building Reliable Component-based Systems Chapter 19 - Industrial Experience with Dassault Système Component Model Chapter 19 Industrial Experience.
Static and Dynamic Contract Verifiers For Java Hongming Liu.
Page 1 Building Reliable Component-based Systems Chapter 2 -Specification of Software Components Chapter 2 Specification of Software Components.
Axiomatic Semantics Dr. M Al-Mulhem ICS
Managed Assertions : language-neutral behavioral contracts for components 2 nd Rotor Workshop 25 April 2003 Nam Tran Monash University
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
Karlstad University Computer Science Design Contracts and Error Management Design Contracts and Errors A Software Development Strategy (anpassad för PUMA)
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Chapter 1 Principles of Programming and Software Engineering.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Page 1 Building Reliable Component-based Systems Chapter 14 - Testing Reusable Software Components in Safety- Critical Real-Time Systems Chapter 14 Testing.
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
Describing Syntax and Semantics
Eiffel Language and Design by Contract Contract –An agreement between the client and the supplier Characteristics –Expects some benefits and is prepared.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Subclasses and Subtypes CMPS Subclasses and Subtypes A class is a subclass if it has been built using inheritance. ▫ It says nothing about the meaning.
Component specification Main bibliography: –Ivica Crnkovic, Magnus Larsson (Eds.): Building reliable component- based systems Chapter 2: Specification.
CBSE 2014 Component specification. Bibliography Main bibliography: –Sommerville: Software Engineering, 8 th Edition Chapter 19.3 Component Composition.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Analyzing the Requirements with Formal Specifications Vienna Development Method Specification Language (VDM-SL) Book: Formal Software Development From.
Contract based programming Using pre- and post-conditions, and object invariants Contract based programming1.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
CS 261 – Data Structures Preconditions, Postconditions & Assert.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.5 Application: Correctness of Algorithms 1 [P]rogramming reliability – must be an activity.
ISBN Chapter 3 Describing Semantics.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Semantics In Text: Chapter 3.
WSDL – Web Service Definition Language  WSDL is used to describe, locate and define Web services.  A web service is described by: message format simple.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 32. Review Behavioral Patterns – Observer Pattern – Chain of command.
1 Assertions. 2 A boolean expression or predicate that evaluates to true or false in every state In a program they express constraints on the state that.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
CSSE501 Object-Oriented Development. Chapter 10: Subclasses and Subtypes  In this chapter we will explore the relationships between the two concepts.
Chapter 7 Programming by contract: preconditions and postconditions.
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
Chapter 1 Software Development Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Requirement Elicitation Review – Class 8 Functional Requirements Nonfunctional Requirements Software Requirements document Requirements Validation and.
Page 1, CBSE – graduate course Specification of Software Components Frank Lüders Mälardalen University, Dept. of Computer Engineering
Chapter 3 of Programming Languages by Ravi Sethi
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Used to help understand requirements more completely
Component Based Software Engineering
Topics: jGRASP editor ideosyncrasies assert debugger.
Accessible Formal Methods A Study of the Java Modeling Language
CSE 143 Error Handling [Section 2.8] 3/30/98 CSE 143.
Specifying Object Interfaces
Slides by Steve Armstrong LeTourneau University Longview, TX
CSC 143 Error Handling Kinds of errors: invalid input vs programming bugs How to handle: Bugs: use assert to trap during testing Bad data: should never.
Semantics In Text: Chapter 3.
Java Modeling Language (JML)
Assertions References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 4/25/2019.
Programming Languages 2nd edition Tucker and Noonan
Design Contracts and Errors A Software Development Strategy
Presentation transcript:

Page 1 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Chapter 6 Semantic Integrity in Component Based Development

Page 2 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Overview qIntroduction qGeneral Issues of Semantic Concern qLevels of Formalism for Semantic Specifications qPhases in a Component’s Life qA Taxonomy for Component Semantics

Page 3 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Introduction q The specification of an interface: l is partly syntactic, l partly semantic q The semantic component properties are expressed: l using invariants for the component as a whole l contracts expressed through pre- and postconditions, for each operation

Page 4 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Specification Levels q Levels of a component specification: l Syntax: includes specifications on the programming language level. l Behavior: relates to contracts. l Synchronization: describes the dependencies between services provided by a component. l Quality of service: deals with quality of service.

Page 5 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Contracts q The semantics of an operation are described with a contract. l Pre-condition: specifies the required entry conditions for activating the operation. l Post-condition: specifies the exit conditions guaranteed by the operation at the end of its execution, provided the pre-condition was satisfied at the entry. q The outcome in case the pre-condition was not satisfied is explicitly left undefined.

Page 6 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Required and Provided Interfaces q To be composable solely on the basis of its specification, a component needs to be equipped with: l Explicit declarations of functionality, synchronization and quality F required properties F provided properties Component

Page 7 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Levels of Formalism for Semantic Specifications qThe levels of formalism, in an increasing order of formalism: l No semantics l Intuitive semantics l Structured semantics l Executable semantics l Formal semantics

Page 8 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development An Example qC omponent RandomAccess l controlling the access to random access file of a record type R l records of a fixed size l access to the file is by record number. l It is assumed that the file is continuous.

Page 9 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development The contract q The precondition for this interface contract l single input parameter of the operation is the number of the record concerned, which must exist in the file. q The post-condition l result of the operation is the required data record of type R.

Page 10 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Level 0: No Semantics  The following definition of the operation getRecord illustrates how a purely syntactic specification would be given:

Page 11 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Intuitive Semantics  An intuitive specification of the operation getRecord :

Page 12 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Structured Semantics  A structured specification of the operation getRecord :

Page 13 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Executable Semantics q By “executable semantics” l expressed in a way that can be executed and controlled by the system during run-time. Executable specification for getRecord :

Page 14 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Trapping Offending Calls qFor debugging purposes, the component itself may use the executable precondition to trap offending calls:

Page 15 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Ensuring a Correct Call q The client code may also take advantage of the executable assertions by checking the precondition before the call, as illustrated below:

Page 16 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Formal Semantics qThe visible state of the random access component is defined in a state schema called RandomAccess q The term records represent all the records in the file and R is the record data type. l The variable hwm (for 'high water mark') shows how much of the file is in use.

Page 17 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development Formal Semantics Continued  The file operation is defined as a state schema called getRecord and is illustrated below:

Page 18 Building Reliable Component-based Systems Chapter 6 - Semantic Integrity in Component Based Development A Taxonomy for Component Semantics Lifecycle CreationUseMaintenance No semantics Intuitive semantics Structured semantics Executable semantics Formal semantics Semantic formalism ** *** ******* **** * ******** * **** * ******* ********* ****** ***