-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define Requirements Identifier Format #437
Comments
There were some ideas here |
Ok, I will first give it a try right here in the issue since this is still work in progress. Hence, I invite you to comment on anything that seems weird to you. Sorry for so much text... Update, Oct 17, 2014: Added formal specification of the tracestring and amended example section to reflect the new spec. Note 1: In the following I will use the term "requirement" for anything that will become traceable. You may substitute "element" if that name is more convenient for you. Note 2: Everything in [square brackets] is not yet implemented. Goal:Generate a hierarchical tree of all traceworthy artifacts in each chapter of subset-026. Each artifact shall be uniquely addressable via a tracestring. Rules for computing a tracestring:
I hope not to have forgotten anything essential... Scheme of the tracestring:
Formal Specification:Note: This covers the current implementation. I.e. everything described above which was not wrapped in square brackets. Below is a possible version of a lexer + parser written in ANTLRv4. lexer grammar tracestringLexer;
// generic tokens
Delimiter : '.';
EOL : [\r\n]+ -> skip;
// List tokens in DEFAULT_MODE
fragment NoNumber : '*';
fragment Number : [1-9] | NumberGe10 ;
fragment NumberNot1 : [2-9] | NumberGe10 ;
fragment NumberGe10 : [1-9][0-9]+;
fragment LowerCaseCharacter : [a-z];
fragment Character : [A-Z] | LowerCaseCharacter;
fragment AlphaNumCharacter : (Character | Number);
fragment BracketedNumber : '[' Number ']';
String : AlphaNumCharacter+;
BulletedListID : '[*]' BracketedNumber;
ParagraphID : '[' NumberNot1 ']';
Table : '[t]' TableTraceString;
Figure : '[f]' FigureTraceString;
fragment FloatingEntityNumber : Number LowerCaseCharacter?;
fragment Caption : 'C';
mode TableMode;
TableTraceString : TableID InnerTable?;
fragment TableID : (FloatingEntityNumber | NoNumber);
fragment InnerTable : Delimiter (
RowID (Delimiter (ColumnID | String))?
| ConditionID
| Caption
);
fragment RowID : '[r]' BracketedNumber;
fragment ColumnID : '[c]' BracketedNumber;
fragment ConditionID : '[C]' BracketedNumber;
mode FigureMode;
FigureTraceString : FigureID InnerFigure?;
fragment FigureID : FloatingEntityNumber;
fragment InnerFigure : Delimiter Caption; parser grammar tracestringParser;
options { tokenVocab=tracestringLexer; }
entireString : baseList (Delimiter subList)* (Delimiter floatingEntity)?;
baseList : baseListID (Delimiter baseListID)* paragraphID?;
subList : subListID (Delimiter subListID)* paragraphID?;
baseListID : String;
subListID : String | BulletedListID;
paragraphID : ParagraphID;
floatingEntity : table | figure;
table : Table;
figure : Figure; Example parse tree:Input: Real world examples from subset-026:Note 1: The numberTexts in the following screenshots do not correspond to the original numberTexts in subset-026. The correct reference is given in the headings. Note 2: Prefixes present in the numberTexts may sometimes be omitted because the corresponding levels are missing in the shown excerpts (see Rule 7 of the section on how to compute a tracestring for why this is). Example 1: §3.8.5.3.2
Example 2: §3.19
Example 3: Appendix of chapter 3
Open Issues:
|
@morido - thanks for taking the time for this. Looks great. I have just a few comments:
|
I do not think I need this. Currently I do the following: Create one "fake parent" requirement (the "table requirement") which has all rows (again "fake requirements") as its leaves. Those rows then give shelter to all columns (actual requirements). The "DOORS-Table" approach, on the other hand, just shows you a table and all the actual requirements are right in there. From my perspective my current implementation better suits our special needs. Mainly because:
See the example below (which corresponds to the same table shown in example 3 of my original posting). It shows non-traced cells (the header-row; item 3 above), and the blue boxes (item 4).
As I have already told you orally I currently only export the preview information of all the OLE-data. For the subset-026 that usually means we end up with either
Since I create the requirement tree on-the-fly while parsing the input document, the current way of handling this is simply to throw an exception (see example below) if a requirement with an unambiguous identifier is about to be added to the tree (basically there is some simple class backed by a HashMap which does a lookup on existing entries every time a requirement is inserted). Quick example which would currently make the tool throw the exception:
|
One more thing regarding 2. Inclusion of objects that are external to the exchange XML document in the requirements authoring tool in the ReqIF standard: How am I supposed to store captions in there? I guess not in the "alternative text"? Currently I simply export an image / table and attach a |
Regarding tables and objects - I am perfectly fine the way you're handling this, I just wanted to document that this is in the standard. Regarding collisions: aborting is in my opinion the right choice. With regard to captions: the standard does not provide any recommendation for this. As embedded objects/images are just XHTML, you can surround it with further XHTML to add the caption - of course this will result in a human-readable, not a machine-readable caption. Your approach makes sense, from my point of view. |
@morido
|
Hi Uwe,
Would you be ok with adding those delimiters somewhere further downstream in the toolchain?
I believe that is infeasible. The current implementation of the tracestring generation relies only on that single document you throw at it. Hence, it does not have any historical data. Revisioning should rather be handled further downstream inside ProR (i.e. by using a diff between two reqif files). Also I would urge the ERA to keep their numbering consistent at least across minor-releases of their documents.
Do you have any proposals? Otherwise I would weigh absence of ambiguity over clarity. I suppose in average conversations you rarely talk about the second paragraph of the third bullet item inside "1.2.3", do you? At most you might mention "1.2.3" - and that's a rather simple identifier which will also be known by my tool (it's just way broader than a specific paragraph).
Of course they will be. I just do not plan to expose any API to directly communicate with my tool but would rather point you at the resulting reqif from which you may then grab whatever you need. |
@morido Please provide a short documentation on the requirements ID's definition in the documentation wiki here https://github.com/openETCS/toolchain/wiki/User-Documentation#TODO_Requirements_naming |
@jastram @cecilebraun Do you want me to duplicate information? Each one of you proposed different documents where my requirement ID definition should be included. For the time being I just propose it here (feel free to copy it to the final destination if there are no further comments): Very short definition of requirement IDsNote: This only covers the case of paragraphs which are part of a list. If you need to trace other artifacts (which are always children of such list paragraphs) please look into the detailed explanation in #437. Guideline:
Howto:Suppose we want to trace the fifth paragraph in the above example i.e
This will result in the following requirement ID:
|
@morido - definitely no duplicates! Please use @cecilebraun's location. |
@morido: |
Hi Uwe,
I suppose you are referring to the revisioning issue. Short answer: This is outside of the scope of my tool, therefore I do not care. All I do is to convert one Long answer: ProR Essentials includes ReqIF Diff. This could be the way to go if you want to compute the delta between different baselines of the subset026. DOORS (or other |
@morido - Please document what the format will be here:
https://github.com/openETCS/toolchain/wiki/Process-Documentation
This is needed for @UweSteinkeFromSiemens
The text was updated successfully, but these errors were encountered: