1 Formal Methods in SE Abstract Model Specification Lecture # 19.

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

1 Abstract Model Specification Tarang Garg Srikumar Nagaraj.
Component Oriented Programming 1 Chapter 2 Theory of Components.
Architecture Representation
Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str Thessaloniki Greece.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
21-February-2003cse Architecture © 2003 University of Washington1 Architecture CSE 403, Winter 2003 Software Engineering
Unified Modeling (Part I) Overview of UML & Modeling
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Foundations This chapter lays down the fundamental ideas and choices on which our approach is based. First, it identifies the needs of architects in the.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Design.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
IAY 0600 Digital Systems Design
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Paper written by Flavio Oquendo Presented by Ernesto Medina.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Winter 2007, rev. 2008SEG Chapter 21 Chapter 2 Basic Principles.
1 Introduction to Software Engineering Lecture 1.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Web Applications Extensions (WAE) for UML UML helps manage the complexity by encouraging us to think of things in terms of objects and encapsulate properties.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised.
Understanding and using patterns in software development EEL 6883 Software Engineering Vol. 1 Chapter 4 pp Presenter: Sorosh Olamaei.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
A modular metadata-driven statistical production system The case of price index production system at Statistics Finland Pekka Mäkelä, Mika Sirviö.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
Chapter 19: Interfaces and Components [Arlow and Neustadt, 2005] University of Nevada, Reno Department of Computer Science & Engineering.
1 Abstract Model Specification. 2 Explicitly describes behavior in terms of a model using well-defined types (viz. set, sequences, relations, functions)
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
UML Profile BY RAEF MOUSHEIMISH. Background Model is a description of system or part of a system using well- defined language. Model is a description.
Information Design Trends Unit 4 : Sources and Standards Lecture 1: Content Management Part 1.
Lecture VIII: Software Architecture
CS223: Software Engineering Lecture 13: Software Architecture.
An Object-Z / CSP Based Approach for the Specification of Architectural Connectors Mourad Maouche Philadelphia University Jordan Mohamed Bettaz MESRS Algeria.
Systems Architectures System Integration & Architecture.
ALLOY: A Formal Methods Tool Glenn Gordon Indiana University of Pennsylvania COSC 481- Formal Methods Dr. W. Oblitey 26 April 2005.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Principles of Programming & Software Engineering
Security analysis of COM with Alloy
Object Oriented Programming
Object-Oriented Analysis and Design
Chapter ? Quality Assessment
SysML v2 Formalism: Requirements & Benefits
SOFTWARE DESIGN AND ARCHITECTURE
Component-Level Design
Component-Level Design
Logical architecture refinement
Component-Level Design
Chapter 20 Object-Oriented Analysis and Design
Chapter 9 Architectural Design.
Paper written by Flavio Oquendo Presented by Ernesto Medina
Algebraic Specification Software Specification Lecture 34
Ponder policy toolkit Jovana Balkoski, Rashid Mijumbi
Presentation transcript:

1 Formal Methods in SE Abstract Model Specification Lecture # 19

2 Advantages  The flexibility to model a specification which can directly lead to the code.  Easy to understand  A large class of structural models can be described in Z without higher – order features, and can thus be analyzed efficiently.  Independent Conditions can be added later

3 Chemical Abstract Model CHAM: for architectural description and analysis. Software Systems chemicals (whose reactions are controlled by explicitly stated rules). Where floating molecules can only interact according to a stated set of reaction rules.

4 Features(CHAM) - Modular specification -Chemical reactions -Molecules (components) -Reactions (Connectors) -Solutions (States of CHAM) -This is used in areas where intended architecture will tend to be large, complex, and assembled from existing components. -Architectural elements: Processing elements, data elements, and connecting elements.

5 Alloy: A Lightweight Object Modeling Notation

6 Introduction Alloy –Is a modeling notation that describes structural properties –Has a declaration syntax compatible with graphical object models –Has a “set-based” formula syntax –Is based on “Z”

7 Example File System DirEntryNameObject contents ! name ! Parent (~children) entries ! Dir File Root!

