Title :
Automated program transformation for migration to new libraries
Author :
Itsykson, Vladimir ; Zozulya, Alexey
Author_Institution :
Comput. Syst. & Program Eng. Dept., St.-Petersburg State Polytech. Univ., St. Petersburg, Russia
fDate :
Oct. 31 2011-Nov. 3 2011
Abstract :
In modern software engineering the task of migration from one system environment to another may arise very often (e.g. software migrating from Windows to Linux or from desktop PC to some mobile platform). This task may be accomplished manually, but this will certainly be not cost- and time-effective and will require additional testing and verification. Therefore various automated techniques aimed to solve this problem seem to be very useful. The article takes into consideration one of such approaches, mainly focused on transferring source code between two library environments. A comprehensive review of related works is presented. The classification of typical library entities having strong impact to software characteristics is defined. Special program annotation language (PanLang) is introduced. The main purpose of this language is to specify library structure and behavior. The key feature of PanLang is the high level of abstraction allowing to take out of consideration the library implementation details. Therefore, PanLang annotation applied to a library is a partial specification. Such a specification may be considered as a Moore FSM. The problem of semantic conformance of source and target libraries´ specifications is posed. The conformance is guaranteed if set of execution traces corresponding to source library may be represented as a subset of target´s one. In our case the solution of this problem may be reduced to FSM homomorphism detection. Our approach considers using Abstract Semantic Graph (ASG) as a model of source code. Therefore after semantic conformance is proved, special transformation rules may be applied ASG. These rules are based on both source and target partial specifications which guarantee correctness of result software. A simple prototype migration tool based on proposed approach is described. This Java-based tool uses CLang frontend to LLVM for C source code parsing and ASG construction. A number of sample migration tasks were used to pro- e the method correctness and efficiency. Possible improvements and future researches are also discussed.
Keywords :
Java; formal specification; grammars; graph theory; program diagnostics; software libraries; ASG construction; C source code parsing; CLang; FSM homomorphism detection; Java-based tool; LLVM; Linux; Moore FSM; PanLang; Windows; abstract semantic graph; automated program transformation; desktop PC; execution traces; library behavior specification; library entity classification; library environments; library structure specification; mobile platform; program annotation language; semantic conformance; software engineering; software migration task; source code model; source code transfer; source library; transformation rules; Automation; Libraries; Linux; Operating systems; Semantics; Sockets; function behavior semantic; library´s environment; program transformation; reengineering; software migration; specification of library;
Conference_Titel :
Software Engineering Conference in Russia (CEE-SECR), 2011 7th Central and Eastern European
Conference_Location :
Moscow
Print_ISBN :
978-1-4673-0843-4
Electronic_ISBN :
978-1-4673-0842-7
DOI :
10.1109/CEE-SECR.2011.6188463