Requirements Modelling and Software Systems Implementation Using Formal Languages

Similar documents
Formal Foundations of Software Engineering

Model Driven Engineering (MDE)

Model Driven Engineering (MDE) and Diagrammatic Predicate Logic (DPL)

Modelling in Enterprise Architecture. MSc Business Information Systems

Introduction to Formal Methods

Enhancing validation with Prototypes out of Requirements Model

Introduction to Software Specifications and Data Flow Diagrams. Neelam Gupta The University of Arizona

OCL Support in MOF Repositories

LECTURE 6: INTRODUCTION TO FORMAL METHODS. Software Engineering Mike Wooldridge

Techniques for the unambiguous specification of software

Formal Methods in Software Design. Markus Roggenbach

MONIKA HEINER.

An Introduction to MDE

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Formal Methods for Software Engineers

Seite 1. "Formal specifications may become for software engineers what, say, differential equations are for engineers of other fields.

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

Chapter 8: Enhanced ER Model

USE CASE BASED REQUIREMENTS VERIFICATION

Formal Specification of Software Systems

Modeling Issues Modeling Enterprises. Modeling

March 2, Homepage:

Metamodeling with Metamodels. Using. UML/MOF including OCL

Raising the Level of Development: Models, Architectures, Programs

Describing Computer Languages

Graph Representation of Declarative Languages as a Variant of Future Formal Specification Language

SUMMARY: MODEL DRIVEN SECURITY

Business Process Modelling

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Chapter 8 The Enhanced Entity- Relationship (EER) Model

bahmanzamani.com Computer Engineering i Dept. University of Isfahan

Model driven Engineering & Model driven Architecture

Unambiguous, Non-Binding Requirements for MDA. -David Hansz, Requirements Analyst -David Fado, Software Architect

Designing a System Engineering Environment in a structured way

Software Design, Modelling and Analysis in UML

Chapter 10 Formal Specification

ArchiMate 2.0. Structural Concepts Behavioral Concepts Informational Concepts. Business. Application. Technology

Methods for requirements engineering

Q Body of techniques supported by. R precise mathematics. R powerful analysis tools. Q Rigorous, effective mechanisms for system.

Topic Formal Methods. ICS 121 Lecture Notes. What are Formal Methods? What are Formal Methods? Formal Specification in Software Development

Lecture 02: Semantical Model

ROLE OF OCL AND ITS SUPPORTING TOOLS IN REQUIREMENT SPECIFICATION

A Formal Approach to Modeling and Model Transformations in Software Engineering

Engineering Design Notes I Introduction. EE 498/499 Capstone Design Classes Klipsch School of Electrical & Computer Engineering

QoS-aware model-driven SOA using SoaML

Knowledge-based Systems for Industrial Applications

SCOS-2000 Technical Note

Refinement and Formalization of Semi-Formal Use Case Descriptions

A REVIEW OF BASIC KNOWLEDGE OF DATABASE SYSTEM

Object-Oriented Software Engineering Practical Software Development using UML and Java

Model-Driven *: Beyond Code Generation

Contents. Chapter 1 SPECIFYING SYNTAX 1

Open Work of Two-Hemisphere Model Transformation Definition into UML Class Diagram in the Context of MDA

Requirements and Design Overview

WAY OF WORKING TRANSFORMATION TO INTEGRATED MODEL DRIVEN DEVELOPMENT (MDD) AND MODEL- BASED TESTING (MBT)

1.1 Software Life Cycle

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Reusable Object-Oriented Model

CHAPTER 9 DESIGN ENGINEERING. Overview

Formal Verification for safety critical requirements From Unit-Test to HIL

Science of Computer Programming. Aspect-oriented model-driven skeleton code generation: A graph-based transformation approach

A UML 2 Profile for Variability Models and their Dependency to Business Processes

AUTOMATED BEHAVIOUR REFINEMENT USING INTERACTION PATTERNS

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

CSSE 490 Model-Based Software Engineering: Introduction to Domain Engineering

Whole Platform Foundation. The Long Way Toward Language Oriented Programming

Domain-Frontier approach to. MDA based. software development

Analysis of BPMN Models

Automation Systems Discrete Event Control Systems and Networked Automation Systems

FORMALIZED SOFTWARE DEVELOPMENT IN AN INDUSTRIAL ENVIRONMENT

Software Development Chapter 1

