180 likes | 261 Views
JTempura. Vladimir Valkanov, Damyan Mitev Plovdiv University “Paisii Hilendarski”. SEDILIa project. flexible, adaptive, collaborative, context-aware service and agent-oriented eLearning environment uses InfoStation network architecture
E N D
JTempura Vladimir Valkanov, Damyan Mitev Plovdiv University “Paisii Hilendarski” SEERE Workshop, Ivanjica 2010
SEDILIa project flexible, adaptive, collaborative, context-aware service and agent-oriented eLearning environment uses InfoStation network architecture delivers personalized, mobile, any-time and any-where access to educational content and services SEERE Workshop, Ivanjica 2010
InfoStation middleware • manages services and mobile users • scenario based • « No change » scenario • « Change IS » scenario • « Change MD » scenario • « Change both » scenario SEERE Workshop, Ivanjica 2010
Scenarios • depend on movement of user and used mobile device • mandate different behavior of the middleware • different device profiles (capabilities) • cached information in the InfoStations • availability of services in different InfoStations • time dependant SEERE Workshop, Ivanjica 2010
Scenario detection and control • we need • formal description of scenarios • mechanisms to interpret that description • we gain • flexible mechanisms for creating new (sub) scenarios • easily define corresponding middleware behavior SEERE Workshop, Ivanjica 2010
Scenario formalism • Interval Temporal Logic • propositional and first-order logical reasoning • finite sequences – time intervals • capable of handling sequential and parallel composition • Tempura - executable ITL framework. SEERE Workshop, Ivanjica 2010
Tempura usage • middleware • written in Java • Tempura • written in C • open source • possible usage of Tempura • wrapping existing Tempura executable with Java IO redirection • development of entirely new project, based on execution rules of ITL • reengineering of Tempura and rewriting it in Java SEERE Workshop, Ivanjica 2010
Retargeting plan • Based on iterations • Iteration phases • research phase • implementation phase • testing phase SEERE Workshop, Ivanjica 2010
Plan for first iteration • research • understand Interval Temporal Logic • learn code structure, main program flow, structures and variables of Tempura interpreter • check possible usages of existing C-to Java conversion tools • No suitable software found • check possible usages of existing C analysis tools • No suitable software found SEERE Workshop, Ivanjica 2010
Plan for first iteration • implementation • create a Java class for every C source file and its associate header file • create a static method in the Java class for every function in the C file with the same name (ignoring Java naming conventions) • create static variable in the Java class for every global variable in the header file • create a static method in the Java class for every macro function in the header file (where appropriate) • expand the contents of every macro, not covered by the previous step • implement all struct and union types as Java classes • convert integer boolean assignments and expressions into proper Java boolean constructs • replace function pointers with instances of specially created Interface, which will call the desired Java method (delegates) SEERE Workshop, Ivanjica 2010
Plan for first iteration • implementation status (estimated) • 98 % of the source code • 100 % of the structures • 100 % of function pointers • faced problems • scattered functions and variables • heavy use of c-specific syntax structures like macros, pointers, memory addressing, null terminated strings, inline initializers SEERE Workshop, Ivanjica 2010
JTempura • First version – not object oriented • One-to-one translation of C source files of original Tempura • Keeps interface and syntax of original interpreter • Console application • Developed by the plan, devised 2009 – outcome of first iteration SEERE Workshop, Ivanjica 2010
Plan for first iteration • testing • run the examples, which come with the original sources, on the Java interpreter and compare results • contact Antonio Cau for further test cases SEERE Workshop, Ivanjica 2010
Testing JTempura • Strategy – embed the same trace information in original tempura sources and in JTempura, then compare outcomes of execution of the same tempura expression in both interpreters. SEERE Workshop, Ivanjica 2010
Testing JTempura • Test cases • Standard test cases from the examples, which come with the original sources • Test cases, sent by Antonio Cau • I/O – 100% • Lists and sub lists – 100 % • Miscellaneous – 90 % SEERE Workshop, Ivanjica 2010
JTempura usage – future questions • How to use JTempura • as a library/plug-in • as stand alone executable • as service SEERE Workshop, Ivanjica 2010
Next iterations • Object oriented – adaptable, reusable; • Agent oriented – needed for our SEDILIa project; SEERE Workshop, Ivanjica 2010
Thank you SEERE Workshop, Ivanjica 2010