génie logiciel pour la conception d'un système d...

27
Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement Intégration et Déploiement de Systèmes d’Information ( VAP DSI ) Modelling - Models, Languages and Methods [email protected] http://www-public.imtbs-tsp.eu/~gibson/Teaching/CSC4521

Upload: others

Post on 17-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Génie logiciel pour la conception d'un Système d'Information

CSC4521 Voie d'Approfondissement

Intégration et Déploiement de Systèmes d’Information ( VAP DSI )

Modelling - Models, Languages and Methods

[email protected] http://www-public.imtbs-tsp.eu/~gibson/Teaching/CSC4521

Page 2: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Engineers SOLVE PROBLEMS

and CHECK (proposed) SOLUTIONS

Page 3: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Engineers work with models (of problems and solutions)

Engineering is based on science – scientists (try to) build models of things in the real world, engineers (try to) build things in the real world from models

Architects build models of problems and solutions – they are engineers and scientists

Page 4: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Build a Requirements Model

Build a Design Model

Build an Implementation Model

Build Test Model

Page 5: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

What is a good model ?

What is a good modelling language ?

What is a good modelling method ?

Page 6: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Natural Language

UML

Java

Java Byte Code

Machine Code

An on-line voting system

public class Poll { ...}

110000010100011101000110

Page 7: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building Requirements Models

Page 8: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building Requirements Models

The world of software engineering cannot always agree on requirements modelling: •formal or informal •operational or logical •textual or graphic •client-led or analyst-led

Page 9: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building Requirements Models

The model: •acts as a contract between client and analyst •improves communication by attacking risks --- •client misunderstands •client informs/communicates •analyst misunderstands •analyst misleads •will act as contract with designers

Page 10: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building Requirements Models

Page 11: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building Requirements Models

Page 12: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Building a Model

Modelling Method - any technique concerned with the construction and/or analysis of mathematical models which aid the development of computer/information systems

Some toy modelling languages will help us explore the fundamental concepts

We will not be using UML/Java but the lessons are the same !!

Page 13: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Typographical Re-write Systems (TRS)

A TRS is a formal system based on the ability to generate a set of strings following a simple set of syntactic rules.

Each rule is calculable --- the generation of a new string from an old string by application of a rule always terminates

A TRS may produce an infinite number of strings

TRSs can be as powerful as any computing machine

TRSs are simple to implement (simulate)

Page 14: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Case Study 1 --- The MUI TRS Thanks to Hofstadter - https://en.wikipedia.org/wiki/Gödel,_Escher,_Bach

Modelling Language

Models

Page 15: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Case Study 1 --- The MUI TRS

Page 16: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Case Study 1 --- The MUI TRS

Question: before we move on ... is MU a theorem of MUI ?

Page 17: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement
Page 18: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Alphabet = {p,q,-}

Axiom: for any such x such that x is a possibly empty sequence of ‘-’s, xp-qx- is an axiom

Generation Rules: for any x,y,z which are possibly empty sequences of ‘-’s, if xpyqz is a theorem then xpy-qz- is a theorem

Modellers strive for consistency and completeness

Page 19: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement
Page 20: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Question : Impact on Requirements Modelling ?

Page 21: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement
Page 22: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Problem 1 -

Define a TRS that can decide if a natural number is composite

Define a TRS that can decide if a natural number is prime

Page 23: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Often used to model requirements

Page 24: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Question:

Extend the model to include multiplication

Page 25: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Redundancy

Termination

Confluence

x eq y = y eq x

x eq x = false

x eq x = true

Important properties

Page 26: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Question:

Why do you think that ADTs are often used to specify OO models?

Page 27: Génie logiciel pour la conception d'un Système d ...gibson/Teaching/CSC4521/CSC4521-Mod… · Génie logiciel pour la conception d'un Système d'Information CSC4521 Voie d'Approfondissement

Problem 2 -

Write an ADT specification for a stack of integers

Write an ADT specification for a queue of integers

Compare and contrast the 2 models