480 likes | 590 Vues
This system generates traceability relations between requirements and object models using rule-based algorithms. It categorizes relations into types such as overlap, requires executions of, requires feature in, and can partially realize. The rules involve syntactic analysis relationships between different elements and stages of processing to establish connections.
E N D
Rule-based generation of requirements traceability relations
Trace Rules • Requirement-to-object model -> (REQ or UCD) <-> Object Model • Inter-requirement rules -> REQ <-> UCD
Traceability Types • Satisfiability • Dependency • Evolution • Rationalisation.
RTOM rules • 利用RSD上句法(syntactically)的上的分析跟Object Model上特定fields 的關係,如class, attribute, operations 產生關係。
IREQ Rules • Between Requirements • Between USD events. • Between Requirement and USD • 特點是要有trace to AOM才會產生IREQ trace.
Use case consist of • A unique identifier • A title • Characteristic information (description, pre-conditions and post-conditions) • A flow of normal events • Exceptional events.
Four stages to proceed • Grammatical tagging • XML conversion • Generate RTOM relations • Generate IREQ relations
Four types of relations • Overlap • Requires_Executions_Of • Requires_Feature_In • Can_Partially_Realise
Overlap Relation • An overlap relation 重疊 denotes that the connected elements refer to a common feature of the underlying system or its domain. • 一個common的功能 • 例: Treble levels
Overlap relation 產生在 • A sequence of terms in ( requirement state, part of a use case, class attribute, class association, class association end) • A sequence of terms in a requirement statement and part of use case.
Requires_Execution_of • “Sequence of terms” or a part of use case 與 Operation in AOM.
Requires_Feature_In • Between UCD and Requirement • Between 2 Requirements
Can_Partially_Realise • Between (description, event and post-condition in UCD) and Requirements
CLAWS complete tagset (C5, C7) • http://www.comp.lancs.ac.uk/ucrel/bnc2/bnc2guide.htm - tagset (C5) • http://www.comp.lancs.ac.uk/ucrel/claws7tags.html (C7)
Sample of Prediction • Where P is defined as • ATTRIBUTE_OF(Id1, Id2) • Id1 is an attribute, and Id2 is a class. • Id1 is an attribute of Id2 or inherited by Id2
Sample of Functions • Name(Id1):String • Take UML model element identifier and return the name of the model element.
Function Listing • Name(Id1): String • Concat (String1, String2 ): String3 • Synonym(String1) : Set of < String> • Singular_Form(String1) : String2 • Stereotype(Id1) : Set of <String>
Rule 1 • Establish a overlap relation. • NN1 – singular common noun • JJ - general adjective • NP1 - singular proper noun (e.g. London, Jane, Frederick) • NN2 - plural locative noun (e.g. Islands, Streets)
Rule 1 define • The qualified noun (x1, x2, x3) 強調這feature可能被model 成一個attribute. • X1強調這組名詞的owner, 所以可能被model 成 class. • X2 是附加的特徵,強調owner或feature,所以有可能加在class name 或是attribute 內。
Rule 2 • VVI – infinitive 原形動詞 • AT - article (e.g. the, no) 冠詞 • CC - coordinating conjunction (e.g. and, or)
Rule 2 • Match 一個主動作 <x1/{VVI}:1> 跟一個物件,這個動作要出現在OM的Class Operation中。
Rule 2 matched by.. • 動詞在operation內。(MEMBER_OF(<x1>, SNYNONYMS(STEREOTYPE(<X9>))) • 第一名詞<x3>存在於class name之中. • 單數名詞存在於operation中
Rule 3 • <x1> and <x5> 同時存在於Class Name之中
Rule 4 • VBZ - is
Rule 4 can • Create rule between precondition of a use case and an operation in an OM. • <x3> is the name, <x1> is qualifier • CONTAINS(NAME(<x6>, <x3>) • CONTAINS(NAME(<x5>, <x1>) • EQUAL_TO(STEREOTYPE(<x6>, “get”))
Rule 4 based on • 在pre-condition內,一個名詞 is (to be) ….. 表示一種條件,這種條件強調這個名詞(功能)的值。 • 因此在OM內,基於封裝的基礎,應該有<<get>>這種 operation 得到這名詞的值。
Rule 5 • VVN - past participle of lexical verb (e.g. given, worked)
Rule 5 can • Match an expression in post-condition and and an operation in OM. • <x3> 通常被<x5>所描述
Rule 5 matched if • The name operation contain the noun or the qualifier. CONTAINS(NAME(<x6>, <x3>)) and CONTAINS(NAME(<x6>, <x1>)) • 動詞跟operation的stereo type的同義詞符合 - MEMBER_OF(<x5>, SYNONYMS(STEREOTYPE(<x6>)))
IREQ Rules • Generate overlap, requires_feature_in or can_partially_realise relations. • IREQ rules based on 之前產生的relation 才再產生 relation
Rule 6 • RSD id 72 has require_execution_of… • UCD AF2 also has require_execution_of… • So generate a USD Can_Partially_Realise relation with RSD.
Rule 7 • Generate require_feature_in relation between requirements.
Rule 7 matched if • One of the requirement linked with <x2> , which is a association end of a class <x1> by an overlap relation. • Other requirement is linked with operation <x3> defined in class <x1> by require_execution_of relation. • The name of operation includes the name of the association end.
Rule 7 based on • 如果一個operation 對其中一個 association end name 有動作。 • 這個requirement require_execution_of 也須要另一個association end的存在。