07.11.2013 Views

Une Boite `a Outils Pour la Preuve Formelle de Syst`emes Séquentiels

Une Boite `a Outils Pour la Preuve Formelle de Syst`emes Séquentiels

Une Boite `a Outils Pour la Preuve Formelle de Syst`emes Séquentiels

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

102 CHAPITRE 4. CALCUL DE L’IMAGE D’UNE FONCTION<br />

ceuxutilisésparlesfonctionscaractéristiquesconservéesdanslecache. Doncsilesgraphes<br />

du vecteur initial ⃗ f sont re<strong>la</strong>tivement petits, ou si il y a beaucoup <strong>de</strong> partages entre ces<br />

graphes, alors cet algorithme est très efficace. Comme les vecteurs pris comme entrée par<br />

<strong>la</strong> fonction “vectochar-recurse” sont construits à partir <strong>de</strong>s sous-graphes du vecteur initial<br />

⃗f, le nombre <strong>de</strong> recursions <strong>de</strong> “vectochar” est borné par ∏ n<br />

k=1 |f k |, c’est à dire exponentiel<br />

par rapport à n. En fait, nous pensons que le nombre <strong>de</strong> récursions ne dépend que <strong>de</strong> | ⃗ f|,<br />

évi<strong>de</strong>mment <strong>de</strong> façon non polynomiale.<br />

4.7 Résultats expérimentaux et discussion<br />

4.7.1 L’algorithme final<br />

L’algorithme qui calcule l’ensemble <strong>de</strong>s états vali<strong>de</strong>s d’une machine M est donné ci<strong>de</strong>ssous.<br />

Le nombre d’itérations <strong>de</strong> <strong>la</strong> boucle while est le plus long chemin acyclique<br />

(partant d’un état initial) du graphe d’états <strong>de</strong> <strong>la</strong> machine.<br />

function compute-valid(n,m,r,ω,(Cns, ⃗ f),Init) : TDG;<br />

var Valid, New, Current : TDG;<br />

Valid = Init;<br />

New = Init;<br />

while (New ∧ Cns) ≠ 0 do {<br />

Current = New;<br />

let Range = vectochar( ⃗ f↓(Current∧Cns)) in {<br />

New = Range ∧¬ Valid;<br />

Valid = Valid ∨ New;<br />

}<br />

}<br />

return Valid;<br />

Figure 31. Première fonction “compute-valid”.<br />

A chaque étape, Current contient tous les états nouveaux <strong>de</strong>rnièrement découverts<br />

(réunis dans l’ensemble New). On peut ajouter à Current <strong>de</strong>s états ayant déjà été<br />

découverts (ces états appartiennent à Valid) sans modifier <strong>la</strong> correction <strong>de</strong> calcule-valid.<br />

Donc l’algorithme <strong>de</strong>meure correct si on choisit Current tel que New ⊂ Current ⊂ Valid.<br />

Comme <strong>la</strong> taille du vecteur ( ⃗ f↓(Current ∧ Cns)) est en O(| ⃗ f| × |Current| × |Cns|), une<br />

idée [43, 44] naturelle pour réduire le coût <strong>de</strong> l’algorithme est <strong>de</strong> choisir un graphe Current<br />

aussi petit que possible, tout en conservant <strong>la</strong> correction <strong>de</strong> l’algorithme.<br />

<strong>Pour</strong>réduirelecoût<strong>de</strong>l’algorithmeilsuffit<strong>de</strong>choisirlegrapheCurrent minimaltelque<br />

(New ⇒ Current ⇒ Valid). Mais ceci est un problème NP–difficile (voir le problème <strong>de</strong> <strong>la</strong><br />

minimisation Section E.2). Nous utilisons donc une fonction “between” non optimale [43]<br />

possédant une complexité en O(|New|+|Valid|). De cette façon, on obtient l’algorithme

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!