8 Example (File System) model FileSystem { domain {Object, DirEntry, fixed Name} state { partition File, Dir: static Object Root: fixed Dir! entries: Dir! -> DirEntry name: DirEntry -> static Name! contents: DirEntry -> static Object! parent (~children) : Object -> Dir } def parent {all o | o.parent = o.~contents.~entries} inv UniqueNames {all d | all e1, e2: d.entries | e1.name = e2.name -> e1 = e2} inv Parents { no Root.parent all d: Dir – Root | one d.parent} inv Acyclic {no d | d in d.+parent} inv Reachable {Object in Root.*children} cond TwoDeep {some Root.children.children} assert FileHasEntry {all o | sole o.parent} assert AtMostOneParent {all o | sole o.parent} op NewDirEntries (d: Dir, es: DirEntry’) { no es & DirEntry d.entries’ = d.entries + es all x: Dir – d | x.entries’ = x.entries } op Create (d: Dir!, o: Object’!, n: Name) { n! in d.entries.name some e: DirEntry’ | NewDirEntries (d, e) && e.contents’ = o && e.name’ = n} assert EntriesCreated {all d: Dir, e: DirEntry’ | NewDirEntries (d, e) -> DirEntry’ = DirEntry + e} assert CreateWorks {all d, o, n | Create (d, o, n) -> o n d.children’} }

9 Example (File System) Structure of the model –Domain paragraph –State paragraph –Definition paragraph –Invariants –Condition –Assertions –Operations –Assertions

10 Analysis Alloy supports two kinds of analysis –Simulation: Consistency of an invariant or operation is demonstrated by generating a state or transition. –Checking: A consequence of a specification is tested by attempting to generate a counterexample. Together they enable an incremental process of specification.

11 Based On Z Alloy is based on Z because: –Simple and intuitive semantics (based on sets). –Well suited for object oriented modeling. –Data structures are built from concrete mathematical structures.

12 Features Automatic analysis –Theorem proving is deep & automatic. Easier to read and write. Plain ASCII notation. Relational operators are powerful. Incorporates mutability notions from informal notations.

13 Design Faults Omission of the let construct & relational operators No integers No distinction between attributes and relations

14 Formalizing Style to Understand Descriptions of Software Architecture

15 Introduction Software architecture describes a software system Architectural descriptions are informal & diagrammatic Represented by boxes & lines –For one system they may mean filters & pipes –For another system boxes  abstract data types or objects & lines  procedure calls

16 Introduction Different graphical conventions used to describe more than one kind of component or connection type in a single system Generalized meanings to architectural descriptions

17 How is it done? Formalize abstract syntax for architectures For a given style: –Define the semantic model –Discuss concrete syntax for easing syntactic descriptions in a given style –Define the mapping from abstract syntax into semantic model –Make explicit the constraints on the syntax

18 How is it done? Demonstrate analysis within & between formally defined architectural styles

19 Abstract Syntax of Software Architectures Component: –Relationship between component & it’s environment is defined as a collection of interaction points or ports: [PORT, COMPDESC] Component ports : P PORT description : COMPDESC

20 Abstract Syntax of Software Architectures Connectors: –Connector has an interface that consists of a set of roles: [ROLE, CONNDESC] Connector roles : P ROLE description : CONNDESC

21 Abstract Syntax of Software Architectures Instances of components & connectors are identified by naming elements from the syntactic class [COMPNAME, CONNNAME] PortInst == COMPNAME x PORT RoleInst == CONNNAME x ROLE

22 Step 1 (Define Semantic Model) Filter Alphabet : DATAPORT P DATAPORT States : P STATE Start : STATE Transitions : (STATE x (DATAPORT seq DATA)) (STATE x (DATAPORT seq DATA)) Inputs n outputs = o Dom alphabet = inputs u outputs Start  states Inputs, outputs : P DATAPORT s1, s2 : STATE ; ps1, ps2 : DATAPORT seq DATA ((s1, ps1), (s2, ps2))  transitions s1  states  s2  states  dom ps1 = inputs  dom ps2 = outputs  ( i : inputs ran (ps1(i))  alphabet(i))  ( o : outputs ran (ps2(o))  alphabet(o))

23 Step 1 (Define Semantic Model) Pipe source, sink : DATAPORT alphabet : P DATA source = sink

24 Step 2 Define Concrete Syntax FilterDescriptions : P COMPDESC PipeDescription : P CONNDESC

25 Step 3 Mapping from Abstract Syntax to Semantic Model  PF Comp : Connector P Pipe  c : Connector ; p1, p2 : Pipe | p1   PF Comp (c ) p2   PF Comp (c )  p1.alphabet = p2.alphabet

26 Step 4 Highlight the constraints in the syntax LegalPFComponent Component Description  FilterDescriptions

27 Advantages Provides a templates for formalizing new architectural styles in a uniform way Provides uniform criteria for demonstrating that the notational constraints on a style are sufficient to provide meanings for all described systems Makes possible a unified semantic base through which different stylistic interpretations can be compared