90 likes | 281 Views
BT Trace Animation. Ferdiansyah Dolot ( ferdi_dolot@acm.org / ferdi.dolot@gmail.com ) Depok, April 7 th 2011 FMSE (Formal Method in Software Engineering) Lab Faculty of Computer Science Universitas Indonesia. TextBE Overview [1]. Developed by Toby Myers, Griffith University
E N D
BT Trace Animation Ferdiansyah Dolot Ferdiansyah Dolot (ferdi_dolot@acm.org / ferdi.dolot@gmail.com ) Depok, April 7th2011 FMSE (Formal Method in Software Engineering) Lab Faculty of Computer Science Universitas Indonesia
TextBE Overview [1] • Developed by Toby Myers, Griffith University • Eclipse Plugin Development based • Provides Textual Representation for defining Behavior Engineering Model • Integrated View of Behavior Tree (BT) as one view of Behavior Modeling Language has been implemented in TextBE [2] • Converts the textual representation into graphical visualisation • Save the graphical visualisation into several file formats ( .svg, .jpg, .pdf ) Ferdiansyah Dolot
Existing Condition • Result of graphical visualisation is static • Difficult to study about semantics • Does not support any animating visualisation in Batik SVG Plugin • Animated SVG file has been developed and can be viewed in certain web browser : works in Mozilla Firefox (Myers PhD Thesis) [3] • With Animated SVG file, we can study about Behavior Tree Semantics Ferdiansyah Dolot
1. Animating BT Trace[4] • The SVG file that can animate the BT diagram currently only works in certain browser (works in Mozilla Firefox) [2] • BE Visualiser make use of Batik Java SVG Toolkit and the animated SVG example in previous slide currently doesn’t work in Batik Java SVG Toolkit • BT Traces can be animated by adding ECMAScript language in SVG file generated by BE Visualiser (Batik SVG support ECMAScript) • Perform Debugging using SVG Eclipse Plugin Ferdiansyah Dolot
2. BT Trace Notation[4] • Create a file (.bttrace) to textually describe the BT Trace • The file has a link to .bt file that will be animated by .bttrace • Describe the order of nodes to be highlighted • Sample language : • nX – highlight node X (apply active colour and then set white colour) • nX+ – set node X (apply active colour and then apply interleaved colour) • nX- – clear node X (set white colour) • { } – continuous loop of contained nodes #IMPORT /RBTs/R5.bt #OPTIONS.delay 500 #TRACE n1 n2 n3+ n4 n3- {n5 n6 n7} Ferdiansyah Dolot
3. Parsing outputs into BT Traces[4] • There are possibly several outputs that can be parsed and converted into BT Trace • Counter Example provided by SAL Model Checker and import the cex into BT Tracesand animated in BE Visualiser • ExecutingBTs natively in Modelicausing OpenModelica (http://www.openmodelica.org)then parsed into BT Traces and animated in BE Visualiser. • To do this, some of output example are needed. (Open Modellica has been installed in PC01-Riset3204 and can run Open Modelica Notebook) • Future plan: Write ATL Transformation to generate Modelica code and Integrate it to TextBE • Finish the 1st and 2nd works, then think about developing the third phase using the previous works. Ferdiansyah Dolot
Step 1 and Step 2 Diagram[4] Ferdiansyah Dolot
Package Modification • Create org.be.textbe.bttrace.model • Install EMFText SDK • Develop EMFText Project • Create bttrace.ecore • Generate metamodel • Create bttrace.cs • Modify file BEView.java in package org.be.textbt.beviz • Modify BEView.java in order to recognize .bttrace file • Set no color first to view the animation • Create org.be.textbe.bttrace.trace2svg • Make Java Emitter Template (/templates/trace.jet) to generate the script to animating the SVG file from .bttrace file Ferdiansyah Dolot
References • [1] Myers, Toby J. : TextBE : A Textual Editor for Behavior Engineering, 3rd Improving Systems and Software Engineering Conference , (2011) • [2]http://code.google.com/p/textbe/ • [3]http://www.behaviorengineering.org/publications/myers/CD/home.html • [4]Myers, Toby J : Animating Behavior Tree Traces, (2011) Ferdiansyah Dolot