rule-based generation of requirements traceability relations
Post on 30-Dec-2015
20 Views
Preview:
DESCRIPTION
TRANSCRIPT
Trace Rules
• Requirement-to-object model -> (REQ or UCD) <-> Object Model
• Inter-requirement rules -> REQ <-> UCD
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.
CLAWS tags set samples
VVZ The -s form of lexical verbs (e.g. forgets, sends, lives, returns)
NN0 Common noun, neutral for number (e.g. aircraft, data, committee)
NN1 Singular common noun (e.g. pencil, goose, time, revelation)
NN2 Plural common noun (e.g. pencils, geese, times, revelations)
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 matched by..
• 動詞在 operation 內。 (MEMBER_OF(<x1>, SNYNONYMS(STEREOTYPE(<X9>)))
• 第一名詞 <x3> 存在於 class name 之中 .
• 單數名詞存在於 operation 中
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 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 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 的存在。
top related