version 1.17, 2010/09/23 15:27:37
|
version 1.24, 2011/06/20 17:54:16
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.20 |
RPL/2 (R) version 4.1.0.prerelease.1 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 42 instruction_cov(struct_processus *s_etat
|
Line 42 instruction_cov(struct_processus *s_etat
|
integer8 nombre_colonnes; |
integer8 nombre_colonnes; |
|
|
logical1 erreur; |
logical1 erreur; |
logical1 presence_variable; |
|
|
|
long i; |
|
|
|
struct_objet *s_objet_statistique; |
struct_objet *s_objet_statistique; |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
Line 86 instruction_cov(struct_processus *s_etat
|
Line 83 instruction_cov(struct_processus *s_etat
|
* Recherche d'une variable globale référencée par SIGMA |
* Recherche d'une variable globale référencée par SIGMA |
*/ |
*/ |
|
|
if (recherche_variable(s_etat_processus, ds_sdat) == d_faux) |
if (recherche_variable_globale(s_etat_processus, ds_sdat) == d_faux) |
{ |
{ |
/* |
/* |
* Aucune variable SIGMA |
* Aucune variable SIGMA |
Line 98 instruction_cov(struct_processus *s_etat
|
Line 95 instruction_cov(struct_processus *s_etat
|
} |
} |
else |
else |
{ |
{ |
/* |
if (((*(*(*s_etat_processus).pointeur_variable_courante).objet) |
* Il existe une variable locale SIGMA. Reste à vérifier l'existence |
.type != MIN) && ((*(*(*s_etat_processus) |
* d'une variable SIGMA globale... |
.pointeur_variable_courante).objet).type != MRL)) |
*/ |
|
|
|
i = (*s_etat_processus).position_variable_courante; |
|
presence_variable = d_faux; |
|
|
|
while(i >= 0) |
|
{ |
{ |
if ((strcmp((*s_etat_processus).s_liste_variables[i].nom, |
(*s_etat_processus).erreur_execution = |
ds_sdat) == 0) && ((*s_etat_processus) |
d_ex_matrice_statistique_invalide; |
.s_liste_variables[i].niveau == 1)) |
|
{ |
|
presence_variable = d_vrai; |
|
break; |
|
} |
|
|
|
i--; |
|
} |
|
|
|
if (presence_variable == d_faux) |
|
{ |
|
(*s_etat_processus).erreur_execution = d_ex_absence_observations; |
|
return; |
return; |
} |
} |
else |
|
{ |
|
(*s_etat_processus).position_variable_courante = i; |
|
|
|
if ((*s_etat_processus).s_liste_variables |
nombre_colonnes = (*((struct_matrice *) (*(*(*s_etat_processus) |
[(*s_etat_processus).position_variable_courante].objet |
.pointeur_variable_courante).objet).objet)).nombre_colonnes; |
== NULL) |
|
{ |
|
(*s_etat_processus).erreur_execution = d_ex_variable_partagee; |
|
return; |
|
} |
|
|
|
if (((*((*s_etat_processus).s_liste_variables |
|
[(*s_etat_processus).position_variable_courante].objet)) |
|
.type != MIN) && ((*((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante].objet)).type != MRL)) |
|
{ |
|
(*s_etat_processus).erreur_execution = |
|
d_ex_matrice_statistique_invalide; |
|
return; |
|
} |
|
|
|
nombre_colonnes = (*((struct_matrice *) (*((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante].objet)).objet)) |
|
.nombre_colonnes; |
|
} |
|
} |
} |
|
|
s_objet_statistique = ((*s_etat_processus).s_liste_variables |
s_objet_statistique = (*(*s_etat_processus).pointeur_variable_courante) |
[(*s_etat_processus).position_variable_courante]).objet; |
.objet; |
|
|
if (((*s_objet_statistique).type == MIN) || |
if (((*s_objet_statistique).type == MIN) || |
((*s_objet_statistique).type == MRL)) |
((*s_objet_statistique).type == MRL)) |
Line 221 void
|
Line 175 void
|
instruction_corr(struct_processus *s_etat_processus) |
instruction_corr(struct_processus *s_etat_processus) |
{ |
{ |
logical1 erreur; |
logical1 erreur; |
logical1 presence_variable; |
|
|
|
long i; |
|
|
|
struct_objet *s_objet_statistique; |
struct_objet *s_objet_statistique; |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
Line 267 instruction_corr(struct_processus *s_eta
|
Line 218 instruction_corr(struct_processus *s_eta
|
* Recherche d'une variable globale référencée par SIGMA |
* Recherche d'une variable globale référencée par SIGMA |
*/ |
*/ |
|
|
if (recherche_variable(s_etat_processus, ds_sdat) == d_faux) |
if (recherche_variable_globale(s_etat_processus, ds_sdat) == d_faux) |
{ |
{ |
/* |
/* |
* Aucune variable SIGMA |
* Aucune variable SIGMA |
Line 279 instruction_corr(struct_processus *s_eta
|
Line 230 instruction_corr(struct_processus *s_eta
|
} |
} |
else |
else |
{ |
{ |
/* |
if (((*(*(*s_etat_processus).pointeur_variable_courante).objet) |
* Il existe une variable locale SIGMA. Reste à vérifier l'existence |
.type != MIN) && ((*(*(*s_etat_processus) |
* d'une variable SIGMA globale... |
.pointeur_variable_courante).objet).type != MRL)) |
*/ |
|
|
|
i = (*s_etat_processus).position_variable_courante; |
|
presence_variable = d_faux; |
|
|
|
while(i >= 0) |
|
{ |
{ |
if ((strcmp((*s_etat_processus).s_liste_variables[i].nom, |
(*s_etat_processus).erreur_execution = |
ds_sdat) == 0) && ((*s_etat_processus) |
d_ex_matrice_statistique_invalide; |
.s_liste_variables[i].niveau == 1)) |
|
{ |
|
presence_variable = d_vrai; |
|
break; |
|
} |
|
|
|
i--; |
|
} |
|
|
|
if (presence_variable == d_faux) |
|
{ |
|
(*s_etat_processus).erreur_execution = d_ex_absence_observations; |
|
return; |
return; |
} |
} |
else |
|
{ |
|
(*s_etat_processus).position_variable_courante = i; |
|
|
|
if ((*s_etat_processus).s_liste_variables |
nombre_colonnes = (*((struct_matrice *) (*(*(*s_etat_processus) |
[(*s_etat_processus).position_variable_courante].objet |
.pointeur_variable_courante).objet).objet)) |
== NULL) |
.nombre_colonnes; |
{ |
|
(*s_etat_processus).erreur_execution = d_ex_variable_partagee; |
|
return; |
|
} |
|
|
|
if (((*((*s_etat_processus).s_liste_variables |
|
[(*s_etat_processus).position_variable_courante].objet)) |
|
.type != MIN) && ((*((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante].objet)).type != MRL)) |
|
{ |
|
(*s_etat_processus).erreur_execution = |
|
d_ex_matrice_statistique_invalide; |
|
return; |
|
} |
|
|
|
nombre_colonnes = (*((struct_matrice *) (*((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante].objet)).objet)) |
|
.nombre_colonnes; |
|
} |
|
} |
} |
|
|
s_objet_statistique = ((*s_etat_processus).s_liste_variables |
s_objet_statistique = (*(*s_etat_processus).pointeur_variable_courante) |
[(*s_etat_processus).position_variable_courante]).objet; |
.objet; |
|
|
if (((*s_objet_statistique).type == MIN) || |
if (((*s_objet_statistique).type == MIN) || |
((*s_objet_statistique).type == MRL)) |
((*s_objet_statistique).type == MRL)) |