1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture Building reliable component-based systems - Chapter 6: Semantic integrity in component based development

18 22 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Slide 1

  • Overview

  • Introduction

  • Specification Levels

  • Contracts

  • Required and Provided Interfaces

  • Levels of Formalism for Semantic Specifications

  • An Example

  • The contract

  • Level 0: No Semantics

  • Intuitive Semantics

  • Structured Semantics

  • Executable Semantics

  • Trapping Offending Calls

  • Ensuring a Correct Call

  • Formal Semantics

  • Formal Semantics Continued

  • A Taxonomy for Component Semantics

Nội dung

This chapter presents the following content: Introduction, general issues of semantic concern, levels of formalism for semantic specifications, phases in a component’s life, a taxonomy for component semantics.

Chapter Semantic Integrity in Component Based Development Building Reliable Component­based  Overview Introduction General Issues of Semantic Concern Levels of Formalism for Semantic Specifications Phases in a Component’s Life A Taxonomy for Component Semantics Building Reliable Component­based  Introduction The specification of an interface: is partly syntactic, partly semantic The semantic component properties are expressed: using invariants for the component as a whole contracts expressed through pre- and postconditions, for each operation Building Reliable Component­based  Specification Levels Levels of a component specification: Syntax: includes specifications on the programming language level Behavior: relates to contracts Synchronization: describes the dependencies between services provided by a component Quality of service: deals with quality of service Building Reliable Component­based  Contracts The semantics of an operation are described with a contract Pre-condition: specifies the required entry conditions for activating the operation 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 The outcome in case the pre-condition was not satisfied is explicitly left undefined Building Reliable Component­based  Required and Provided Interfaces To be composable solely on the basis of its specification, a component needs to be equipped with: Explicit declarations of functionality, synchronization and quality required properties provided properties Component Building Reliable Component­based  Levels of Formalism for Semantic Specifications The levels of formalism, in an increasing order of formalism: No semantics Intuitive semantics Structured semantics Executable semantics Formal semantics Building Reliable Component­based  An Example C omponent RandomAccess controlling the access to random access file of a record type R records of a fixed size access to the file is by record number It is assumed that the file is continuous Building Reliable Component­based  The contract The precondition for this interface contract single input parameter of the operation is the number of the record concerned, which must exist in the file The post-condition result of the operation is the required data record of type R Building Reliable Component­based  Level 0: No Semantics The following definition of the operation getRecord illustrates how a purely syntactic specification would be given:   public R getRecord(int number) throws IOException  Building Reliable Component­based  Intuitive Semantics An intuitive specification of the operation getRecord:   The operation getRecord retrieves a record by its number,  returning the record requested. If an error occurs, such as a disk  read error or a file system error, the an I/O error is returned.  Building Reliable Component­based  Structured Semantics A structured specification of the operation getRecord: getRecord returns a record identified by its number Parameters: number: the number of the record to retrieve, counted from zero Precondition: number >= 0 and number 

Ngày đăng: 15/05/2020, 22:04