Proceedings of the Third International Valentin Turchin Workshop on Metacomputation
Total Page:16
File Type:pdf, Size:1020Kb
Russian Academy of Sciences Ailamazyan Program Systems Institute Third International Valentin Turchin Workshop on Metacomputation Proceedings Pereslavl-Zalessky, Russia, July 59, 2012 Pereslavl-Zalessky ÓÄÊ 004.42(063) ÁÁÊ 22.18 T66 Third International Valentin Turchin Workshop on Metacomputa- tion // Proceedings of the Third International Valentin Turchin Workshop on Metacomputation. Pereslavl-Zalessky, Russia, July 5{9, 2012 / Edited by A. V. Klimov and S. A. Romamenko. | Pereslavl Zalessky: Publishing House \University of Pereslavl", 2012, 260 p. | ISBN 978-5{901795-28-6 Òðåòèé ìåæäóíàðîäíûé ñåìèíàð ïî ìåòàâû÷èñëåíèÿì èìåíè Â. Ô. Òóð- ÷èíà // Ñáîðíèê òðóäîâ Òðåòüåãî ìåæäóíàðîäíîãî ñåìèíàðà ïî ìåòàâû÷èñëåíèÿì èìåíè Â. Ô. Òóð÷èíà, ã. Ïåðåñëàâëü-Çàëåññêèé, 59 èþëÿ 2012 ã. / Ïîä ðåäàêöèåé À. Â. Êëèìîâà è Ñ. À. Ðîìàíåíêî. Ïåðåñëàâëü-Çàëåññêèé: Èçä-âî ¾Óíèâåðñèòåò ãîðîäà Ïåðåñëàâëÿ¿, 2012, 260 ñ. (àíãë). ISBN 978-5901795-28-6 c 2012 Ailamazyan Program Systems Institute of RAS Èíñòèòóò ïðîãðàììíûõ ñèñòåì èìåíè À. Ê. Àéëàìàçÿíà ÐÀÍ, 2012 ISBN 978-5901795-28-6 Valentin Turchin (1931{2010) Preface The proceedings contain the papers presented at the Third International Valentin Turchin Workshop on Metacomputation, META 2012, held on July 5{9, 2012 in Pereslavl-Zalessky. The workshop belongs to a series of workshops organized biannually by Aila- mazyan Program Systems Institute of the Russian Academy of Science and Ail- amazyan University of Pereslavl in an ancient Russian town Pereslavl-Zalessky. The first workshop in 2008 was blessed by the creator of supercompilation Valentin Turchin, who did not come personally, but was very glad to hear that supercompilation and other metacomputation topics attracted more and more attention of the computer science community. The second workshop in 2010 was held soon after Valentin Turchin's depar- ture and was devoted to his memory. At that time we observed a burst of work on supercompilation and related techniques. We are pleased to mention that since then two authors who presented their work at META 2010, Jason Reich and Ilya Klyuchnikov, have completed and defended their PhD theses on the topics of further development of supercompilation. From now on this series of workshops is named after Valentin Turchin. Metacomputation is a research area related to deep program analysis and transformation. The primary topics of the META 2012 workshop are multi-result supercompilation and distillation, which are further developments of supercompi- lation. Other papers and talks address program inversion and its logics, research into practical metacomputation and applications as well as metaprogramming in Scala. Multi-result supercompilation realizes the idea that while solving various problems by supercompilation from program optimization to proving properties of programs, there should be considered a set of residual programs equivalent to the source one, rather than a single one produced by using a fixed supercompi- lation strategy. { Ilya G. Klyuchnikov and Sergei A. Romanenko. Formalizing and Implement- ing Multi-Result Supercompilation. Explains the principles of multi-result supercompilation and discusses some details related to its implementation. { Sergei A. Grechanik. Overgraph Representation for Multi-Result Supercom- pilation. Suggests how to make multi-result supercompilation more efficient with the use of a compact representation of graphs of configurations. { Andrei V. Klimov, Ilya G. Klyuchnikov and Sergei A. Romanenko. Auto- matic Verification of Counter Systems via Domain-Specific Multi-Result Su- percompilation. Demonstrates how multi-result supercompilation improves previous results on application of supercompilation to verification of models expressed as counter systems. { Andrei V. Klimov. Why Multi-Result Supercompilation Matters: Case Study of Reachability Problems for Transition Systems. Revisits and analyses the method of solving the reachability problems by supercompilation and an- other method codenamed \Expand, Enlarge and Check" from the viewpoint of multi-result supercompilation. Distillation is a result of a metasystem transition from plain supercompilation to a hierarchy of program transformers. { Neil D. Jones and G. W. Hamilton. Superlinear Speedup by Program Trans- formation. Poses the problem of going beyond the classic positive supercom- pilation which can achieve only linear speedup and states the goal of finding an essential \inner core" of distillation, which gives rise to this improvement. { G. W. Hamilton. A Hierarchy of Program Transformers. Presents the main idea of distillation as building a hierarchy of program transformers in which the transformer at each level of the hierarchy builds on top of the transform- ers at lower levels. { Michael Dever and G. W. Hamilton. A Comparison of Program Transforma- tion Systems. Compares positive supercompilation, distillation and higher- level supercompilation. Program inversion is one of the favorite topics of metacomputation. { Nikolai N. Nepejvoda. Reversivity, Reversibility and Retractability. Analyses three essentially different but usually mixed notions of program invertibility and presents an outline of their logics. { Nikolay Shilov. Inverting Dynamic Programming. Considers Dynamic Pro- gramming as a case of inversion of a specific class of programs. Towards practical metacomputation and applications { Dimitur Krustev. A Metacomputation Toolkit for a Subset of F# and Its Application to Software Testing: Towards Metacomputation for the Masses. Presents an on-going experiment to develop a practical metacomputation toolkit for F# and also addresses a potential practical application | auto- matic generation of software test sets. { Neil D. Jones. Obfuscation by Partial Evaluation of Distorted Interpreters (Invited Talk). Investigates the possibility of program obfuscation by pro- gram specialization. { Gavin E. Mendel-Gleason and G. W. Hamilton. Development of the Pro- ductive Forces. Demonstrates how the productivity of a program, which is required in theorem provers such as Coq or Agda, can be derived by super- compiling the program and checking that the residual program satisfies a syntactic property referred to as guardedness condition. { Alexei Adamovich. Optimization of Imperative Functional Parallel Programs with Non-local Program Transformations. Presents a method of nonlocal op- timizing transformation of a typical parallel application solving massively parallel problem in the T-System being under development in Program Sys- tems Institute. Practical metaprogramming in Scala { Eugene Burmako and Martin Odersky. Scala Macros, a Technical Report. Presents a minimalistic macro system for Scala, integrated with the static type system of the host language. { Alexander A. Slesarenko. Lightweight Polytypic Staging of DSLs in Scala. Describes Lightweight Polytypic Staging, a new approach to the implemen- tation of deep embedding of DSLs in Scala, and demonstrates its usefulness for efficient implementation of nested data parallelism as flat data paral- lelism. The files of the papers and presentations of this and previous workshops on metacomputation as well as other information can be found at the META sites: { META 2008: http://meta2008.pereslavl.ru/ { META 2010: http://meta2010.pereslavl.ru/ { META 2012: http://meta2012.pereslavl.ru/ June 2012 Andrei Klimov Sergei Romanenko Organization Workshop Chair Sergei Abramov, Ailamazyan Program Systems Institute of RAS, Russia Program Committee Chairs Andrei Klimov, Keldysh Institute of Applied Mathematics of RAS, Russia Sergei Romanenko, Keldysh Institute of Applied Mathematics of RAS, Russia Program Committee Mikhail Bulyonkov, A. P. Ershov Institute of Informatics Systems of RAS, Russia Robert Gl¨uck, University of Copenhagen, Denmark Geoff Hamilton, Dublin City University, Republic of Ireland Arkady Klimov, Institute for Design Problems in Microelectronics of RAS, Russia Dimitur Krustev, IGE+XAO Balkan, Bulgaria Alexei Lisitsa, Liverpool University, Great Britain Gavin Mendel-Gleason, Dublin City University, Republic of Ireland Neil Mitchell, Standard Charted, United Kingdom Andrei Nemytykh, Ailamazyan Program Systems Institute of RAS, Russia Johan Nordlander, Lulea University of Technology, Sweden Peter Sestoft, IT University of Copenhagen, Denmark Alexander Slesarenko, Keldysh Institute of Applied Mathematics of RAS, Russia Morten Sørensen, Formalit, Denmark Walid Taha, Computer and Electrical Engineering Halmstad University, Sweden Invited Speaker Neil D. Jones, Professor Emeritus of the University of Copenhagen, Denmark Sponsoring Organizations Russian Academy of Sciences Russian Foundation for Basic Research (grant 12-07-06044-ã) Table of Contents Optimization of Imperative Functional Parallel Programs with Non-local Program Transformations ::::::::::::::::::::::::::::::::: 11 Alexei Adamovich Scala Macros, a Technical Report ::::::::::::::::::::::::::::::::::: 23 Eugene Burmako and Martin Odersky A Comparison of Program Transformation Systems ::::::::::::::::::: 33 Michael Dever and G. W. Hamilton Overgraph Representation for Multi-Result Supercompilation ::::::::::: 48 Sergei A. Grechanik A Hierarchy of Program Transformers ::::::::::::::::::::::::::::::: 66 G. W. Hamilton Obfuscation by Partial Evaluation of Distorted Interpreters (Invited Talk) 87 Neil D. Jones Superlinear Speedup by Program Transformation (Extended Abstract) :: 88 Neil D. Jones and G. W. Hamilton Why Multi-Result Supercompilation Matters: Case Study of Reachability Problems for Transition Systems ::::::::::::::::::::::::