scieee Open visual document viewer

Supporting Requirements Verification Using XSLT

Durán Toro, Amador; Ruiz Cortés, Antonio; Corchuelo Gil, Rafael; Toro Bonilla, Miguel

Abstract

In this paper we present a light-weight approach for the automatic verification of requirements. This approach is not based on natural language parsing techniques but on the representation of requirements in XML. In our approach, XSLT stylesheets are used not only to automatically generate requirements documents, but also to provide verification–oriented heuristics as well as to measure the quality of requirements using some verification–oriented metrics. These ideas have been implemented in REM, an experimentalXML– based requirements management tool also described in this paper.

Full text

Suppo ing Requi emen s Ve i ica ion Using XSLT  Amado Du án An onio Ruiz–Co és Ra ael Co chuelo Miguel To o Dp o. de Lenguajes y Sis emas In o má icos Uni e sidad de Se illa {amado ,a uiz,co chu,m o o}@lsi.us.es Abs ac In his pape we p esen a ligh -weigh app oach o he au oma ic e i ica ion o equi emen s. This app oach is no based on na u al language pa sing echniques bu on he ep esen a ion o equi emen s in XML. In ou ap- p oach, XSLT s yleshee s a e used no only o au oma i- cally gene a e equi emen s documen s, bu also o p o ide e i ica ion–o ien ed heu is ics as well as o measu e he quali y o equi emen s using some e i ica ion–o ien ed me ics. These ideas ha e been implemen ed in REM, an ex- pe imen al XML–based equi emen s managemen ool also desc ibed in his pape . 1. In oduc ion I is widely acknowledged wi hin he so wa e commu- ni y ha equi emen s quali y is one o he mos impo - an ac o s in he quali y and o e all success o so wa e p ojec s. Tha is he eason why some equi emen s engi- nee ing (RE) ac i i ies ha e as hei main goal inc easing he quali y o equi emen s, namely equi emen s analysis, equi emen s e i ica ion and equi emen s alida ion (see he UML ac i i y diag am in igu e 1). Requi emen s Quali y Assu ance <<subp ocess>> Requi emen s Enginee ing <<p ocess>> Requi emen s Nego ia ion <<subp ocess>> Requi emen s Managemen <<subp ocess>> Requi emen s Valida ion Requi emen s Ve i ica ion Requi emen s Analysis Requi emen s Elici a ion <<subp ocess>> Figu e 1. RE p ocess model  This wo k is pa ially suppo ed by he CICYT p ojec TIC 2000– 1106–C02–01 (GEOZOCO) and by he CYTED p ojec VII.18 (WEST) These quali y–o ien ed ac i i ies ac as a equi emen s quali y il e in a simila way he quali y ga eway does in he Vole e me hod [16]. The main goals o hese ac i i ies a e summa ized in able 1. Table 1. Quali y–o ien ed RE ac i i ies Ac i i y Main goal Analysis Iden i y con lic s in equi emen s Ve i ica ion De ec de ec s in equi emen s Valida ion Ce i y equi emen s a e consis en wi h he in- en ions o cus ome s and use s In his pape we ocus on au oma ic e i ica ion o so– called speci ica ion e o s [8] and in assis ing he equi e- men s e i ie in de ec ing knowledge e o s [8] by means o some e i ica ion–o ien ed heu is ics and equi emen s me ics ha can be easily compu ed. Ou app oach is based on he eme gen echnology buil a ound XML [22] and i s companion language XSLT [21], as ini ially desc ibed in [7]. The es o he pape is o ganized as ollows. Fi s , we desc ibe REM, ou RE ool [5, 6]. Then, we p esen a b ie o e iew o he XML model o equi emen s used by REM and how XSLT can be used o suppo he e i ica ion o some quali y p ope ies o equi emen s exp essed in XML. Finally, we discuss some ela ed wo k and poin ou conclu- sions and u u e wo k. 2. REM: an XML–based equi emen s ool REM (REqui emen s Manage ) is an expe imen al RE ool de eloped by one o he au ho s as pa o his PhD. The- sis [5]. A REM p ojec is conside ed o be composed o he ou documen s co esponding o he ou abbed ee iews in igu e 2. In REM, equi emen s, con lic s and de ec s a e exp essed in na u al language using p ede ined empla es and some linguis ic pa e ns (see [6] o de ails). Fo ex- p essing concep ual models, we ha e chosen a subse o he UML [3]. P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE C ea ion oolba HTML iew Tabbed ee iews Con ex menu Requi emen s Concep ual Models De ec s and Con lic s Change Reques s Figu e 2. REM use in e ace (de aul XSLT s yleshee ) 2.1. REM a chi ec u e REM p ojec s a e s o ed in ela ional, ligh –weigh da a- bases. When he use c ea es a new REM p ojec , he basic s uc u e is aken om a base p ojec , ha can be emp y o can con ain he manda o y sec ions o equi emen s s an- da ds like [9]. Any o dina y REM p ojec can be selec ed as a base p ojec , so REM use s can euse whole REM p ojec s o only indi idual equi emen s by means o he copy&pas e and d ag&d op ea u es o he REM use in e - ace. In o de o p o ide immedia e eedback on use ac ions, REM gene a es XML da a co esponding o he p ojec be- ing edi ed, applies an ex e nal XSLT s yleshee ha ans- o ms XML da a in o HTML and shows he esul o he use . The use can change documen appea ance o con en by selec ing o c ea ing di e en XSTL s yleshee s. The de- aul XSLT s yleshee gene a es a highly hype linked docu- men , easing na iga ion o equi emen s documen s. 2.2. REM use in e ace The use in e ace o REM p esen s wo di e en iews o he use (see igu e 2). On he le , he use can see ou abbed ee iews, one o each documen in he p ojec . On he igh , he esul o he XSLT ans o ma ion o he XML da a co esponding o he selec ed documen is p esen ed o he use in a embedded web b owse . In any o he ou ee iews, he use can di ec ly ma- nipula e REM objec s by d ag&d op o by con ex menus. Only ac ions ha make sense can be pe o med, ollowing a co ec –by–cons uc ion app oach, hus inc easing in e nal consis ency [8] and sa ing e i ica ion e o . Fo example, ac ions o use case s eps can be o h ee di e en classes (see igu e 3): ac o ac ion, i he ac ion is pe o med by an ac o ; sys em ac ion i he ac ion is pe o med by he sys- em, o use case ac ion, i he ac ion consis s o pe o ming ano he use case, i.e. ainclusion o ex ension [3]. S eps wi h ac o ac ions o use case ac ions can be c ea ed only i some ac o o ano he use case ha e been p e iously c ea ed. On he o he hand, only ac o s o use cases no e e enced by any s ep can be dele ed. 3. XML model o equi emen s in REM REM is based on a UML model o equi emen s de- sc ibed in [5] which has been ansla ed in o a Documen Type De ini ion (DTD) [22]. As an example, he UseCase class in igu e 3 has been ansla ed in o he ollowing DTD elemen de ini ion: <!ELEMENT em:useCase ( em:name, em: e sion, em:au ho s?, em:sou ces?, em:commen s?, em:impo ance, em:u gency, em:s a us, em:s abili y, em:isAbs ac ?, em: igge ingE en , em:p econdi ion, em:pos condi ion, P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE em: equency, em:s ep* )> <!ATTLIST em:useCase oid ID #REQUIRED> whe e he em:useCase elemen , as any o he REMObjec , mus ha e a equi ed iden i ica ion a ibu e called oid. Chil- d en elemen s o em:useCase like em: igge ingEe en o em:p econdi ion con ain only ex , i.e. na u al language. In REM, ex can be composed o any combina ion o ee ex , e e ences o o he objec s and TBD (To Be De e mined) ma ks, de ined as ollows: <!ELEMENT em: ex (#PCDATA| em: e | em: bd)*> <!ELEMENT em: e (#PCDATA)> <!ATTLIST em: e oid IDREF #REQUIRED> <!ELEMENT em: bd EMPTY> whe e he em: e elemen mus ha e a equi ed a ibu e called oid ha i is decla ed as an IDREF,i.e. a e e ence o ano he elemen wi h a ma ching iden i ica ion a ibu e alue. The em: bd elemen is decla ed as an EMPTY ele- men , i.e. i is simply a ma k. 4. Using XSLT o equi emen s e i ica ion Simply by he ac o using REM, some quali y p ope - ies desc ibed in [8] like modi iabili y, elec onically s o - age, e sion anno a ion o being aceable a e au oma ically name e sion commen s REMObjec impo ance u gency s a us s abili y C-Requi emen isAbs ac igge ingE en p econdi ion pos condi ion equency UseCase S ep * {o de ed} 0..1 desc ip ion Condi ion * desc ip ion e mina ion Excep ion Ac ion 1..1 1..1 desc ip ion Ac o Ac ion desc ip ion pe o mance Sys emAc ion {disjoin } Ac o UseCaseAc ion * * 1..1 1..1 ... ... {comple e,disjoin } {comple e,disjoin } S akeholde T ace * sou ces * au ho s sou ce 1..1 1..1 a ge Figu e 3. UML model o use cases in REM ul illed. In he ollowing sec ions we desc ibe how o h- e s quali y p ope ies desc ibed in [8] can be au oma ically e i ied, o some heu is ics p o ided, using XSLT when e- qui emen s a e elec onically s o ed in XML o ma acco d- ing o heREM DTD. Al hough i is also possible o apply his app oach o he e i ica ion o concep ual models c ea ed wi h REM,in his pape we ocus only on equi emen s. Fo XML–based con- cep ual model e i ica ion see [13], whe e he xlinki lan- guage and how i is used o he e i ica ion o UML models in XMI o ma [14] a e desc ibed. Fo he sake o eadabili y, all examples in he ollow- ing subsec ions use he em:useCase elemen p e iously desc ibed, al hough hey can also be applied o o he REM objec s. 4.1. Unambigui y A equi emen is unambiguous i and only i has only one possible in e p e a ion [9]. Ob iously, his is a knowl- edge p ope y and canno be au oma ically e i ied, bu we can p o ide some heu is ics abou po en ial ambigui ies in equi emen s in o de o ocus e i ica ion e o on po en- ially ambiguous equi emen s. A simple ye powe ul heu is ic o de ec ing ambigui y (also design dependence, o example) is looking o weak ph ases indica o s (WPI) in equi emen s desc ip ions, i.e. "clauses ha a e ap o cause unce ain y and lea e oom o mul iple in e p e a ions", as desc ibed in [18]. This can be achie ed by de ining WPI in a ex e nal XML ile like his (wpi.xml): <?xml e sion="1.0"?> <wpis> <wpi>easy</wpi> <!-- po en ial ambigui y --> <wpi>e c</wpi> <!-- po en ial ambigui y --> <wpi>no mal</wpi> <!-- po en ial ambigui y --> ... <wpi>click</wpi> <!-- po en ial design dependence --> <wpi>bu on</wpi> <!-- po en ial design dependence --> ... </wpis> and using he ollowing XSLT code: <xsl: o -each selec ="// em:useCase"> <xsl: a iable name="uc" selec ="cu en ()"/> <xsl: o -each selec ="documen (’wpi.xml’)//wpi"> <xsl:i es ="con ains($uc,.)"> Use case <xsl: alue-o selec ="$uc/ em:name"/> con ains WPI <xsl: alue-o selec ="."/>. Please, check i . </xsl:i > </xsl: o -each> </xsl: o -each> P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE in which e e y use case is checked agains e e y WPI in wpi.xml. No ice ha he uc a iable is needed since XSLT does no p o ide any way o accessing mo e han one cu - en node a di e en le els in nes ed xsl: o -each s uc u es. Ano he complemen a y app oach o ambigui y heu is- ics is measu ing how much he cus ome ’s ocabula y is used in equi emen s desc ip ions. We ag ee wi h Lei e [12] in he impo ance o unde s anding he language o he p oblem and in he impo ance o building a glossa y a he beginning o he elici a ion p ocess. Following Lei e, wo p inciples should be ollowed: he p inciple o ci cu- la i y, ( he glossa y mus be as sel –con ained as possible) and he p inciple o minimal ocabula y ( equi emen s de- sc ip ions mus use as many glossa y i ems as possible). Lei e’s p inciples canno gua an ee unambigui y, bu hey help o build mo e unambiguous, unde s andable, consis- en , concise, and c oss– e e enced equi emen s [8], and can be used o measu e he quali y o he glossa y and o de ec po en ially ambiguous equi emen s. In he REM XML model, glossa y i ems elemen s a e mainly composed o em: ex elemen s, so hey can con ain e e ences o o he REM objec s. In his con ex , XSLT can be used o measu e glossa y ci cula i y (GLC) and minimal- i y o ocabula y (MOV). GLC can be measu ed as he a io be ween he numbe o e e ences o glossa y i ems om o he glossa y i ems and he numbe o glossa y i ems, as shown in he ollowing XSLT code: <xsl: a iable name = "GLC" selec = "coun (// em:glossa yI em// em: e [@oid = // em:glossa yI em/@oid]) di coun (// em:glossa yI em)" /> GLC can be used as an indica o o he glossa y qual- i y. GLC alues unde 1 indica e a low quali y glossa y, since ha implies ha he e a e glossa y i ems no e e enc- ing o he glossa y i ems. GLC can also be compu ed o single glossa y i ems. I seems clea ha glossa y i ems no e e encing o he glossa y i ems, o e e encing jus a ew ones (less han 2, o example), should be e i ied o po- en ial p oblems. The ollowing XSLT code can be used o ha pu pose: <xsl: o -each selec ="// em:glossa yI em [coun (.// em: e [@oid=// em:glossa yI em/@oid]) < 2]" > Please, check de ini ion o glossa y i em <xsl: alue-o selec =" em:name"/> </xsl: o -each> MOV can be compu ed, in a simila way o GLC, as he a io be ween he numbe o e e ences o glossa y i ems in equi emen s and he numbe o equi emen s. MOV can be used o pinpoin hose equi emen s ha do no ha e any e e ence, o jus a ew (less han 4, o example), o any glossa y i em in hei ex . Since hose equi emen s a e no using he ocabula y o he cus ome , hey should be checked o po en ial p oblems o ambigui y o unde s and- abili y [8]. The same schema used o de ec ing suspicious glossa y i ems can also be used o de ec ing po en ially am- biguous equi emen s. 4.2. Comple eness A equi emen s documen is comple e i i includes [8]: 1. E e y hing ha he so wa e is supposed o do, i.e. all he equi emen s. 2. Responses o he so wa e o all classes o inpu da a in all ealizable si ua ions. 3. Page numbe s, igu e and able names and e e ences, a glossa y, uni s o measu e and e e enced ma e ial. 4. No sec ions ma ked as TBD. The i s comple eness condi ion mus be checked du ing equi emen s alida ion ac i i y (see igu e 1) and is he e- o e ou o he scope o ou app oach. The second condi ion is a knowledge p ope y e y di - icul o e i y au oma ically, bu some heu is ics can be applied when use cases a e used o exp essing unc ional equi emen s (see sec ion 4.4). The hi d comple eness condi ion is pa ially sa is ied by means o he co ec –by–cons uc ion pa adigm o REM: igu e and able names a e au oma ically gene a ed, e e - ences a e au oma ically inse ed and upda ed, and he use can easily c ea e a glossa y. O ganiza ion, as desc ibed in [8], can also be conside ed as pa o he hi d comple eness condi ion, so XSLT can be used o e i y i equi emen s documen s a e o ganized, i.e. i hey ha e manda o y sec ions in he manda o y o de wi h manda o y con en . Fo example, i we wan o be su e abou he exis ence o a sec ion named Awi h a child sec ion named B, we can apply he ollowing XSLT code: <xsl:i es ="no (// em:sec ion[ em:name=’A’]/ em:sec ion[ em:name=’B’])"> The e is no A/B sec ion o ganiza ion </xsl:i > The ou h condi ion o comple eness can be also e i ied using XSLT. I we wan o know how many TBD ma ks a e in a equi emen s documen we can simply use he XPa h [20] exp ession coun (// em: bd).I wewan obemo ep e- cise and we wan o know, o example, wha use cases ha e TBD ma ks inside hei ex and how many TBD ma ks hey ha e, we can use he ollowing XSLT code: P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE <xsl: o -each selec ="// em:useCase[.// em: bd]"> Use case <xsl: alue-o selec =" em:name"/> has <xsl: alue-o selec ="coun (.// em: bd)"/> TBD ma ks </xsl: o -each> REM au oma ically inse s TBD ma ks in hose equi e- men s no anno a ed wi h ela i e impo ance o s abili y [8], so any o hese p ope ies can be checked using a XSLT code like his: <xsl: o -each selec ="// em:useCase[./ em:impo ance/ em: bd]"> Use case <xsl: alue-o selec =" em:name"/> is no anno a ed wi h ela i e impo ance </xsl: o -each> 4.3. T aceabili y In [8], a equi emen s documen is said o be aceable i and only i i is w i en in a manne ha acili a es he e - e encing o each indi idual equi emen . Since REM au o- ma ically assigns an unique iden i ie o e e y equi emen , his quali y p ope y does no ha e o be e i ied explici ly. Wha i mus be checked is whe he he o igin o e e y equi emen is clea o no , i.e. i equi emen s a e aced in he sense desc ibed in [8]. In he REM model o equi e- men s, any REM objec can be aced o and om o he REM objec s and o hei human sou ces and au ho s (see igu e 3). In he REM DTD, aces a e de ined as elemen s wi h wo equi ed a ibu es o ype IDREF, namely sou ce and a ge : <!ELEMENT em: ace EMPTY> <!ATTLIST em: ace sou ce IDREF #REQUIRED a ge IDREF #REQUIRED > Ha ing said ha , we can use he ollowing XSLT code o lis all use cases wi h no human sou ces: <xsl: o -each selec ="// em:useCase[no ( em:sou ces)]"> Use case <xsl: alue-o selec =" em:name"/> has no de ined sou ces </xsl: o -each> and he ollowing one o de ec all use cases no aced o o he REM objec s: <xsl: o -each selec ="// em:useCase[no (// em: ace/@sou ce= @oid)]" > Use case <xsl: alue-o selec =" em:name"/> is no aced o any objec </xsl: o -each> REM use s can also use aceabili y ma ices o isual e i ica ion o aceabili y (see igu e 4). REM use s can c ea e as many T aceabili yMa ix objec s as hey wish, se- lec ing he classes o REM objec s hey wan o be shown in ows in columns. Figu e 4. REM T aceabili y ma ix example 4.4. Ve i ica ion o use cases Use cases [15] a e a popula o m o exp essing unc- ional equi emen s. REM suppo s bo h classic unc ional equi emen s (i.e. plain ex ) and use cases. Fo he e i ica ion o use cases, we ha e adop ed a me ics–based app oach aking he e i ica ion heu is ics used in he scena io cons uc ion p ocess desc ibed in [11] as a e e ence. Some me ics based on he REM model o use cases a e de ined in able 2. Table 2. REM use case me ics Me ic Desc ip ion NOS Numbe o s eps o he use case NOAS Numbe o ac o ac ion s eps o he use case NOSS Numbe o sys em ac ion s eps o he use case NOUS Numbe o use case ac ion s eps o he use case NOCS Numbe o condi ional s eps NOE Numbe o excep ions o he use case NIE Numbe o imes a use case is included o ex ends o he use cases So, conside ing he ollowing DTD agmen in which he REM XML model o use case s eps is desc ibed: <!ELEMENT em:s ep ( em:numbe , em:condi ion?, ( em:sys emAc ion | em:ac o Ac ion | em:useCaseAc ion ), em:s epExcep ion*, em:commen s )> <!ATTLIST em:s ep oid ID #REQUIRED> heu is ics based on me ics de ined in able 2 can be applied using he ollowing XLST code as a pa e n, whe e me ics alues a e s o ed in auxilia y a iables: <xsl: o -each selec ="// em:useCase"> <xsl: a iable name="NOS" selec ="coun ( em:s ep)"/> P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE <xsl: a iable name="NOAS" selec ="coun ( em:s ep[ em:ac o Ac ion])"/> <xsl: a iable name="NOSS" selec ="coun ( em:s ep[ em:sys emAc ion])"/> <xsl: a iable name="NOUS" selec ="coun ( em:s ep[ em:useCaseAc ion])"/> <xsl: a iable name="NOCS" selec ="coun ( em:s ep[ em:condi ion])"/> <xsl: a iable name="NOE" selec ="coun ( em:s ep/ em:s epExcep ion)"/> <xsl: a iable name="NIE" selec = "coun (// em:useCaseAc ion[@useCase=cu en ()/@oid])"/> <!-- apply e i ica ion heu is ics he e --> </xsl: o -each> The se o e i ica ion–o ien ed, me ics–based heu is- ics o use cases we ha e de eloped is desc ibed below, including hei co esponding XLST code ( ha mus be in- se ed in o he XSLT pa e n). The in e als o usual alues o me ics ha e been aken a e analyzing 414 use cases de- eloped by ou s uden s using REM. 4.4.1. Checking he numbe o s eps Since use cases desc ibe in e ac ions be ween ac o s and he sys em, a use case should ha e a leas 2 s eps o a minimal in e ac ion ac o eques –sys em esponse (o he au ho s like [4] ecommend a alue o NOS in he in e al [3 ; 9] ). Use cases wi h NOS < 2 should be checked o po en ial incomple eness. On he o he hand, a high alue o NOS is an indica o o oo much complexi y o o he lack o s uc- u e (i.e. includes o ex ends ela ionships) in use cases. The XSLT code co esponding o his heu is ic is he ollowing: <xsl:i es ="($NOS < 2) o ($NOS > 9)"> Use case <xsl: alue-o selec =" em:name"/>, has an unusual numbe o s eps. Please, check i . </xsl:i > 4.4.2. Checking he a e o di e en ypes o s eps The h ee ypes o use case s eps in REM, ac o ac ion, sys- em ac ion and use case ac ion s eps, should no appea wi h he same equency. Using he same easoning ha in he p e ious heu is ic, since use cases desc ibe in e ac ions be- ween ac o s and he sys em, app oxima ely hal he s eps o a use case should be ac o ac ion s eps and he o he hal sys em ac ion s eps. On he o he hand, a use case should no ha e mos o i s s eps being inclusions o ex ensions, i.e. a high alue o NOUS is a clea indica o o an abusi e use o use cases ela ionships. Da a om ou s uden s’use cases poin o he ollowing usual alues: NOAS/NOS in [30% ; 70%] , NOSS/NOS in [40% ; 80%] and NOUS/NOS in [0% ; 25%] . As an example, he ollowing XSLT code lis s all use cases wi h a NOAS/NOS alue ou o usual in e al: <xsl:i es ="(($NOAS di $NOS) < 0.3) o (($NOAS di $NOS) > 0.7)"> Use case <xsl: alue-o selec =" em:name"/> has an unusual a io o ac o s eps. Please check i . </xsl:i > 4.4.3. Checking he numbe o excep ions One o he comple eness condi ions enume a ed in sec ion 4.2 is ha a equi emen s documen mus include esponses o he so wa e o all classes o inpu da a in all ealizable si ua ions. In he REM model o use cases, sys em beha io in abno mal si ua ions is desc ibed as excep ions associa ed o use case s eps. So, i a use case has no excep ions o jus a ew when compa ed o he numbe o s eps, i is p oba- bly because only he o dina y sequence o s eps has been de ined. Thus, his use case should be checked o com- ple eness. On he con a y, a use case wi h mos o i s s eps ha ing associa ed excep ions is p obably oo complex o be unde s ood. Da a om ou s uden s’poin o usual alues o NOE/NOS in he in e al [5% ; 45%] , so he XSLT code co - esponding o his heu is ic is he ollowing: <xsl:i es ="(($NOE di $NOS) < 0.05) o (($NOE di $NOS) > 0.45)"> Use case <xsl: alue-o selec =" em:name"/> has an unusual a io o excep ions. Please check i . </xsl:i > 4.4.4. Checking cycloma ic complexi y In he same way a use case wi h a high NOE/NOS a e is p obably oo complex o be unde s ood, a use case wi h many condi ional s eps is also di icul o unde s and. De- spi e o he ac ha use cases a e e y di e en om sou ce code, he heu is ic o keeping cycloma ic complexi y (CC) low can also be applied o use cases. Cycloma ic complex- i y o use cases in REM can be compu ed as he numbe o decision poin s + 1, i.e. he numbe o condi ional s eps + he numbe o excep ions + 1. The ollowing XSLT checks cycloma ic complexi y al- ues o use cases, in which we ha e aken [1 ; 4] as he usual in e al o CC as sugges ed by ou s uden s’use cases: <xsl: a iable name="CC" selec ="$NOCS+$NOE+1"/> <xsl:i es ="$CC > 4"> Use case <xsl: alue-o selec =" em:name"/> has a unusual alue o cycloma ic complexi y. Please, check i . </xsl:i > 4.4.5. Checking abs ac use cases Abs ac use cases a e hose use cases ha can only be pe - o med om o he use cases and he e o e canno be ig- P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE ge ed by any e en . The usual mo i a ion o he c ea ion o abs ac use cases is a oiding he epe i ion o common sequences o s eps in o he use cases. I an abs ac use case is nei he included om o he use cases no i ex ends o he use cases is clea ly useless and should be dele ed om he speci ica ion. I i is used o only one use case, i should be me ged in o he calling use case. The XSLT code co e- sponding o his heu is ic is he ollowing: <xsl:i es =" em:isAbs ac and $NIE < 2"> Abs ac use case <xsl: alue-o selec =" em:name"/> is ha dly used. Please, check i . </xsl:i > 4.4.6. Checking ac o pa icipa ion Ano he e i ica ion heu is ic included in [11] is checking i e e y ac o pa icipa e in a leas one use case. All s ep ac ion elemen s in he REM DTD ha e an ac o a ibu e o ype IDREF, so he ollowing XSLT code can be used o checking i an ac o pa icipa es a leas in one use case: <xsl: o -each selec ="// em:ac o [no (// em:ac o Ac ion/@ac o = @oid)]"> Ac o <xsl: alue-o selec =" em:name"/> does no pa icipa e in any use case. Please, check i . </xsl: o -each> 5. Rela ed wo k Some o he esul s o he ESPRIT p ojec CREWS, es- pecially s yle and con en guidelines o ex ual speci ica- ion o use cases [17] ha e in luenced ou wo k. Thei ap- p oach, implemen ed in he CREWS-SAVRE and L’Ec i oi e ools, combines na u al language p ocessing (NLP) ech- niques and linguis ic pa e ns, guiding he cons uc ion o use cases and p o iding ambigui y de ec ion mechanisms which a e much mo e powe ul han ou s. We use linguis ic pa e ns ex ensi ely [6] and ou UML model o equi emen s is pa ially based on CREWS esul s, bu we ha e no adop ed an NLP–based app oach o e i i- ca ion because one o ou goals was o le REM use s w i e hei own e i ica ion p og ams (i.e. XSLT s yleshee s). Us- inganNLP–based e i ica ion app oach would ha e made his goal e y di icul o sa is y because o hei complexi y. We a e cu en ly conduc ing expe imen s wi h ou s uden s in o de o know i ou simple app oach yields compa able esul s o he ones desc ibed in [2]. The Au oma ed Requi emen Measu emen (ARM) ool [18], is a simple ye powe ul, no NLP–based equi emen s e i ica ion ool ha scans equi emen s documen s o spe- ci ic wo ds and ph ases ha a e conside ed indica o s o he quali y o equi emen s. As shown in sec ion 4.1, REM can pe o m he same ype o analysis using XSLT and apply a wide se o e i ica ion–o ien ed heu is ics. Schema on [10] is an XML–based language o speci- ying asse ions on XPa h exp essions in XML documen s. A Schema on documen mus be ans o med in o a XSLT s yleshee using he Schema on XSLT s yleshee and hen applying he esul ing s yleshee o he XML documen being analyzed. Ou app oach and Schema on elies on XPa h exp essions, bu ou s needs only one XSLT ans o - ma ion and p o ides g ea e lexibili y o p esen ing esul s o use s and o compu ing equi emen s–o ien ed me ics. The xlinki language [13] is an XML–based language o speci ying consis ency ules be ween XML documen s us- ing a es ic ed se o i s o de logic and XPa h exp es- sions. Mos XSLT e i ica ion code p esen ed in his pape can be exp essed in xlinki . Fo example he XSLT code in sec ion 4.3 o de ec ing use cases no aced o o he REM objec s can be ansla ed in o he ollowing xlinki code, which iden i ies all use cases no aced o any objec as in- consis en links: <globalse id="$useCases" xpa h="// em:useCase"/> <globalse id="$ aces" xpa h="// em: ace"/> <consis ency ule id="beT aced"> <desc ip ion> E e y use case mus be aced o some objec , i.e. mus be he sou ce o some ace </desc ip ion> < o all a ="uc" in="$useCases"> <exis s a =" " in="$ aces"> <equal op1="$uc/@oid" op2="$ /@sou ce"/> </exis s> </ o all> </consis ency ule> T ansla ing o he XSLT agmen s in o xlinki equi es he use o he XPa h unc ion ue (xlinki only allows equali y and inequali y exp essions on XPa h exp essions as p edica es), and he expansion o a iable exp essions (xlinki does no allow he decla a ion o local a iables in- side o all o exis s elemen s). Fo example, he xlinki code co esponding o he Checking he numbe o s eps heu is ic is he ollowing: <globalse id="$useCases" xpa h="// em:useCase"/> <consis ency ule id="checkingNOS"> <desc ip ion> E e y use case should ha e 2<=NOS<=9 </desc ip ion> < o all a ="uc" in="$useCases"> <equal op1="(coun ($uc/ em:s ep) >= 2) and (coun ($uc/ em:s ep) <= 9)" op2=" ue()" /> </ o all> </consis ency ule> P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE REM e i ica ion s yleshee s mus be XSLT in o de o be p ocessed by he REM use in e ace and hey mus be as e icien as possible o as isual eedback o he use . xlinki ules mus be p ocessed by a Ja a p og am so ha makes i incompa ible wi h REM. On he o he hand, xlinki p esen s esul s as xlinks, some hing ha is no cu en ly suppo ed by mos web b owse s. DOORS, a comme cial RE ool wi h much mo e ea u es han REM, includes a C++–like sc ip ing language called DXL [1]. Using DXL, i is possible o implemen some o he heu is ics desc ibed in his pape , bu he DOORS use mus de ine all necessa y a ibu es and ypes o objec s o ha e a equi emen s model simila o ou s in DOORS. Apa om he ac ha ou app oach is based on s anda d lan- guages and no in a p op ie a y one like DXL, he e sa il- i y o e ed by XML and XSLT ( o epo gene a ion, o example) is a om he o e ed by DXL (unless XML is gene a ed om DXL). 6. Conclusions and u u e wo k In his pape we ha e p esen ed an au oma ed, ligh – weigh , XSLT–based app oach o he e i ica ion o e- qui emen s which is in eg a ed in he REM RE ool. Ou ap- p oach is based on a open echnology like XML and o e s all he lexibili y o XSLT. In ac , i equi emen s a e ep e- sen ed in XML no using he REM DTD, many o he XSLT– based e i ica ion–o ien ed heu is ics p esen ed in his pa- pe should be easily adap able. Ou u u e wo k is ocused on iden i ying accu a e in- e al alues o hose me ics–based e i ica ion heu is ics (glossa y–based and use case heu is ics mainly). We a e cu en ly conduc ing an expe imen wi h ou s uden s a he Uni e si y o Se ille wi h wo main goals in mind. The i s goal is de e mining in e al alues by applying da a mining echniques o ou s uden s’RE p ojec s, hus iden- i ying co ela ions be ween de ec s and me ic alues. The second goal is o know whe he ou app oach imp o es e- qui emen s e i ica ion o no , i.e. i mo e de ec s in e- qui emen s a e de ec ed when equi emen s e i ica ion is suppo ed by ou XSLT–based heu is ics. O he lines o u u e wo k a e he de eloping o XSLT s yleshee s o compu ing use case poin s [19] and o g aphical isualiza ion o e i ica ion–o ien ed me ics in web b owse s. Acknowledgmen s We wish o hank Julio Lei e o his commen s and sug- ges ions on an ea ly e sion o his pape . Re e ences [1] I. Alexande . Ge ing S a ed wi h DXL, he DOORS eX en- sion Language. Technical epo , Telelogic Inno a e, 2001. [2] C. Ben Achou , C. Rolland, N. A. M. Maiden, and C. Sou- eye . Guiding Use Case Au ho ing: Resul s o an Empi ical S udy. In ISRE’99 P oceedings, 1999. [3] G. Booch, J. Rumbaugh, and I. Jacobson. The Uni ied Mod- eling Language Use Guide. Addison–Wesley, 1999. [4] A. Cockbu n. W i ing E ec i e Use Cases. Addison– Wesley, 2001. [5] A. Du án. A Me hodological F amewo k o Requi emen s Enginee ing o In o ma ion Sys ems (in Spanish).PhD he- sis, Uni e si y o Se ille, 2000. [6] A. Du án, B. Be ná dez, A. Ruiz, and M. To o. A Requi e- men s Elici a ion App oach Based in Templa es and Pa - e ns. In WER’99 P oceedings, Buenos Ai es, 1999. [7] A. Du án, A. Ruiz, B. Be ná dez, and M. To o. Ve i ying So wa e Requi emen s wi h XSLT. ACM So wa e Engi- nee ing No es, 27(1), 2002. [8] A. Da is e al. Iden i ying and Measu ing Quali y in a So - wa e Requi emen s Speci ica ion. In P oceedings o he 1s In e na ional So wa e Me ics Symposium, pages 141–152, 1993. [9] IEEE. Recommended P ac ice o So wa e Requi emen s Speci ica ions. IEEE/ANSI S anda d 830–1998. [10] R. Jelli e. The Schema on Asse ion Language 1.5. Tech- nical epo , Academia Sinica Compu ing Cen e, 2001. [11] J. C. S. P. Lei e, H. Hadad, J. Doo n, and G. Kaplan. A Scena io Cons uc ion P ocess. Requi emen s Enginee ing Jou nal, 5(1), 2000. [12] J. C. S. P. Lei e, G. Rossi, F. Balague , V. Maio ana, G. Ka- plan, G. Hadad, and A. Oli e os. Enhancing a Requi e- men s Baseline wi h Scena ios. In P oceedings o he 3 d IEEE In e na ional Symposium on Requi emen s Enginee - ing (RE’97), 1997. [13] C. Nen wich, W. Emme ich, and A. Finkesl ein. S a ic con- sis ency checking o dis ibu ed speci ica ions. In P oceed- ings o Au oma ed So wa e Enginee ing, 2001. [14] OMG. XML Me ada a In e change (XMI) Speci ica ion 1.1. Technical epo , No embe 2000. [15] OMG. Uni ied Modeling Language, 1.4. Technical epo , Sep embe 2001. [16] S. Robe son and J. Robe son. Mas e ing he Requi emen P ocess. Addison–Wesley, 1999. [17] C. Rolland and C. B. Achou . Guiding he Cons uc ion o Tex ual Use Case Speci ica ions. Da a & Knowledge Engi- nee ing Jou nal, 25(1–2), 1998. [18] L. Rosenbe g, T. F. Hamme , and L. L. Hu man. Requi e- men s, Tes ing and Me ics. In 15 h Annual Paci icNo h- wes So wa e Quali y Con e ence, U ah, 1998. [19] G. Schneide and J. P. Win e s. Applying Use Cases: a P ac- ical Guide. Addison–Wesley, 1998. [20] W3C. XML Pa h Language (XPa h) 1.0. W3C Recommen- da ion, No embe 1999. [21] W3C. XSL T ans o ma ions (XSLT) 1.0. W3C Recommen- da ion, No embe 1999. [22] W3C. Ex ensible Ma kup Language (XML) 1.0 (Second Edi ion). W3C Recommenda ion, Oc obe 2000. P oceedings o he IEEE Join In e na ional Con e ence on Requi emen s Enginee ing (RE’02) 1090-705X/02 $17.00 © 2002 IEEE