specifications de systemes logiciels المواصفات الشكلية software specifications
DESCRIPTION
Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications. Chapitre 7. Proprietes des Specifications. Proprietes du produit Precision Simplicite Abstraction Proprietes du processus Completude Minimalite. Mathematiques Discretes. Espace, S x, y, z: int; - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/1.jpg)
Specifications de Systemes Logiciels
الشكلية المواصفاتSoftware Specifications
Chapitre 7
![Page 2: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/2.jpg)
Proprietes des Specifications
Proprietes du produit Precision Simplicite Abstraction
Proprietes du processus Completude Minimalite.
![Page 3: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/3.jpg)
Mathematiques Discretes
Espace, S
x, y, z: int;
s dans S: <x, y, z>
x(s), y(s), z(s)
R sur S: {(s,s’)| x(s’)=x(s)+y(s)}
{(s,s’)| x’=x+y}
![Page 4: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/4.jpg)
Exemple de specification
Nous avons deux variables reelles x et y, nous voulons specifier un programme qui calcule la racine carree de x dans y.
Ecrivez une relation R qui contient toutes les paires d’entrée sortie decrites dans cette specification.
![Page 5: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/5.jpg)
Interpretations, 1
Nous supposons que x est initialement non negatif, et que y est une racine positive ou negative de x.
![Page 6: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/6.jpg)
Interpretations, 1
Nous supposons que x est initialement non negatif, et que y est une racine positive ou negative de x.
}.'0|)',{( 2 xyxssR
![Page 7: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/7.jpg)
Interpretations, 2
Nous supposons que x est initialement non negatif, et que y est une approximation de la racine positive ou negative de x a epsilon pres, ou epsilon = 10^-6.
![Page 8: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/8.jpg)
Interpretations, 2
Nous supposons que x est initialement non negatif, et que y est une approximation de la racine positive ou negative de x a epsilon pres, ou epsilon = 10^-6.
}.10|'|0|)',{( 62 xyxssR
![Page 9: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/9.jpg)
Interpretations, 3
Nous supposons que x est initialement non negatif, et que y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
![Page 10: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/10.jpg)
Interpretations, 3
Nous supposons que x est initialement non negatif, et que y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
}.0'10|'|0|)',{( 62 yxyxssR
![Page 11: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/11.jpg)
Interpretations, 4
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que y soit une approximation de la racine positive de la valeur absolue de x a epsilon pres, ou epsilon = 10^-6.
![Page 12: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/12.jpg)
Interpretations, 4
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que y soit une approximation de la racine positive de la valeur absolue de x a epsilon pres, ou epsilon = 10^-6.
}.0'10|||'||)',{( 62 yxyssR
![Page 13: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/13.jpg)
Interpretations, 5
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulles alors y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6. Si x est negative, alors y prend la valeur -1.
![Page 14: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/14.jpg)
Interpretations, 5
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulles alors y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6. Si x est negative, alors y prend la valeur -1.
}.1'0|)',{(
}0'10|'|0|)',{( 62
yxss
yxyxssR
![Page 15: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/15.jpg)
Interpretations, 6
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulle alors y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
![Page 16: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/16.jpg)
Interpretations, 6
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulle alors y est une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
}.0|)',{(
}0'10|'|0|)',{( 62
xss
yxyxssR
![Page 17: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/17.jpg)
Interpretations, 7
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulle alors nous preservons x et mettons dans y une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
![Page 18: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/18.jpg)
Interpretations, 7
La valeur intiale de x n’est pas necessairement non negative, et nous demandons que si x est positive ou nulle alors nous preservons x et mettons dans y une approximation de la racine positive de x a epsilon pres, ou epsilon = 10^-6.
}.0|)',{(
}0''10|'|0|)',{( 62
xss
yxxxyxssR
![Page 19: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/19.jpg)
Un programme de Recherche
Espace:
a: array [indextype] of itemtype;
x: itemtype;
k: indextype U {0}; // indextype 1..N;
Specification: specifier un programme de recherche de x dans a.
![Page 20: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/20.jpg)
Interpretation 1
Le tableau a contient x qqe part; nous devons placer dans k un index ou x se trouve.
![Page 21: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/21.jpg)
Interpretation 1
Le tableau a contient x qqe part; nous devons placer dans k un index ou x se trouve.
}.1']'[|)',{(
}]'[)][1:(|)',{(
kxkass
xkaxjaNjjssR
![Page 22: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/22.jpg)
Interpretation 2
Le tableau a contient x qqe part; nous devons placer dans k un index ou x se trouve tout en preservant a et x.
![Page 23: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/23.jpg)
Interpretation 2
Le tableau a contient x qqe part; nous devons placer dans k un index ou x se trouve tout en preservant a et x.
}.''1']'[|)',{( xxaakxkassR
![Page 24: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/24.jpg)
Interpretation 3
Le tableau a contient x qqe part; nous devons placer dans k le plus grand index ou x se trouve.
![Page 25: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/25.jpg)
Interpretation 3
Le tableau a contient x qqe part; nous devons placer dans k le plus grand index ou x se trouve.
....}.1']'[|)',{( kxkassR
![Page 26: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/26.jpg)
Interpretation 4
Le tableau ne contient pas necessairement x; nous voulons placer dans la variable booleenne found la valeur vraie ssi x se trouve dans a.
![Page 27: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/27.jpg)
Interpretation 5
Le tableau ne contient pas necessairement x; nous voulons placer dans la variable entiere k l’indice 0 si x n’est pas dans a, un indice ou se trouve x sinon.
![Page 28: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/28.jpg)
Generation de specifications complexes
![Page 29: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/29.jpg)
Deux Methodes Orthogonales
Analyse de cas Partition du domaine
Conjonction de proprietes Intersection de relations
Etant donne trois variables entieres a, b, c, rearranger les de maniere triee.
![Page 30: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/30.jpg)
Analyse de Cas
![Page 31: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/31.jpg)
Conjonction de Proprietes
![Page 32: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/32.jpg)
Exemple
Etant donne un tableau reel a[N], un nbre reel x, et un indice k, mettre dans x l’element maximal de a et dans k l’indice maximal dans lequel se trouve x.
![Page 33: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/33.jpg)
Validation de Specifications
Completude Minimalite
![Page 34: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/34.jpg)
Etant donnees les variables x et y de type int, faire croitre x en preservant la somme
}2'3'|)',{(
}3'3'|)',{(
}'':|)',{(
}'''|)',{(
}''1'|)',{(
}'''|)',{(
}'''|)',{(
}''|)',{(
7
6
5
4
3
2
1
0
yyxxssR
yyxxssR
ayyaxxassR
yxyxxxssR
yxyxxxssR
yyyxyxssR
yyyxyxssR
yyxxssR
![Page 35: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/35.jpg)
Raffinement
Une specification R raffine une specification R’ ssi tout programme correct par rapport a R est correct par rapport a R’.
Raffiner: exprimer une exigence plus forte.
![Page 36: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/36.jpg)
Raffinement
}3'|)',{('
}5'|)',{(2
22
yxssR
yxyssR
}1'100|)',{('
}1'|)',{(
xyxssR
xyssR
}3'100|)',{('
}5'|)',{(2
22
yxxssR
yxyssR
![Page 37: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/37.jpg)
Raffinement: Definition
R raffine R’ ssi:
![Page 38: Specifications de Systemes Logiciels المواصفات الشكلية Software Specifications](https://reader030.vdocuments.pub/reader030/viewer/2022012918/56812f63550346895d94ec3b/html5/thumbnails/38.jpg)
Raffinement et Validation
V: Propriete de completude. R complet par rapport a V: R raffine V.
W: Propriete de Minimalite R minimal par rapport a W: