13.07.2015 Views

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IADIS International Conference <strong>WWW</strong>/<strong>Internet</strong> 2010• Scenario: which is a use case realization and comprises of an order sequence of finite events, whichmay trigger episodes. In our model, we make no distinction between the Scenario and Use Case as in thesource code the use case is already realized.• Context: which defines use case preconditions and post conditions. In our model the context wasconnected to the System Service and the Use Case Context is the union of all System Service's Contexts;• Episode, which represents a part of the use case behavior and can be a primitive episode orcomposite episode that contains other episodes.The event level is represented by events and as the only distinction to an episode is that it takes noduration, we decided to leave it out of the model for simplicity purposes. The diagram in figure 1 representsthe resulting model.Figure 1. Use case meta-model4. ANNOTATIONSA source-code has a very low-level of abstraction, which makes it hard to read high-level information. In ourproposal to use source-code to <strong>do</strong>cument requirements, which we are actually <strong>do</strong>ing is requestingprogrammers to <strong>do</strong>cument and instrument their code with which part of a requirement they are implementing.To make that requirement readable, it is very important that it must be easily extracted from the sourcecode, generating a higher-level model. Such need made annotations the ideal choice for such idea.Annotations allow indicating whether your methods are dependent on other methods, whether they areincomplete, whether classes have references to other classes creating a higher-level view of the source-code.Annotations were introduced in the JAVA platform with the release of version 5 (Taylor, 2008).Annotations are like meta-tags that you can add to the source code and applied to package declarations, typedeclarations, constructors, methods, fields, parameters, and variables. Annotations provide data about aprogram that is not part of the program itself. They have no direct effect on the operation of the code theyannotate (Ernst, 2010). Annotations can be used giving information in 3 distinct levels (Ernst, 2010):• Compiler — to detect errors or suppress warnings;• Compiler-time and deployment-time processing - where tools can process annotation information togenerate code, XML files, etc;• Runtime processing — to be examined at runtime.The annotations we defined in this work are compiler time annotations since they are used to generaterequirements <strong>do</strong>cumentation from source-code. In order to make this possible each annotation that representsan entity in our use case meta-model should be mapped to the existing software architecture.An annotation type can be defined using an “@” sign, followed by the interface keyword plus theannotation name and a data structure can be defined for the annotation. This data structure, however, isrestricted to primitives, String, Class, enums, annotations, and arrays of the preceding types (Ernst, 2010).Even though, a Use Case could be defined as a complex type attribute of the SystemService type, since theUse Case is not represented by a single fragment, all its attributes must be repeated in all services, creatinganother maintenance problem. To deal with this problem, we made a few changes to the model described inthe section III bringing Use Case attributes to the SystemService. The final annotations were defined asfollows:289

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!