Chapter 4 Requirements Elicitation (Recueil des éxigences)

Object Management Group Model Driven Architecture (MDA) MDA Guide rev. 2.0 OMG Document ormsc/

Chapter 1. MDA and the Use of OCL 1.1 INTRODUCING OCL

Chapter 4 Requirements Elicitation

Improving the Definition of UML

ΗΜΥ 317 Τεχνολογία Υπολογισμού

Administrivia. Wednesday: Requirements and Specification. CS169 Lecture 4. We assign teams and you start on Monday. Determining Stakeholders and Needs

Blazo Nastov. Journée des doctorant, Nîmes, France 19 June 2014

Specification-based Testing

A Beginners Guide to UML Part II

Integrating Systems and Software Engineering Concepts in AP-233

Reconciling TGGs with QVT

Key Properties for Comparing Modeling Languages and Tools: Usability, Completeness and Scalability

Python Programming: An Introduction to Computer Science

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

A framework for business processes view integration

Requirements. Chapter Learning objectives of this chapter. 2.2 Definition and syntax

Reading assignment: Reviews and Inspections

Part 5. Verification and Validation

Chapter 5 System modeling

Chapter 2 State of the Art

Introduction to the RAMI 4.0 Toolbox

An Introduction to Model Driven Engineering (MDE) Bahman Zamani, Ph.D. bahmanzamani.com

Distributed Systems Programming (F21DS1) Formal Verification

Page 1. Reading assignment: Reviews and Inspections. Foundations for SE Analysis. Ideally want general models. Formal models

AGH University of Science and Technology Computer Science Laboratory Department of Automatics Al. Mickiewicza Kraków, POLAND

Requirements Elicitation

Formal Validation of DNA Database Using Theorem Proving Technique

Static Safety Analysis of UML Action Semantics for Critical Systems Development

Transcription:

Requirements Modelling and Software Systems Implementation Using Formal Languages Radek Kočí Brno University of Technology, Faculty of Information Technology Czech Republic koci@fit.vutbr.cz ICSEA 2018, 15.-18.10.2018, Nice, France

Outline Software and Software Engineering Requirements Specification Formal Methods Model Driven Engineering Simulation Driven Development with Petri Nets Requirements Modelling and Software Systems Implementation Using Formal Languages 2 / 32

Software What is software (system) requirement specification design specification source codes including comments executable programs reference/operation manuals validation/verification documents... Software is a set of documents its properties are described with informal / semi-formal / formal languages how to validate documents against user s real needs? Requirements Modelling and Software Systems Implementation Using Formal Languages 3 / 32

Software Engineering other engineering (mechanical,... ) handles already established problem domains software engineering should handle any problem domain modeling, formalization and analyses of problem domains are major tasks domain / requirements engineering Software engineering is an discipline for studying methods to translate problem domain, i.e., semantics, into machine domain, i.e., forms how to validate that forms against user s real needs? Requirements Modelling and Software Systems Implementation Using Formal Languages 4 / 32

Requirements Specification What can be used to requirements specification unrestricted natural languages structured natural languages semi-formal specification languages formal specification languages User Requirements (needs) the initial user requirements are always informal it is not possible to prove that any specification satisfies user requirements (needs) only the user can say requirements specification has to be clear and readable for users Requirements Modelling and Software Systems Implementation Using Formal Languages 5 / 32

Informal Requirements Specification Informal specification described in natural languages with diagrams or pictures has no limits in the expressions used and usually does not require special preparation on the other hand, it is prone to vague expressions, ambiguities, and unmeasurable statements (difficult to evaluate accuracy) Predefined expression patterns simplify the creation of requirements using standardized form of statements simpler document passage, fulfillment criteria, etc. Requirements Modelling and Software Systems Implementation Using Formal Languages 6 / 32

Informal Requirements Specification Decision tables the original claim is divided into a set of conditions it is possible to examine behavior in all variants a set of simple claims that eliminates ambiguous understanding Inp. cond. Train accepts an acceleration command Y Y Y The train passes the signal too fast Y Y N The previous train is closer than X meters Y N Y Outp. cond. Braking activated. X X A station alarm is generated. X X X Requirements Modelling and Software Systems Implementation Using Formal Languages 7 / 32

Semi-formal Requirements Specification Semi-formal languages replacement for natural language or its supplementation usually captured in a form of schemes or diagrams (diagrammatic notation) semi-formal: elements of systems and their relationships are declared formally, but the statements describing their properties may be specified informally (structured natural language) syntax and semantics of elements are formally defined, it is enabled automatic processing the specification (consistency checking, partially transformations etc.) system properties are described informally, the full analysis/simulation/transformation not allowed Requirements Modelling and Software Systems Implementation Using Formal Languages 8 / 32

Semi-formal Requirements Specification Semi-formal models Entity-Relationship Diagram Use Case Diagram Interaction Diagram Statecharts (State Diagram) Requirements Modelling and Software Systems Implementation Using Formal Languages 9 / 32

Formal methods Formal specification predefined rules for determining the meaning of specifications written in formal languages supported by tools enable rigorous software development Formal description specifying requirements and desired properties modeling internal behavior the description is typically at certain level of abstraction precise, consistent and unambiguous Requirements Modelling and Software Systems Implementation Using Formal Languages 10 / 32

Formal languages Formal languages algebraic specification techniques (CASL) rewriting systems (OBJ3) Model-oriented languages (Z, VDM) UML + OCL; MOF + Alf language Petri nets logics... Requirements Modelling and Software Systems Implementation Using Formal Languages 11 / 32

Formal methods Formal specification formal specification let designers use abstractions and reducing the conceptual complexity of the system under development formal specification formalizes the statements describing element properties precise formulation of statements permits machine manipulation a more sophisticated form of validation and verification that can be automated using tools the specification may be mechanically transformed into another one, more detailed than its predecessor, and, eventually, into executable program Requirements Modelling and Software Systems Implementation Using Formal Languages 12 / 32

Formal methods Formalization properties formal methods can be beneficial even if no formal verification is used at all since since the rigorous specification is required the designer has to do the job more thoroughly, reaches a better understanding of the problem and it leads to better solution can be difficult to understand not only for users but also for developers a formally verified program is only as good as its specification it is very easy to create a wrong specification that does not meet the user needs (requirements) Requirements Modelling and Software Systems Implementation Using Formal Languages 13 / 32

Formal methods Formal methods properties The greatest benefit in applying formal methods often comes from the process of formalization rather than from its outcomes. Formal methods do not guarantee correctness. Can be difficult to understand not only for users but also for developers. How to demonstrate that the specification meets the user needs? Requirements Modelling and Software Systems Implementation Using Formal Languages 14 / 32

Formal methods Summary How to validate documents/formalized documents against user s real needs? only the user can say a combination of the formal notation and prototyping Formal methods can be difficult to understand requirements specification has to be clear and comphrehensible to users as well as developers a possibility of formal notation as well as graphical modeling formal models that can be simulated, graphically represented, and formally processed Requirements Modelling and Software Systems Implementation Using Formal Languages 15 / 32

Model Driven Development Principle the essential outputs of the development process are models instead of the program the program (code) should be (automatically) generated from models it is possible to highlight some aspects of the developed system without having to deal with the implementation details different levels of abstraction Requirements Modelling and Software Systems Implementation Using Formal Languages 16 / 32

Model Driven Development Model Driven Architecture as an implementation of MDE different levels of abstraction Computation Independent Model (CIM) the business requirements for the system Platform Independent Model (PIM) describes software functions and is independent of realization details Platform Specific Model (PSM) is combined with technical details of platform for realizing system used models use case diagrams class diagrams statecharts activity diagrams Requirements Modelling and Software Systems Implementation Using Formal Languages 17 / 32

Model Driven Development Transformation the lower the abstraction (the closer to the design), the transformation mechanisms are more sophisticated Can CIM be formal models? Is it possible to automate the CIM-PIM transformation? Is it possible to change model and propagate changes to higer abstraction models? Requirements Modelling and Software Systems Implementation Using Formal Languages 18 / 32

Simulation Driven Development Motivation reduce the gap between real needs and specified needs to sofware system under development combination of semi-formal and formal models formal and executable models showing a sketch of the system to help visualize what the system will do Model continuity elimination of the overhead caused by creating models at different level of abstraction continuous incremental development of models models can work in live system no need of implementation or code generation Requirements Modelling and Software Systems Implementation Using Formal Languages 19 / 32

Simulation Driven Development Essential parts of the systems are presented through simulation (formal) models requirements model = CIM system model = PIM + PSM Requirements model System model System implementation use-cases use-case realization structure behavior source code other components simulation simulation Requirements Modelling and Software Systems Implementation Using Formal Languages 20 / 32

Simulation Driven Development Principle Domain model captures the concepts of the domain system as identified and understood Behavioral model captures an external view of system functionality, its behavior, and interaction with the surroundings User requirements modeling use cases Scenario modeling behavior and interactions of individual cases Design model sophisticated domain and behavioral models, more details Requirements Modelling and Software Systems Implementation Using Formal Languages 21 / 32

Simulation Driven Development Requirements Modelling and Software Systems Implementation Using Formal Languages 22 / 32

Simulation Driven Development Principle (cont.) Scenarios at the behavior level coincide with scenarios at the design level and are no longer distinguished. Continual development of behavior models becomes design models, which serve simultaneously for specification purposes. Design models can contain other objects from the domain environment to simulate the system or run under real-world conditions without having to show this implementation details at the requirements or behavior model. The same model can therefore be used for both documentation requirements and the executable version (prototype, implementation) of the developed system. Requirements Modelling and Software Systems Implementation Using Formal Languages 23 / 32

Requirements and System Modeling Use Case it models a sequence of interaction between actors and the system (=scenario) there is a main sequence, which can be supplemented by alternative sequences for less commonly used interactions Formalism of OOPN (Object-Oriented Petri Nets) clear formal syntax clear semantics usable by developers having no power mathematical backgroud Petri nets are also a simulation model Petri nets can be executed in real environment models scenarios of use case diagram elements the behavior description can contain parts of code (prg. language) Requirements Modelling and Software Systems Implementation Using Formal Languages 24 / 32

Identification of elements Identification of model elements from the use case model use case activity net actor role more actors can have the same basis subject Requirements Modelling and Software Systems Implementation Using Formal Languages 25 / 32

Use Case Modeling A simplified example of a robot control system the use case model and identification of roles and activities. Requirements Modelling and Software Systems Implementation Using Formal Languages 26 / 32

Behavior Modeling actor Robot role Robot use case Execute Scenario activity net Scenario Execute Scenario Robot walking isclearroad d > 10. subject r t2 self delay: 10 d := r getdistance. d t1 oldd p1 100 p2 d d distancetoobstacle isclosetoobstacle d <= 10. r t1 r isclosetoobstacle. r stop. r turnright. t2 r isclosetoobstacle. r turnright. t3 r isclosetoobstacle. r turnright. t4 r isclosetoobstacle. p1 r r r p2 r r r p3 r r r blocked r r t11 r isclearroad. r go. r t12 r isclearroad. r go. t13 r isclearroad. r go. r Role Robot Activity net Scenario Requirements Modelling and Software Systems Implementation Using Formal Languages 27 / 32

System Development Role Robot uses a subject, which can be defined in different ways modelled by OOPN, statecharts,... implemented in a programming language p1 t1 self delay: 10 subject p2 r t2 d := r getdistance. oldd d isclearroad d > 10. d 100 d isclosetoobstacle d <= 10. distancetoobstacle Requirements Modelling and Software Systems Implementation Using Formal Languages 28 / 32

System Development DEVS Architecture second way of components connection message passing data carrying through ports looser links between components easier changing of components no dependence on a component realization (methods, predicates,... ) p1 answer t1 self delay: 10 #getdistance request (#distance, d) isclearroad d > 10. t2 oldd d d d 100 distancetoobstacle isclosetoobstacle d <= 10. Requirements Modelling and Software Systems Implementation Using Formal Languages 29 / 32

Conclusion We have set several conditions the formalism has to satisfy to be suitable for requirements modeling and realization formal notation an unambiguity of the specification a possibility to validate specification against real needs using prototyping or simulation specification has to be comphrehensible to users as well as developers; graphical modeling allowed a possibility to keep models during entire development process Requirements Modelling and Software Systems Implementation Using Formal Languages 30 / 32

Conclusion We have set several conditions the formalism has to satisfy to be suitable for requirements modeling and realization formal notation an unambiguity of the specification OOPN, DEVS a possibility to validate specification against real needs using prototyping or simulation OOPN, DEVS combining with product objects specification has to be comphrehensible to users as well as developers; graphical modeling allowed OOPN, DEVS combining with use cases, classes,... a possibility to keep models during entire development process OOPN, DEVS combining with use cases Requirements Modelling and Software Systems Implementation Using Formal Languages 31 / 32

[plain] Thank you for your attention!