27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Once all fo rk and decision nodes have been created, the<br />

details of incoming edges and flow types can be used for the<br />

insertion of a join or merge node. The algorithm of tree<br />

traversal is used to determine the type and level of flows where<br />

the root node is INITIAL object node. Abstract State Machines<br />

or ASM [14] is used to describe the algorithm as follows:<br />

TraverseTree(node, flow) =<br />

let f = new(Flow) in<br />

info:= flow.info<br />

if IsJoinNode(node) or IsMergeNode(node) then<br />

f.info:= CalculateFlow(node)<br />

else<br />

if IsInitialNode(node) then<br />

f.info:= f.info + "N"<br />

if IsForkNode(node) then<br />

f.info:= f.info + "F"<br />

if IsDecisionNode(node) then<br />

f.info:= f.info + "D"<br />

let c = true<br />

if count(node.incomingEdges) > 1<br />

and IsJoinNode(node) = false<br />

and IsMergeNode(node) = false then<br />

forall e in node.incomingEdges do<br />

if IsNull(e.flow) then c:= false<br />

if c = true then<br />

TraverseTree(CreateJoinMerge(node), f)<br />

else<br />

forall e in node.outgoingEdges do<br />

e.flow:= f<br />

TraverseTree(e.target,f)<br />

To reduce complexity when inserting join and merge nodes,<br />

it is suggested that the flows with the deepest level and the<br />

same type should be determined first. Fig. 11 shows the result<br />

of the insertion of two merge nodes into Fig. 10b.<br />

ND 1D 2D 3 ND 1D 2D 3 ND 1D 2D 4<br />

ND 1D 2<br />

[known problem<br />

and solution]<br />

C<br />

[else]<br />

ND 1D 2D 3 ND 1D 2<br />

[known problem<br />

and solution]<br />

Audit and Record<br />

ND 1D 2D 3 ND 1D 2D 4<br />

C<br />

Communicate Result<br />

[else]<br />

Figure 11. Example of mapping merge pattern<br />

[problem statement<br />

rectified]<br />

[problem statement<br />

rectified]<br />

ND 1D 2D 3 ND 1D 2D 3 ND 1D 2D 4<br />

ND 1D 2<br />

Audit and Record<br />

ND 1D 2<br />

ND 1<br />

ND 1J 1 ND 1J 1<br />

Communicate Result<br />

VI. CONCLUSION<br />

The design of ADL, a domain specific language for UML<br />

activity diagrams presented in this paper, covers four elements<br />

required to co nstitute a DSL: structure, constraints,<br />

representation, and behavior. The ADL metamodel illustrates<br />

the language structure. Constraints can be defined as validation<br />

and verification rules described in [13], serving the purposes of<br />

preventing data inconsistency, and fortifying conformance to<br />

UML specification, respectively. Representation can be<br />

visualized with a digraph. Behavior is accomplished by means<br />

of QVT applied for model-to-model transformation.<br />

Process algebra and metamodel-based technology are<br />

applied to develop the language, which is unambiguous and has<br />

a sufficiently high-level abstraction to describe general activity<br />

diagrams. Compared to previous research an d existing tools<br />

mentioned earlier, the proposed approach could reduce the<br />

complexity of scripts, and source lines of code. Compared to<br />

manual method, the proposed method could reduce resource<br />

consumption, in addition to prevent modeling mistakes and<br />

incorrect notation usages.<br />

The trouble ticket scenario is selec ted as an example to<br />

demonstrate how to transform the underlying ADL script to the<br />

semantic model with control nodes that can be further<br />

processed to visualize the target activity diagram, eventually.<br />

The method presented in this paper is capable of generating<br />

intermediate activity diagrams. Future research work could be<br />

the enhancement of the method to sup port structural activity<br />

diagrams which can describe interruptible regions, events, and<br />

features related to the programming languages.<br />

REFERENCES<br />

[1] D. Flater, P. A. Martin, and M. L. Crane, Rendering UML Ac tivity<br />

Diagrams as Human-Readable Text, National <strong>Institute</strong> of Standards and<br />

Technology, 2007.<br />

[2] PlantUML, http://plantuml.sourceforge.net, January <strong>2012</strong>.<br />

[3] yUML, http://yuml.me, Febuary <strong>2012</strong>.<br />

[4] OMG, Unified Modeling Language TM (OMG UML): Superstructure<br />

Version 2.3, Object Management Group, Inc., 2010.<br />

[5] D. Ghosh, DSLs in Action, Manning Publications Co., 2011.<br />

[6] A. Prinz, M. Scheidgen, and M. S. Tveit, “A Model-Based Standard for<br />

SDL”, Springer-Verlag Heidelberg, SDL 2007, LNCS 4745, p p. 1-18,<br />

2007.<br />

[7] T. Gjøsaeter, I. F. Isfeldt, and A. Prinz, “Sudoku – A Language<br />

Description Case Study”, Springer-Verlag Berlin Heidelberg, SLE 2008,<br />

LNCS 5452, pp. 305-321, 2009.<br />

[8] OMG, Meta Object Facility (MOF) Core Specification Version 2.0,<br />

Object Management Group, Inc., 2006.<br />

[9] D. Grune and C. Jacobs, Parsing Techniques: A Practical Guide, 2nd ed,<br />

Springer, 2008.<br />

[10] J. C. M Baet en, T. Basten, and M. A. Reniers , Process Algebra:<br />

Equational Theories of Commnicating Processes, Cambridge University<br />

Press, 2010.<br />

[11] OMG, Meta Object Facility (MOF) 2.0 Query/View/Transformation<br />

Specification Version 1.1, Object Management Group, Inc., 2011.<br />

[12] J. Bang-Jensen and G. Gutin, Di graphs: Theory, Algorithms and<br />

Applications, Springer-Verlag, 2007.<br />

[13] C. Narkngam and Y. Limpiyakorn, “Domain Specific Language for<br />

Activity Diagram”, in R amkhamhaeng Journal of Engineering, vol. I,<br />

<strong>2012</strong>.<br />

[14] E. Börger and R. Stärk, Abstract State Machines: A Method for High -<br />

Level System Design and Analysis, Springer-Verlag Heidelberg, 2003.<br />

729

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

Saved successfully!

Ooh no, something went wrong!