I nte rna t io na l J o urna l o f   E lect rica l a nd   Co m p ute r  E ng in ee ring   ( I J E CE )   Vo l.   7 ,   No .   5 ,  Octo b e r   2 0 1 7 ,   p p .   2 6 3 5 ~ 2 644   I SS N:  2088 - 8708 ,  DOI : 1 0 . 1 1 5 9 1 / i j ec e . v 7 i 5 . pp 2 6 3 5 - 2 644           2635       J o ur na l ho m ep a g e :  h ttp : //ia e s jo u r n a l.c o m/o n lin e/in d ex . p h p /I JE C E   Lus Reg Tes :  A   Re g ress io n Testing   T o o l f o r Lustre  P ro g ra m s       Ng uy en  T ha nh   B in h 1 ,  T rin h  Co ng   Duy 2 ,  I o a nn is   P a riss i s 3   1 ,2 T h e   Un iv e rsit y   o f   Da n a n g   -   Un iv e rs it y   o f   S c ien c e   a n d   T e c h n o l o g y ,   V ietn a m   3 Un iv e rsit y   G re n o b le A lp e s,  G re n o b le IN P - L CIS ,   F ra n c e       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Mar   16 ,   2 0 1 7   R ev i s ed   Ma y   16 ,   2 0 1 7   A cc ep ted   J u l   11 ,   2 0 1 7       L u stre   is  a   s y n c h ro n o u s  d a ta - f l o w   d e c lara ti v e   lan g u a g e   w id e l y   u se d   f o r  sa fe t y - c rit ica l  a p p li c a ti o n s  (a v io n ics ,   e n e rg y ,   tran sp o rt. . . ).   In   su c h   a p p li c a ti o n s,  th e   tes ti n g   a c ti v it y   f o r  d e tec ti n g   e rro rs   o f   th e   s y ste m   p la y s  a   c ru c ial  ro le.  Du rin g   th e   d e v e lo p m e n t  a n d   m a in ten a n c e   p ro c e ss e s,  L u stre   p ro g ra m s  a re   o f ten   e v o lv in g ,   so   re g re ss io n   tes ti n g   sh o u ld   b e   p e rf o r m e d   to   d e tec t  b u g s.  In   th is  p a p e r,   w e   p re se n t  a   to o l  f o r  a u to m a ti c   r e g re ss io n   tes ti n g   o f   L u stre   p ro g ra m s.  W e   h a v e   d e f in e d   a n   a p p ro a c h   to   g e n e ra te  tes t  c a se s   in   re g re ss io n   tes ti n g   o f   L u stre   p ro g ra m s.    In   th is  a p p ro a c h ,   a   L u stre   p ro g ra m   is   re p re se n ted   b y   a n   o p e ra to r  n e tw o rk ,   th e n   th e   se t  o f   p a th s  is  id e n ti f i e d   a n d   th e   p a th   a c ti v a ti o n   c o n d it io n s  a re   s y m b o li c a ll y   c o m p u ted   f o r  e a c h   v e rsio n .   Re g re ss io n   tes t  c a se s  a r e   g e n e ra ted   b y   c o m p a rin g   p a th s  b e tw e e n   v e rsio n s.  T h e   a p p ro a c h   w a s   im p le m e n ted   in   a   to o l,   c a ll e d   L u sRe g T e s ,   in   o r d e r  t o   a u to m a te t h e   tes t  p ro c e ss   f o r  L u stre   p ro g ra m s.   K ey w o r d s :   A cti v atio n   co n d itio n   L u s tr e  p r o g r a m s   Op er ato r   n et w o r k   R eg r es s io n   te s ti n g   to o l   T est   d ata  g en er atio n   Co p y rig h t  ©   2 0 1 7   In stit u te o f  A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e .    Al l  rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   Ng u y e n   T h an h   B in h ,    I n f o r m a tio n   T ec h n o lo g y   Fac u l t y ,   T h e  Un iv er s i t y   o f   Dan a n g   -   U n iv er s it y   o f   Scie n ce   an d   T ec h n o lo g y ,   5 4   Ng u y e n   L u o n g   B a n g ,   Da n a n g ,   5 5 0 0 0 0 ,   Vietn a m .   E m ail:  n tb in h @ d u t. u d n . v n       1.   I NT RO D UCT I O N   L u s tr e  i s   a  d ec lar ati v e,   d ata - f l o w   la n g u a g e  [ 1 ] ,   d ev o ted   to   t h e  s p ec i f icatio n   o f   s y n c h r o n o u s   a n d   r ea l - ti m e  ap p licatio n s .   I t  en s u r es  ef f icien t  co d e  g en er atio n   a n d   p r o v id es   f o r m al  s p ec i f icatio n   an d   v er if icat io n   f ac ilit ies.  I t  is   b a s ed   o n   th e   s y n c h r o n o u s   ap p r o ac h ,   w h i ch   d e m an d s   t h e  s o f t w ar e  to   r ea ct  to   it s   i n p u t s   in s ta n ta n eo u s l y .   I n   p r ac tice,   th is   m ea n s   t h at  th e  s o f t w ar e  r e ac tio n   is   s u f f icien tl y   f as t  s o   th at  ev er y   c h a n g e  i n   th e  e x ter n a l  en v ir o n m e n t  is   t ak en   in to   ac co u n t.  T h ese  c h a r ac ter is tics   m a k e  it   p o s s ib le  t o   ef f icien tl y   d esi g n   an d   m o d el  s y n ch r o n o u s   s y s te m s .   A   g r ap h ical  to o l  d ed icate d   to   th e  d ev elo p m e n t  o f   cr itic al  e m b ed d ed   s y s te m s   an d   o f te n   u s ed   b y   i n d u s tr ies  an d   p r o f es s io n al s   is   SC ADE   ( Saf et y   C r it ical  A p p lica tio n   De v elo p m en t   E n v ir o n m e n t) ,   w h ic h   h a s   b ee n   co m m er cialize d   b y   E s ter el  T ec h n o lo g ies.  I t   i s   an   en v ir o n m e n t  b a s ed   o n   t h e   L u s tr e   lan g u ag e   a n d   it  allo w s   th e  h ier ar ch ica l  d ef i n itio n   o f   th e  s y s te m   co m p o n e n ts   a n d   th e   au to m atic  co d e  g en er atio n .   T h e  L u s tr e/S C A DE   en v ir o n m en t  i s   w id el y   u s ed   f o r   s a f e t y - cr itical  ap p licatio n s   ( av io n ics,  e n er g y ,   tr an s p o r t.. . ) .   I n   s u ch   ap p licati o n s ,   s o f t w ar e  test i n g   [ 2 ] ,   [ 3 ]   f o r   en s u r in g   t h e  q u alit y   p la y s   a  v ital   r o le.   T h e  o b j ec tiv e  o f   test i n g   ac ti v it y   is   to   r ev ea l   er r o r s   in   ap p lic atio n s   a s   s o o n   as  p o s s ib le  i n   d ev elo p m en t   an d   m ai n ten a n ce   p h a s es.   So f t w ar e  m ai n te n a n ce   is   an   a ctiv it y ,   w h ic h   i n clu d es  e n h a n ce m en ts ,   er r o r   co r r ec tio n s ,   o p ti m izat io n   an d   d eletio n   o f   e x i s tin g   f ea t u r es.  T h ese  m o d i f icatio n s   m a y   ca u s e  th e   s y s te m   to   w o r k   i n c o r r ec tly .   T h er ef o r e,   r eg r ess io n   test i n g   b ec o m e s   n e ce s s ar y .   R e g r es s io n   tes tin g   is   a   ty p e  o f   s o f t w ar e  test i n g   t h at   s ee k s   to   u n co v er   n e w   s o f t w ar e  b u g s ,   o r   r eg r es s io n s ,   i n   e x is tin g   f u n c tio n al  a n d   n o n - f u n ctio n a l  ar ea s   o f   a  s y s t e m   af ter   ch a n g es,   s u c h   a s   e n h a n ce m en ts ,   p atc h e s   o r   co n f i g u r atio n   c h an g es,   h av e  b ee n   m ad e  to   t h e m .   T h e  i n ten t  o f   r eg r es s io n   test i n g   is   to   e n s u r e  t h at  a  c h an g e  s u c h   a s   t h o s e  m en tio n ed   ab o v e  h as  n o t  i n tr o d u ce d   n e w   f a u lts   [ 4 ] .   I n   ad d itio n ,   o n e  o f   th e  m ain   o b j e ctiv es  f o r   r eg r ess io n   tes tin g   is   to   d eter m in e  w h eth er   a  ch a n g e  in   o n e  p ar t  o f   th e  Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E    Vo l.  7 ,   No .   5 ,  Octo b er   201 7   :   2 6 3 5   –   2 6 4 4   2636   s o f t w ar e  a f f ec t s   o th er   p ar ts   o f   th e  s o f t w ar e.   C o m m o n   m eth o d s   o f   r eg r es s io n   te s ti n g   in cl u d e  r er u n n i n g   p r ev io u s l y - co m p leted   te s ts   an d   ch ec k i n g   w h et h er   p r o g r a m   b eh av io r   h as   ch a n g ed   an d   w h et h er   p r ev io u s l y - f i x ed   f a u lt s   h av e   r ee m er g ed .   R eg r es s io n   test in g   ca n   b e  u s ed   to   test   a  s y s te m   e f f icie n tl y   b y   s y s te m atica ll y   s elec ti n g   t h e  ap p r o p r iate  m i n i m u m   s et  o f   tes ts   n ee d ed   to   ad eq u atel y   co v er   a  p ar ticu lar   c h a n g e.   E x ten s i v e  s t u d ies  h a v e  b ee n   c ar r ied   o u t  f o cu s in g   o n   th e   au t o m a tic  tes t  d ata  g e n er atio n .   S ev er al  to o ls   h av e  b ee n   p r o p o s ed ,   m ai n l y   c o n ce r n i n g   t h e  f o r m al  s p ec i fi c atio n   p r o ce s s in g   to   p r o d u ce   te s t  in p u t  s eq u en ce s .   So m e  to o ls   f o r   p r o g r a m s   s p ec i fi ed   in   L u s tr e  ar e  G A T eL   [ 5 ] ,   L u r ette   [ 6 ]   an d   L ut es s   [ 7 ] ,   [ 8 ] .  Ho w e v er ,   t h es e   to o ls   d o n ' t  s u p p o r t  r eg r ess io n   test   g e n er atio n .   He n ce ,   o u r   r es ea r ch   w o r k   ai m s   to   d ev elo p   th e  L u s R eg T es   to o l ,  w h ic h   allo w s   an   au to m atic  g e n er atio n   o f   r eg r es s io n   test   d ata   f o r   L u s tr e  p r o g r a m s .   T h i s   ap p r o ac h   w a s   r ec en tl y   in tr o d u ce d   in   [ 9 ] .   L u s tr e  p r o g r a m s   ar e  u n o r d er ed   s eq u en ce s   o f   eq u atio n s ,   d e fi n in g   h o w   th eir   in p u t  fl o w s   ar e   tr an s f o r m ed   i n to   o u tp u t   fl o ws  th r o u g h   a  s e t  o f   o p er ato r s .   T h er ef o r e,   th e  m o s t   s u itab le   r ep r esen tatio n   f o r   L u s tr e  p r o g r a m s   i s   a   d ir ec ted   g r ap h ,   ca lled   o p er ato r   n et w o r k .   W e  d ef i n e  t h e n   t h e  co r r el atio n   b et w ee n   p at h   ac tiv atio n   co n d itio n s   o f   o p er ato r   n et w o r k s   a n d   test   ca s e s .   W h en   th er e  is   a  ch a n g e  in   p ath   ac ti v atio n   co n d itio n s ,   w e  id e n ti f y   t h e  te s t  ca s es   to   b e  r e m o v ed ,   r eu s ed   an d   c r ea ted .   Si n ce ,   t h e  m i n i m u m   s et   o f   test   ca s e s   is   d esig n ed   to   r ed u ce   o p er atin g   co s ts   f o r   r eg r ess io n   test i n g   o f   th e  n e w   v er s io n .   T h e  p ap er   is   o r g an ized   as  f o llo w s .   Sectio n   2   p r ese n ts   a n   o v er v ie w   o f   th e   L u s tr e  la n g u a g e ,   t h e   S C A DE   en v ir o n m e n t,  a n d   te s tin g   in   L u s tr e/S C A DE .   T h e   ap p r o ac h   o f   te s t  ca s e  g en er atio n   i n   r e g r ess io n   test i n g   f o r   L u s tr e/S C A DE   p r o g r a m s   is   p r ese n ted   i n   Sectio n   3 .  Sectio n   4   in tr o d u ce s   th e   i m p le m en ta tio n   o f   t h e  L u s R eg T es  to o l  a n d   Sectio n   5   p r esen ts   t h e  e x p er i m e n tatio n .   Fi n all y ,   t h e  p ap er   f i n is h e s   b y   th e   co n c lu s io n   an d   f u tu r e  w o r k .       2.   B ACK G RO UND   2 . 1 .   Reg re s s io n T e s t ing   T esti n g   ca n   b e  u s ed   to   b u ild   th e  co n f id en ce   in   t h e  co r r ec t n es s   o f   th e  s o f t w ar e  an d   to   in cr ea s e  th e   s o f t w ar e  r eliab ili t y .   T h e  m aj o r   d if f er e n ce   b et w ee n   t h e  r e g r ess io n   test in g   a n d   t h e  d ev e lo p m en t  te s ti n g   is   th a t   d u r in g   r eg r es s io n   te s ti n g   a n   e s tab lis h ed   s e t  o f   te s ts   m a y   b e  av ailab le  f o r   r eu s e.   R e g r es s io n   test i n g   i s   es s en tial   w h e n   s o f t w ar e  p r o d u ct  h as b ee n   ch a n g ed   an d   it is   o f ten   ap p l ied   d u r in g   m ai n te n an ce   p h a s e .   R eg r es s io n   te s ti n g   en s u r es t h at  th e  m o d if ied   p r o g r a m   m ee t s   its   s p ec if icat io n   an d   n e w   er r o r s   ar e  u n co v er ed   [ 4 ] .   R eg r es s io n   tes tin g ,  w h ic h   is   an   e x p en s iv e   m ain ten a n ce   p r o ce s s ,   is   r esp o n s ib le  f o r   r ev al id atin g   t h e   m o d i f ied   s o f t w ar e.   Ma i n ten a n ce   co s t  o f   t h e  s o f t w ar e  i s   h ig h   a s   co m p ar ed   to   its   d ev elo p m e n t  co s t.  T h e   m ai n ten a n ce   co s t   o f   t h e  s o f t w ar e  m a y   ex ce ed   t o  ar o u n d   7 0 %  r el ev an t  to   t h e  d ev e lo p m e n t  co s t  [ 4 ] .  Ma in te n an ce   h as  t h r ee   t y p es:   p er f ec tiv e,   ad ap tiv e  an d   co r r ec tiv e.   C o r r ec tiv e  m a in te n a n ce   is   p er f o r m ed   to   co r r ec t  er r o r   th at  h a s   b ee n   u n c o v er ed   in   s o m e  p ar t  o f   t h e  s o f t w ar e.   A d ap tiv e   m a in te n a n ce   is   p er f o r m ed   w h en   s o f t w ar e  i s   m o d i f ied   to   e n s u r e  its   co m p at ib ilit y   w it h   t h e  n e w  en v ir o n m en t   in   w h ich   it  w il l  o p er ate.   P e r f ec tiv e   m ai n ten a n ce   is   p er f o r m ed   to   ad d   n e w   f ea tu r e s   to   t h e  s o f t w ar e  o r   to   i m p r o v e  p er f o r m a n ce   o f   t h e  s o f t w ar e.   R eg r es s io n   tes ti n g   is   d o n e   in   all  th ese  t y p e s   [ 4 ] .   T h er e   ar e  t w o   t y p es  o f   r eg r ess io n   test i n g :  p r o g r ess i v e   r eg r ess io n   test i n g   an d   co r r ec tiv e  r eg r e s s io n   test i n g .   C o r r ec tiv e  r eg r ess io n   test in g   is   ap p lied   w h e n   s p ec if icatio n   i s   n o t  c h an g ed ;   p r o b a b ly   s o m e  o th er   ch a n g es   h a v e   b ee n   m ad e ,   i. e.   co r r ec tin g   an   er r o r .   I n   t h i s   ca s e,   test   d ata   ca n   b e  r eu s ed .   P r o g r ess iv e  r eg r es s io n   te s ti n g   is   ap p lied   w h e n   s p ec i f icatio n   ha s   b ee n   c h an g ed   an d   n e w   tes t d ata  m u s t b e  d esi g n ed   at  leas t f o r   th e  m o d if ied   p ar t s   o f   th e  s p ec i f icatio n .   R eg r es s io n   te s ti n g   u s es  t w o   ap p r o ac h es  to   test   th e  m o d if i ed   s o f t w ar e:  r etest in g   all  an d   s elec tiv e   test s .   R etes t in g   al l  ap p r o ac h   ch o o s es  all   test   ca s es   f r o m   t h e  u n c h a n g ed   s o f t w ar e   to   te s t  t h e   ch a n g ed   s o f t w ar e,   b u t  th e  ap p r o ac h   is   ti m e  co n s u m in g   as  w ell  as  r eso u r ce   co n s u m in g .   Selecti v e  r etest i n g   ap p r o ac h   ch o o s es  a  s u b s et  o f   t h e  test s   f r o m   t h e  o ld   test   s u it  to   test   t h e  m o d i f ied   s o f t w ar e.   I n   r eg r es s io n   t esti n g ,   s e lectin g   a  s u itab le  s u b s e t  w it h   a n   ef f icie n t  al g o r ith m   i s   a  m aj o r   ar ea   o f   r esear ch .   T r ad itio n all y ,   th e  p r o ce s s   o f   r eg r e s s io n   t esti n g   is   co n ce p t u alize d   as   f o llo w s .   Gi v e n   a   p r o g r a m   L 1 ,   a   m o d i f ied   v er s io n   L 2 ,   a n d   a  te s t  s u ite   T 1 ,   w h ic h   is   u s ed   to   test   L 1   to g et h er   w i th   t h e  e x p ec ted   r es u lts .   I n   o r d er   to   r ed u ce   co s ts   a n d   to   r eu s e  T 1   as   e f f ec t iv el y   as   p o s s ib le,   s elec tiv e  r ete s ti n g   t ec h n iq u es  f ir s t  s elec t  a  s u b s et  o f   T 1 ,  T ’   b ased   o n   th e  m o d i f icat io n s   i n   L 2   co m p ar ed   w it h   L 1 .   Seco n d ,   i f   n ec es s ar y ,   a  s et  o f   n e w   te s ts   T”   is   cr ea ted ,   to   test   th e   n e w ,   m o d i f ied   a n d   u n te s ted   p o r tio n s   o f   L 2 .   T h u s ,   th e  test   s u i te   T 2   f o r   L 2   is   d ef i n ed   as :   T 2     =   T’  ∪   T”   I n   r eg r ess io n   te s ti n g ,   id e n ti f y i n g   test   ca s e s   f o r   ex ec u tin g   i s   v er y   i m p o r tan t,  s in ce ,   w e  d o n ' t  n ee d   to   re - r u n   th e  o ld   test   ca s es  f o r   o ld   r e q u ir e m en t s   in   t h e  p r ev io u s   v er s io n   ( th e   r eq u ir e m e n ts   h av e  n o t   b ee n   i m p ac ted   b y   th e   ev o l u tio n )   [ 1 0 ] .   I n   th i s   w o r k ,   w e  u s e   th e   co n ce p t  o f   l if ec y cle  test   ca s es   i n   r eg r e s s io n   tes tin g .   E ac h   te s t  ca s e  w i ll  b e  cr ea t ed   u n til  d elete d   ( r e m o v ed )   i n   r e g r ess io n   te s ti n g   m u s t  m ee t  th e   f o llo w in g   r eq u ir e m en ts :  W h e n   th er e  is   a   ch an g e  in   s o f t w ar e  v er s io n s ,   if   a  test   ca s e  h a s   b ee n   u s ed   in   o ld er   v er s io n s ,   b u t   n o t  af f ec ted   b y   t h e  u p g r ad e  p r o ce s s ,   th en   it  w ill  b e  r e m o v ed ;   T h e  test   ca s e s ,   w h ich   a r e   af f ec ted   b y   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2088 - 8708       Lu s R eg Tes :   A   R eg r ess io n   Tes t in g   To o l fo r   Lu s tr e  P r o g r a ms   ( N g u ye n   Th a n h   B in h )   2637   u p g r ad e,   w il l  b e  u p d ated   to   m atc h   th e  n e w   v er s io n ;   T h e  test   ca s es  f o r   th e  n e w   r eq u ir e m en ts   i n   th e  n e w  v er s io n   w i ll b e  cr ea ted .     2 . 2 .   L us t re / SCAD E   2 . 2 . 1 .   T he  L us t re   la ng ua g e   L u s tr e   is   a  s y n c h r o n o u s   d ata - fl o w   la n g u a g e  d ed icate d   to   p r o g r am m i n g   r ea ctiv e  s y s te m s   s u ch   a s   au to m at ic  co n tr o l  an d   m o n ito r in g   s y s te m s   i n   v ar io u s   field s   lik e  n u clea r   p la n ts ,   ci v il  air c r af t  an d   a u to m o ti v e   s y s te m s .   L u s tr e   is   w ell   s u ited   f o r   p r o g r a m m i n g   t h e  cr itical   p ar ts   o f   r ea l - ti m e   s y s te m s   esp ec iall y   th a n k s   to   it s   w ell - f o r m al ized   s e m a n tic s   an d   to   th e  ass o ciate d   v er i fi ca tio n   t o o ls .   A  L u s tr e  p r o g r a m   is   s tr u ct u r ed   in to   n o d es  [ 1 ] .   A   n o d e  is   a  s et  o f   eq u atio n s ,   w h ic h   d e f i n e   i ts   o u tp u t s   as  a  f u n ctio n   o f   i ts   i n p u ts .   E ac h   v ar iab le  ca n   b e  d e f in ed   o n l y   o n ce   w it h i n   a  n o d e  an d   t h e  o r d er   o f   eq u atio n s   i s   o f   n o   m atter .   Sp ec i f icall y ,   wh en   an   e x p r ess io n   E   i s   a s s i g n ed   to   a  v ar iab le  X ,  X   =   E ,   in d icate s   t h at   th e   r esp ec tiv e  s eq u en ce s   o f   v al u es   ar e  id en tical  t h r o u g h o u t t h e  p r o g r a m   ex ec u tio n ; a t a n y   c y cl e,   X   an d   E   h a v e  t h e   s a m e  v al u e.   On ce   a  n o d e  is   d e f i n ed ,   it c an   b e  u s ed   in s id e  o th er   n o d es lik e  an y   o th er   o p er ato r .   T h e  o p e r ato r s   s u p p o r ted   b y   L u s tr e  ar e  th e  co m m o n   ar ith m e tic  an d   lo g ical   o p er at o r s   ( +,   − ,   * ,   / ,   and ,   or ,   not )   as w el l a s   t w o   s p ec i f ic   te m p o r al  o p er ato r s : th e   p r ec ed ence   ( p r e )   an d   th e  ini tia liz a ti o n   ( ) .     T h e  p r ec e d en ce   o p e r a to r   ( p r e )   h as  b e en   in t r o d u c e d   t o   all o w   b r e ak in g   d ata - fl o w   lo o p s   a n d   th en   d efi n in g   a  ca u s ally   co r r e ct  s p e cifi ca ti o n   [ 1 1 ] .   I f   E   is   an   ex p r ess io n   d en o tin g   th e  s eq u en ce   ( e 0 ,   e 1 ,   . . .   e n - 1 ,   … ) ,   th e  ex p r ess io n   p r e ( E )   d en o t es  th e  s e q u en ce   ( n i l,  e 0 ,   e 1 ,   . . .   e n - 1 ,   … )   w h er e  n il   is   an   u n d efi n ed   v alu e.   I n   o th er   w o r d s ,   p r e ( E )   r e tu r n s   th e  v alu e  o f   t h e  ex p r ess i o n   at   th e   m o m en t  t   −   1   ( if   t  > 0 ,  n il   o th er w is e) .     T h e  ini ti a liz a t io n   o p e r at o r   (   o r   f b y ) ,   c all ed   f o ll o w e d   by ,   m ak es  it   p o s s i b l e  t o   d efi n e  th e  i n itial   v alu e  f o r   an   ex p r ess io n   ( i . e .   at  t  =  0 ) .   I f   E   an d   F   a r e  ex p r ess i o n s   d en o tin g ,   r es p ec t iv el y ,   th e  s eq u en ce s   ( e 0 ,   e 1 ,   …  e n ,   … )   an d   ( f 0 ,   f 1 ,   …  f n ,   … ) ,   th en   E    F   d en o tes   th e  s eq u en ce   ( e 0 ,   f 0 ,   f 1 ,   …  f n ,  … ).   L u s tr e  d o es  n o t  s u p p o r t  lo o p s   ( o p er ato r s   s u ch   a s   fo r   an d   w h ile )   n o r   r ec u r s iv e  ca ll s .   C o n s eq u en tl y ,   th e  e x ec u tio n   t i m e   o f   a   L u s tr e  p r o g r a m   ca n   b e  s tat icall y   c o m p u ted   a n d   th e   s ati s f ac tio n   o f   t h e  h y p o th e s is   o f   s y n ch r o n y   ca n   b e  ch ec k ed .     2 . 2 . 2 .   T he  SCA DE   env iro n m ent   SC A DE   i s   a  g r ap h ica l  en v ir o n m e n t  co m m er cial ized   b y   E s ter el  T ec h n o lo g ies .   I t  is   b ased   o n   th e   s y n ch r o n o u s   lan g u ag e   L u s tr e.   So ,   w e  ar e  o f ten   r ef er r ed   to   a s   L u s tr e/S C A DE .   L u s tr e/ SC ADE   is   u s u all y   u s ed   to   b u ild   t h e  ap p licatio n s   o f   r ea ctiv e  s y s te m s .   Fro m   t h e   SC ADE   f u n ctio n al  s p ec i f ic atio n s ,   C   co d e  i s   au to m at icall y   g en er ated ,   t h o u g h   th i s   tr an s f o r m a tio n   ( SC A DE   to   C )   is   n o t  s ta n d ar d ized .   T h is   g r ap h ical   m o d eli n g   en v i r o n m e n t  is   u s e d   m ai n l y   in   t h e  ae r o s p ac e  f iel d   ( A ir b u s ,   DO - 1 7 8 B ) ;  h o w e v er   it  is   also   u s ed   in   th e  d o m ai n s   o f   tr a n s p o r tatio n ,   au to m o ti v e  an d   e n er g y   [ 1 ] .     2 . 3 .   M o del o f   L us t re   pro g ra m s   L u s tr e  is   a  d ata - f lo w   la n g u a g e:  th e  i n p u t  f lo w s   o f   a  p r o g r am   ar e  tr an s f o r m ed   in t o   t h e  o u tp u t  f lo w s   th r o u g h   a  s et   o f   d ep en d e n t   o r   in d ep en d en t  o p er ato r s .   As  i n   SC ADE   d escr ip tio n s ,   th e   m o s t  u s u al   r ep r esen tatio n   f o r   L u s tr e  p r o g r a m s   is   a  d ir ec ted   g r ap h ,   ca lle d   o p er at o r   n et w o r k .     2 . 3 . 1 .   O pera t o r  net w o rk   o f   L us t re   pro g ra m   L u s tr e  p r o g r a m s   ar e  u s u all y   r ep r esen ted   as  o p er ato r   n et wo r k s .   An   o p er ato r   n et w o r k   i s   a  lab eled   g r ap h   co n n ec ti n g   o p er ato r s   b y   m ea n s   o f   d ir ec ted   ed g es.  An   o p era to r   ( lo g ical  o r   n u m er i ca l)   s p ec ifi e s   d ata - fl o w   tr a n s f er s   f r o m   in p u ts   to   o u tp u ts .   An   ed g e   s p ec i fi e s   t h e  d ata  fl o w   b et w ee n   t w o   o p e r ato r s .   An   o p er ato r   n et w o r k   co n tai n s   u s u al  lo g ic al  ( and ,  or ,  n o t ) ,   ar ith m etica l  ( +,   − ,   /,  * )   an d   r elatio n a l  o p er ato r s   ( LT   ( <) ,  LTE   ( <= ) ,  EQ   ( == ) ,  N E Q   ( <  >) ,  GT   ( >) ,  GTE   ( >= ) ) ,   th e  co n d itio n al  o p er ato r   ( I TE )   an d   th e   te m p o r al  o p er ato r s   ( p r e ,   fb y ).   I t  is   ass u m ed   t h at  t w o   f u n c ti o n s   ar e  ass o ciate d   w ith   a n y   o p er ato r   o p :   i n ( op )   r etu r n s   th e   s et  o f   th e   o p er ato r   in p u t  ed g es  a n d   out ( op )   r etu r n s   t h e  s et  o f   t h e  o p er ato r   o u tp u t  ed g e s .   T h er e  ar e  th r ee   k i n d s   o f   ed g es :  in p u t ,  o u tp u t   an d   in tern a l   e d g es.  I n p u t  ( r esp .   o u tp u t)   ed g es  ar e  o cc u r r en ce s   o f   in p u t  ( r esp .   o u tp u t)   v ar iab les   o f   t h e  L u s tr e  p r o g r a m .   I n ter n al  ed g es  co r r esp o n d   to   o cc u r r en ce s   o f   lo ca l  v ar iab les.  E v er y   ed g e   h a s   a  s in g l e   s o u r ce   o p er ato r   an d   a  s in g le  d esti n a tio n   o p er ato r .   A n   ed g e  e 2   is   a  s u cc es s o r   o f   an   ed g e  e 1   if   a n d   o n l y   if   th er e   is   an   o p er ato r   o f   w h ich   e 1   is   a n   in p u t a n d   e 2   is   an   o u tp u t.   Fo r   s ak e  o f   co n v e n ie n ce ,   i n   a d d itio n   to   th e  p r ev io u s   o p er ato r s ,   en tr y   o p er ato r s   an d   ex it  o p er ato r s   ar e   in tr o d u ce d .   E n tr y   ( r esp .   ex it)   o p er ato r s   h av e  n o   in w ar d   ( r esp .  o u t w ar d )   ed g es  an d   ar e  co n n ec ted   to   t h e   n et w o r k   t h r o u g h   i n p u t ( r esp .   o u tp u t)   ed g e s   [ 1 1 ] .   A ll o p er ato r s   ar e  s in g le  o u tp u t.   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E    Vo l.  7 ,   No .   5 ,  Octo b er   201 7   :   2 6 3 5   –   2 6 4 4   2638   2 . 3 . 2 .   P a t hs   in t he  m o del   T h e  o p er ato r   n et w o r k   d e f i n e s   p ath s   w i th i n   p r o g r a m   [ 1 1 ] .   A   p ath   p  =  ( e 1 ,   e 2 ,   …   e n )   is   a  fin i te  s eq u en ce   o f   s u cc es s i v e  ed g e s .   T h e  len g t h   o f   p   is   th e   n u m b er   n   ( w h er e  n  >  1 )   o f   ed g e s   i n   p   ( a  p ath   o f   le n g th   n   is   ca lled   n - p a th ) .   P a r ticu lar   ca s es o f   p ath s   ar e:      Un it  p a th s   ( p ath s   o f   len g th   e q u al  to   2 ) ;      C y clic  p ath s ,   c o n ta in in g   o n e  o r   m o r e  p r e   o p e r at o r s .   I n   ad d itio n ,   th e  p ath   ( e 1 , e 2 , …   e n - 1 )   is   ca lled   a  p r efix   o f   t h e  p ath   ( e 1 , e 2 , …   e n - 1 ,   e n )   w h er e  n   > 2 .     2 . 3 . 3 .   O pera t o r  P re dica t e   L et  ( e ,   s )   b e  a  u n it p at h   an d   op   an   o p er ato r   s u ch   th at  e   ϵ   in ( op )   an d   s   ϵ   out ( op ) .   T h e  o p e r ato r   p r ed icate   OC ( e ,   s )   ass o ciate d   w ith   ( e ,   s )   is   a  b o o lean   ex p r ess io n   s u ch   t h at:     OC ( e ,   s )   =   tr u e   if   op   is   th e   not   o p er at o r   o r   a   r el ati o n al   o p e r at o r .     OC ( e ,   s )   =   n o t ( e )   o r   e ’   if   op   is   an   a n d   o p er at o r   an d   in ( op )   =   { e ,  e ’} .     OC ( e ,   s )   =   e  o r   n o t ( e ’)   if   op   is   an   or   o p e r at o r   an d   in ( op )   { e ,  e ’} .     OC ( c ,   s )   =  tr u e ,   OC ( e ,   s )   =  c  a n d   OC ( e ’,   s )   =  n o t ( c )   if   op   is   an   I T E   o p e r at o r   s u ch   th a t  in ( op )   =  { c ,  e ,   e ’} .     2 . 3 . 4 .   Act iv a t io n Co nd it io ns   T h e  co n d itio n   u p o n   w h ich   a  d ata  f lo w   is   tr an s f er r ed   f r o m   th e  i n p u t  ed g e  to   t h e  o u tp u t  e d g e   o f   an   o p er ato r   is   ca lled   ac tiv atio n   c o n d itio n   [ 1 1 ] .  An   ac ti v atio n   c o n d itio n   i s   as s o ciate d   w it h   ea ch   p ath .   W h e n   t h e   ac tiv atio n   co n d itio n   o f   a  p ath   is   tr u e,   an y   c h an g e  in   t h e  p ath   en tr y   v a lu e  ca u s es  ev e n t u all y   th e  m o d i fi ca tio n   o f   th e  p at h   e x it   v al u e.   A  p at h   i s   ac ti v ated   i f   its   ac ti v atio n   c o n d itio n   h as   b ee n   tr u e   a t  lea s t  o n ce   d u r i n g   a n   ex ec u t io n .   L et  p   =  ( e 1 ,   e 2 ,   …   e n - 1 ,   e n )   b e  a   n - p ath ,   let  p 0   =  ( e 1 ,  e 2 ,   …   e n - 1 )   b e  th e  p r e fix   o f   p   an d   let  op   b e  th e  last   o p er ato r   o f   p ,   ( i.e .   e n - 1   ϵ   in ( op )   a n d   e n   ϵ  o u t ( op ) ).   T h e  ac tiv atio n   co n d itio n   o f   p   is   a  te m p o r al  b o o lean   ex p r es s io n ,   AC ( p ) ,   d efin ed   as  f o llo w s   [ 1 2 ] :   If  n   =   1   th en   AC ( p )   =   tr u e ,   th en   t h e  ac tiv a tio n   co n d itio n   o f   a  s i n g le  ed g e  is   al w a y s   tr u e.   Fo r   a  g iv en   n - p ath   p ,   th e  ac tiv atio n   co n d itio n   is   r ec u r s iv e l y   d efin ed   as  a  f u n ctio n   o f   t h e  o p er ato r s   in   it.  A cc o r d in g   to   th e  t y p e  o f   th e  o p er ato r s ,   th e  f o llo w i n g   t h r e e  ca s es  m a y   b e  d is ti n g u is h ed :     AC ( p )   =  A C ( p’ )   an d   OC ( e n - 1 ,   e n )   w h er e  op   is   a   b o o l ea n ,   r e lati o n al   o r   co n d i ti o n al  o p e r at o r   an d   OC ( e n - 1 ,   e n )   is   th e  p r e d ic at e  ass o ci at ed   w ith   o p e r at o r   op .      AC ( p )   =  f a ls e    p r e ( AC ( p ’))   w h er e  op   is   a  p r e   o p e r a to r .   T h is   m ea n s   th at  th e  p ath   is   ac t iv a ted   if   its   p r efi x   h as  b ee n   ac tiv a te d   a t  th e  p r ev io u s   cy cle .   T h e  fb y   ( )   o p e r a to r   s ta tes  th at  s u ch   a   p ath   ca n n o t   b e   a ctiv a te d   at   t  =  0 .     I f   op   is   th e  o p e r a to r   f b y ( in it ;   n o n I n it ) ,   an d   if     p i nit ,  p n onI nit   a r e  r es p e ctiv e ly   th e  p r efi x es  o f   i n i t   an d   n o n I n it   th en   th e  co r r es p o n d in g   ac t iv ati o n   c o n d iti o n s   a r e   d efi n ed   b y   th e  f o ll o w in g   t w o   eq u a tio n s .   T h e  fi r s t  eq u a ti o n   ( 1 )   s ta tes  th at  th e  p ath   is   ac t iv ate d   if   its   p r efi x   is   ac tiv at ed   at  th e  in iti al  cy cle ;   w h ile  i n   th e  s ec o n d   ( 2 ) ,   t h e   p at h   is   alw a y s   ac tiv a te d   b u t   f o r   th e  in i tial   cy cle.   AC ( p )   = A C ( p 0 )     fa ls e    ( 1 )   AC ( p )   = fa ls e    AC ( p 0 )     ( 2 )       3.   RE G RE SS I O N  T E ST I N G   A P P RO ACH   F O R  L UST RE / S CADE P RO G RAM S   3 . 1 .   P ro ble m   s t a t e m e nt   L u s tr e /S C A DE   ap p licatio n s   u s u all y   r eq u ir e  v er y   h i g h   q u ali t y   a n d   r ig o r o u s   tes tin g   ac tiv it ies  b ef o r e   d ep lo y i n g .   D u r in g   t h e  d ev elo p m en t  p r o ce s s ,   th e  L u s tr e  p r o g r a m   is   o f ten   u p d ated ,   s o   r eg r ess io n   test   s h o u ld   b e  p er f o r m ed   to   d etec t  b u g s .   As  f o r   an y   r eg r es s io n   test i n g   ac ti v it y ,   o p ti m iz in g   t h e  n u m b er   o f   ex ec u ted   te s t  ca s e s   is   an   i m p o r tan t is s u e .   Su p p o s e  th at   w e  h a v e  a  L u s t r e  p r o g r am   L 1   a n d   L 2   is   a  n e w   v er s io n   o f   p r o g r a m   L 1 .   C o m p ar i n g   to   v er s io n   L 1 ,   v er s io n   L 2   m a y :     R em o v e  s o m e  f u n cti o n s ;     A d d   s o m e  n ew   f u n ctio n s ;     C h an g e  s o m e  f u n cti o n s ;   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2088 - 8708       Lu s R eg Tes :   A   R eg r ess io n   Tes t in g   To o l fo r   Lu s tr e  P r o g r a ms   ( N g u ye n   Th a n h   B in h )   2639     L ea v e   f u n cti o n s   u n ch an g e d .   T h e   o b j ec tiv e  is   to   p er f o r m   r eg r ess io n   te s ti n g   o f   v er s io n   L 2   w it h   a   m in i m u m   n u m b er   o f   test   ca s es.   T h e   ap p r o ac h   w ill b e  p r esen te d   in   n ex t sectio n .     3 . 2 .   T he  a pp ro a ch   T h e  id ea   is   to   co m p ar e  t w o   v e r s io n s   L 1   a n d   L 2   i n   o r d e r   to   d et er m in e  t h e  d if f er e n ces   b et w ee n   th e m :     T h e  n ew   p a r ts   th a t  ar e   ad d ed   i n to   L 2 ;     T h e  p a r ts   o f   L 1   th at  a r e   ch an g e d   in   L 2 ;     T h e  p a r ts   o f   L 1   th a t  ar e  n o t   af f ec t ed   in   L 2 ;     T h e  p a r ts   o f   L 1   th at  a r e   r em o v ed   f r o m   L 2 .   I n s tead   o f   co n s id er in g   d ir ec tl y   th e  t w o   v er s io n s ,   w e  co m p ar e  th eir   t w o   s e t s   o f   p ath s   an d   i d en tify   t h e   d if f er e n ce s   b et w ee n   th e m .   T h en ,   w e  g e n er ate  test   ca s e s   th a t c o v er   s u c h   d if f er en ce s .         Fig u r e  1 .   T h e  o v er all  ap p r o ac h   o f   r eg r es s io n   te s ti n g     f o r   L u s tr e  p r o g r a m s       Fig u r e   1   illu s tr ates t h e  ap p r o a c h ,   w h ic h   c o n s is t s   o f   t w o   f o llo w i n g   p h ase s .   P ha s e  1 :   G ener a t ing   t est  da t a   f o r  v er s io n L 1   W e  f ir s t  d eter m i n e  t h e  o p er ato r   n et w o r k ,   p ath   tab le  an d   ac tiv atio n   co n d itio n   tab le  f o r   v er s io n   L 1 .  T h e n,   w e  g en er ate   test   ca s es   ( test   s eq u e n ce s )   co v er i n g   t h e  p ath s   b as ed   o n   th e   ac ti v atio n   c o n d itio n   tab le.   T h e  r esu lt o f   t h i s   p h ase  i s   a  s et  o f   t est s eq u e n ce s   T 1   an d   th e  r elati o n s h ip   b et w ee n   p ath   tab le  P 1   an d   T 1 .     P ha s e  2 :   Select ing   a nd   g ener a t ing   t est  da t a   f o r  v er s io n L 2   I n   th is   p h a s e,   w e  r eu s e  t h e   s u b s et  of   test   ca s es  g e n er ated   in   p h ase  1   f o r   test in g   v er s io n   L 2   an d   w e   also   cr ea te  s o m e  n e w   te s t c ase s   co v er in g   th e  n e w   p ath s   i n   L 2 .   T h is   p h ase  co n s is t s   o f   t h r ee   s tep s   as f o llo w s .   2 . 1 )   Dete r m in in g   p ath   tab le  P 2   f r o m   th e  o p er ato r   n et w o r k   o f   v er s io n   L 2 .   2 . 2 )   C o m p ar in g   t w o   tab les  P 1   an d   P 2 ,   th e n   cla s s i f y i n g   p at h s .   As  a  r es u lt,   we   o b tain   t h r ee   s u b s et s   P A ¸   P B   an d   P C :      P A :   T h e   p ath s   r em o v ed   in   P 2   ( t h i s  s u b s e t  ex is t s   in   P 1   b u t   d o es   n o t   in   P 2 );     P B   =   P 1  ⋂   P 2 :  T h e  s u b s e t  o f   p a th s   th at   a r e   th e   s am e  in   P 1   an d   P 2 ;      P C :  New   p a th s   in   P 2 .   2 . 3 )   B u ild in g   t h e  s e t o f   test   ca s es f o r   v er s io n   L 2   b ased   o n   P A ,  P B   an d   P C   as f o llo w s :     P A :   th e   s u b s et  o f   test   c ases   c o v er in g   P A   w ill n o t   b e   r eu s e d   in   T 2 ;      P B :   th e   s u b s et  o f   test   c ases ,   ca l led   T’ ,   c o v e r in g   P B   w ill b e   r eu s ed   in   T 2 ;      P C :   a   n ew   s u b s et   o f   test   c ases ,   ca ll e d   T ’ ’ ,   w ill b e   c r ea t ed   t o   c o v e r   P C .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E    Vo l.  7 ,   No .   5 ,  Octo b er   201 7   :   2 6 3 5   –   2 6 4 4   2640     Fig u r e  2 .   Gen er atin g   an d   s e lec tin g   test   ca s e s   f o r   v er s io n   L 2       Fig u r e   2   s h o w s   t h e  s tep s   o f   p h ase  2 .   As  a   r esu lt,  T 2   =   T ’’   is   t h e  s et  o f   te s t  ca s es   f o r   r eg r ess io n   test i n g ,   a n d   T 2all =T ’   U  T ’’   is   t h e  s et  o f   te s t c ase s   to   test   v er s i o n   L 2 .       4.   T H E   L USR E G T E S T O O L   T h e  L u s R eg T es  to o l  is   a  test   d ata  g en er ato r ,   w h ic h   co n s is t s   o f   t w o   m ai n   m o d u le s   as  f o llo w s   ( Fig u r e   3 ).     Mo d u le   1 : g en er atin g   test   d at a   f o r   th e   f ir s t  v e r s i o n ;     Mo d u le   2 : s el ec tin g   an d   g en e r atin g   t est   d ata   f o r   r eg r ess i o n   t e s tin g   f o r   th e  s ec o n d   v e r s i o n .         Fig u r e  3 .   T h e  L u s R eg T es to o l       Mo d u le  1   o f   L u s R e g T es  r eq u ir es  th e   f o llo w i n g   i n p u t s :  th e  f ir s t  v er s io n   o f   L u s tr e  p r o g r a m   to   b e   an al y ze d ,   th e   le n g t h   o f   p ath   a n d   t h e  m a x i m u m   n u m b er   o f   l o o p s   in   a   p ath   ( th at   i s ,   t h e  n u m b er   o f   ti m es   t h at  a   p r e   o p er a to r   w ill  b e  r ep ea ted   in   a  p ath ) .   T h is   m o d u le  a u to m ate s   r u n n i n g   th e  L e s ar   to o l  w i th   ac ti v atio n   co n d itio n s .     As a  r esu lt,  it p r o v id es a   s et  o f   test   d ata  f o r   test i n g   t h e  f ir s t  v er s io n .  Mo d u le  1   is   d etailed   in   Fig u r e   4 .     Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2088 - 8708       Lu s R eg Tes :   A   R eg r ess io n   Tes t in g   To o l fo r   Lu s tr e  P r o g r a ms   ( N g u ye n   Th a n h   B in h )   2641       Fig u r e  4 .   Mo d u le  1       Mo d u le  2   u s es  th e  r es u lt s   o f   m o d u le  1   an d   th e  n e w   v er s io n   o f   L u s tr e  p r o g r am   a s   in p u ts .   I t  s elec t s   an d   g en er at es   test   d ata   f o r   r eg r ess io n   te s tin g .   T h e  m o d u le  co n s i s ts   o f   th r ee   s tep s :     A   s et  o f   p ath s   i s   d eter m i n ed   b ased   o n   t h e  L u s tr e  n o te  o f   t h e   n e w   v er s io n .   T h is   s e t  o f   p at h s   w ill   be   co m p ar e d   w it h   th e   s et  o f   p ath s   o f   th e  p r ev io u s   v er s io n .  T h e   r esu lts   o f   th e  co m p ar is o n   h elp   id en ti f y i n g   th e  tr i g g er   co n d iti o n s   th a t  w ill  b e  u s e d   in   th e  n e x t step .     Mo d el  ch ec k er   L e s ar   is   u s ed   to   g en er ate   th e  co u n ter - e x a m p l e s.     T h e  co u n ter - ex a m p le s   ar e  an al y ze d   an d   th en   te s t  d ata   ar e  g en er ated   f o r   th e  r eg r es s io n   t esti n g   ac tiv it y .   T h e  en tire   p r o ce s s   o f   Mo d u le  2   is   s h o w n   in   F ig u r e  5 .         Fig u r e  5 .   Mo d u le  2       T h e  L u s R eg T es  to o l  i s   d ev e lo p ed   in   J av a   p r o g r a m m in g   lan g u a g e,   d atab ase   M y SQ L   a n d   r u n s   o n   t h e   L i n u x   o p er atin g   s y s te m .   Fi g u r e   6  s h o w s   a   s cr ee n s h o t o f   t h e  L u s R eg T es to o l.           Fig u r e  6 .   Scr ee n s h o t o f   th e  L u s R e g T es to o l       I n   th e  n ex t p ar t o f   t h is   s ec tio n ,   w e  w ill p r ese n t t h e  f u n ctio n s   o f   th i s   to o l  w it h   a   ca s e  s tu d y .       5.   CASE   S T UD Y   W e  h av e  ap p lied   t h e  L u s R e g T es  to o l   to   th e  Hea ter   C o n tr o ller   S y s te m ,   w h ic h   i s   p r esen ted   i n   Fig u r e   7 .   T h e  Hea ter   C o n tr o ller   S y s te m   i s   a   t y p ical  e x a m p le  o f   th e  r ea cti v e   s y s te m   was  b u ilt  b y   u s in g   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E    Vo l.  7 ,   No .   5 ,  Octo b er   201 7   :   2 6 3 5   –   2 6 4 4   2642   L u s tr e/ S C A DE .   T h e  co n tr o lle r ' s   e n v ir o n m en t  co n s is t s   o f   t h r ee   ele m e n ts :   a  s w i tch ,   a  te m p e r atu r e  s e n s o r   an d   a   b lo w er .   T h e  s en s o r   e m its   t h r ee   B o o lean   s ig n als:   Tlo w ,  T o k   an d   Th ig h   m ea n i n g   th at  t h e  te m p er at u r e  is :   r esp ec tiv el y ,   b elo w ,   o n   o r   ab o v e  t h e   u s er - d e f i n ed   te m p er at u r e.   T h e  co n tr o ller   u s es   th e   s w itc h   p o s i tio n   ( On )  an d   th e  s en s o r   s ig n als  to   e m it   f o u r   co n tr o l  s ig n als  ( S TOP ,  Dea ctiva ted ,  Ho t   an d   C o ld )   t o   th e  b lo w er .   S TOP   m ea n s   t h at   th e   b lo w er   is   s to p p ed ,   Dea ctiva ted   m ea n s   t h at  t h e  b lo w er   is   s ta n d - b y   ( n o   a ir   i s   is s u ed )   w h ile   Ho t   an d   C o ld   m ea n   r esp ec ti v el y   t h at  h o t   air   o r   co ld   air   is   is s u e d .   T w o   f o llo w i n g   v er s io n s   o f   th e  L u s tr e  p r o g r a m   w er e  d ev elo p ed   f o r   th is   s y s te m .     Ver s io n 1 :   Fig u r e   7   p r esen t s   t h e  ar ch itect u r e  o f   Hea ter   C o n t r o ller   Sy s te m .           Fig u r e  7 .   T h e  Hea ter   C o n tr o ller   S y s te m   ar ch i tectu r e       Ver s io n  2 :   Ver s io n   1   w a s   ev o lv ed   b y   ad d in g   t w o   o u tp u t  s ig n a ls   ve r y C o ld   an d   ve r yHo t .  I f   cu r en t   s en s o r   is   C o ld ,   if   T h ig h t   =   tr u e ,   s ig n al  is   ve r y C o ld .  I f   cu r en t  s e n s o r   is   ve r yCo ld ,   if   T h i g h t   =   tr u e ,   s ig n al   is   ve r yCo ld   else i f   Tlo w   =   t r u e   th en   s ig n al  i s   C o ld   ( s i m ilar   w it h   ve r yHo t ).   W h en   u s i n g   t h e  L u s R e g T es  to o l,  t h e  p r o ce s s   is   r ea lized   th r o u g h   t w o   p h ase s .   F ir s t,  m o d u le   1   w il l  b e   r u n   to   g e n er ate   test   d ata  f o r   v e r s io n   1   o f   th e  p r o g r a m   ( Fi g u r e  8 ) .           Fig u r e  8 .   Usi n g   m o d u le  1   to   g en er at e   test   d ata  f o r   v er s io n   1     Af ter   t h e  f ir s t  p h ase,   w e  o b ta in   t h e  s et  o f   te s t  ca s e s   T 1   f o r   th e  H ea ter   C o n tr o ller   S y s te m   an d   t h e  r elatio n s h ip   b et w ee n   ac ti v atio n   co n d itio n s   an d   test   ca s es  i s   i llu s tr ated   in   Fi g u r e   9 .       Fig u r e  9 .   A cti v atio n   co n d itio n s   an d   test   ca s e s   f o r   v er s io n   1   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2088 - 8708       Lu s R eg Tes :   A   R eg r ess io n   Tes t in g   To o l fo r   Lu s tr e  P r o g r a ms   ( N g u ye n   Th a n h   B in h )   2643   Nex t ,  t h e  L u s R e g T es  to o l   is   ap p lied   to   v er s io n   2   o f   th e   L u s tr e  p r o g r a m .   It   a n al y ze s   t h e   p ath s   an d   co m p ar es   to   v er s io n   1 .   T h e  r esu lt o f   t h e  co m p ar is o n   is   s h o wn   in   Fi g u r e   1 0 .       P a th   A :  T h e  p ath s   a r e  r em o v ed   in   v e r s i o n   2   ( th i s  s u b s et  ex is t s   in   v er s io n   1   b u t  d o es  n o t  in   v er s i o n   2 ).     P a th   B :  T h e  s u b s e t  o f   p a th s   is   th e  s am e  in   v er s io n   1   an d   v er s i o n   2 .     P a th   C :   T h e   p ath s   a r e   n ew   in   v er s i o n   2 .         Fig u r e  1 0 .   T h e  r esu lt o f   t h e  co m p ar i s o n       T he   ac tiv atio n   co n d itio n s   ar e  co m p u ted   f o r   th e  n e w   p at h s   P C .   Nex t,  th e  tr ap   p r o p er ties   ar e  cr ea te d   b y   n e g ati n g   t h e  ac ti v atio n   co n d itio n s .   Fi n all y ,   th e  L u s R eg T es  to o l  r u n s   t h e  L esar   to o l  to   g en er ate  th e  co u n ter   ex a m p le s ,   w h ic h   ar e  tr an s f o r m ed   in to   t h e  test   ca s e s   f o r   r eg r ess io n   te s ti n g   ( T ab le   1 ).       T ab le  1 .   Set o f   test   ca s es T ’ ’   f o r   r eg r ess io n   test i n g   C o u n t e r   e x a m p l e s   T e st   c a s e s   T r a n si t i o n   1 :   n o t   O n   O n = f a l se   {( 0 ,   1 ,   1 ,   1 ) }   T r a n si t i o n   1 :   n o t   O n   O n = f a l se   {( 0 ,   1 ,   1 ,   1 ) }   T r a n si t i o n   1 :   O n   o r   n o t   T l o w   O n = t r u e   o r   T l o w = f a l s e   {( 1 ,   1 ,   1 ,   0 )}   T r a n si t i o n   1 :   O n   o r   n o t   T l o w   O n = t r u e   o r   T l o w = f a l s e   {( 1 ,   1 ,   1 ,   0 )}   T r a n si t i o n   1 :   t r u e   A n y   A n y   T r a n si t i o n   1 :   T l o w   T r a n si t i o n   2 :   O n   o r   n o t   T l o w   T l o w = t r u e   O n = t r u e   o r   T l o w = f a l s e   {( 0 ,   0 ,   0 ,   1 ),   ( 1 ,   1 ,   1 ,   0 )}   T r a n si t i o n   1 :   O n   o r   n o t   T h i g h   O n = t r u e   o r   T H i g h = f a l se   {( 1 ,  0 ,   1 ,   1 ) }   T r a n si t i o n   1 :   O n   o r   n o t   T l o w   O n = t r u e   o r   T l o w = f a l s e   {( 1 ,   0 ,   1 ,   0 )}   T r a n si t i o n   1 :   t r u e   A n y   A n y   T r a n si t i o n   1 :   T h i g h   T r a n si t i o n   2 :   O n   o r   n o t   T h i g h   T h i g h = t r u e   O n   = t r u e   o r   T h i g h = f a l se   {( 0 ,   1 ,   0 ,   0 ) ,   ( 1 ,  0 ,   1 ,   1 ) }       T h e  test   ca s es   in   T ab le  1   ar e  u s ed   f o r   r eg r e s s io n   te s ti n g   o f   v er s io n   2 .   T h i s   allo w s   te s ti n g   o n l y   t h e  ch an g ed   p ar ts   an d   n e w   p ar ts   i n   v er s io n   2 .         Fig u r e  1 1 .   C h ar t o f   test   ca s es   s tatu s   in   r e g r ess io n   test     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E    Vo l.  7 ,   No .   5 ,  Octo b er   201 7   :   2 6 3 5   –   2 6 4 4   2644   Fig u r e  1 1   s h o w s   th e  co m p ar is o n   o f   test   ca s es  i n   r eg r ess io n   t esti n g   o f   t h e  Hea ter   C o n tr o lle r   Sy s te m .  W e  ca n   s tate  th at :     1 8 , 7 5 %  o f   t est   c ases   h av e   b ee n   r em o v e d ;     1 8 , 7 5 %  o f   t est   c ases   h av e  b ee n   r eu s ed ;     6 2 , 5 %  o f   t est   c ases   h av e   b ee n   cr ea t ed .       6.   CO NCLU SI O N  AND  F U T U R E   WO RK   In   th i s   p ap er ,   w e  p r esen t  t h e  L u s R eg T es  to o l  f o r   au to m ati ca ll y   g e n er ati n g   te s t  ca s es  i n   r eg r ess io n   test i n g   f o r   L u s tr e/S C A DE   p r o g r a m s .   T est  ca s es  ar e  g en er ated   b y   an al y zi n g   p ath s   in   o p er ato r   n et w o r k   o f   L u s tr e  p r o g r a m s .   T h e  to o l  h elp s   id en tify   o n l y   test   ca s e s   n ee d ed   f o r   r eg r ess io n   test in g ,   s o   i t  ca n   s av e  co s ts   a n d   ti m e  e f f o r t  d u r in g   d ev elo p i n g   an d   m ai n tai n i n g   p r o g r a m s ,   esp ec iall y   r ea cti v e  s y s te m s   d ev elo p ed   in   th e   L u s tr e/S C A DE   e n v ir o n m en t.   T h e  Hea ter   C o n tr o ller   S y s te m   th at  i s   a  r ea cti v e  s y s te m   is   u s ed   to   illu s tr ate  t h e  ap p licab ilit y   o f   th e   to o l.  W e  ar e  r ea lizin g   m o r e  e x p er i m en ts   w it h   s o m e  co m p le x   s y s te m s   d ev elo p ed   b y   L u s tr e/S C A DE .       RE F E R E NC E S   [1 ]   N.  Ha lb w a c h s,  e t  a l . , " T h e   s y n c h ro n o u s  d a ta f lo w   p ro g ra m m in g   lan g u a g e   L u stre ,"   Pro c e e d in g s o f   th e   IEE E ,   1 9 9 1 .   [2 ]   S .   K .   M o h a p a tra  a n d   S .   P ra sa d ,   " T e st  Ca se   Re d u c ti o n   Us i n g   A n t  Co lo n y   Op ti m iza ti o n   f o r  Ob jec t  Orie n te d   P r o g ra m , "   In ter n a ti o n a l  J o u rn a l  o f  El e c trica l  a n d   C o mp u ter   En g in e e rin g ,  V o l .   5 ,   No .   6 ,   2 0 1 5 .   [3 ]   T .   M .   H.  L e ,   e t  a l . ,   " S u rv e y   o n   M u tati o n - b a se d   T e st  Da ta  G e n e ra ti o n ,"   In ter n a ti o n a l  J o u rn a l  o f   El e c trica l  a n d   Co mp u ter   E n g in e e rin g ,  V o l .   5 ,   N o .   5 ,   p p .   1 1 6 4 - 1 1 7 3 ,   2 0 1 5 .   [4 ]   S .   Yo o   a n d   M .   Ha rm a n ,   " Re g re ss io n   T e stin g   M i n im isa ti o n ,   S e l e c ti o n   a n d   P rio ri ti sa ti o n   -   A   S u rv e y ,"   S o ft w a re   T e stin g ,   Ver if ica ti o ,   a n d   Reli a b i li ty ,   2 0 0 7 .   [5 ]   B.   M a rre   a n d   A .   A rn o u ld ,   " T e st  S e q u e n c e s  Ge n e ra ti o n   F ro m   L u stre   D e sc rip ti o n s:  GA T e L ,"   Fi ft e e n   IEE E   In t e rn a t io n a l   C o n f e re n c e   o n   A u t o ma ted   S o ft w a re   En g in e e rin g ,   IE E E  Co m p u ter S o c iety   P re ss ,   p p .   2 2 9 – 2 3 7 ,   2 0 0 0 .   [6 ]   E.   Ja h ier,  e t  a l. ,   " Ca se   S tu d ies   w it h   L u re tt e   V2 , "   In ter n a ti o n a l  J o u rn a l  o n   S o ft wa re   T o o ls  fo r  T e c h n o lo g y   T ra n sfe r ,  V o l .   8 ,   No .   6 ,   2 0 0 6 .   [7 ]   L .   d u   B o u s q u e t ,  e t  a l. ,   " L u tes s:  A   S p e c if ica ti o n - Driv e n   T e sti n g   En v iro n m e n t  f o r  S y n c h ro n o u s  S o f twa re ,"   Pro c e e d in g s  o f  2 1 st I n ter n a ti o n a l   Co n fer e n c e   o n   S o ft w a re   En g in e e rin g ,   A CM ,   1 9 9 9 .   [8 ]   B .   S e lj im i  a n d   I.   P a rissis,   " A u to m a ti c   g e n e ra ti o n   o f   tes t  d a ta  g e n e ra to rs  f o r  s y n c h ro n o u s  p r o g ra m s:  L u tes s  v 2 ,"   Pro c e e d in g   o f  W o rk sh o p   o n   Do m a in   s p e c if ic a p p ro a c h e s to   so ft w a re   tes t  a u t o ma ti o n ,   2 0 0 7 .     [9 ]   C.   D.  T rin h ,   e t  a l. ,   " A   re g re s sio n   tes ti n g   a p p ro a c h   f o r  L u stre /S CA DE  p ro g ra m s ,"   T h e   S ixth   In ter n a ti o n a l   S y mp o si u m o n   In fo rm a ti o n   a n d   C o mm u n ic a ti o n   T e c h n o l o g y   ( S OIC T   2 0 1 5 ) ,   2 0 1 5 .   [1 0 ]   Y.  L .   Na n c y   a n d   J.  W a h i,   " A n   o v e rv ie w   o f   re g re ss io n   tes ti n g ,"   ACM   S IGS OFT   S o ft w a re   En g i n e e rin g   No tes ,   1 9 9 9 .   [1 1 ]   A .   Lak e h a l  a n d   I.   P a rissis,   " L u stru c tu :  A   to o l   f o r  th e   a u to m a ti c   c o v e ra g e   a ss e s s m e n t  o f   L u stre   p ro g ra m s , "   Pro c e e d in g s  o f  1 6 t h   IE EE   In ter n a ti o n a l   S y mp o siu m  o n   S o ft wa re   R e li a b il it y   En g in e e rin g ,   2 0 0 5 .   [1 2 ]   A .   L a k e h a l  a n d   I.   P a rissis,   " S tru c tu ra l  C o v e ra g e   Crit e ria  f o r   L u stre /S CA DE  P ro g ra m s ,"   S o ft wa re   T e stin g ,   Ver if ica ti o n   a n d   Relia b il i ty ,   Jo h n   W il e y   a n d   S o n s L td ,   Vo l.   1 9 ,   p p .   1 3 3 – 1 5 4 ,   2 0 0 9 .         Evaluation Warning : The document was created with Spire.PDF for Python.