Lecture Notes in Computer Science 7705 CommencedPublicationin1973 FoundingandFormerSeriesEditors: GerhardGoos,JurisHartmanis,andJanvanLeeuwen EditorialBoard DavidHutchison LancasterUniversity,UK TakeoKanade CarnegieMellonUniversity,Pittsburgh,PA,USA JosefKittler UniversityofSurrey,Guildford,UK JonM.Kleinberg CornellUniversity,Ithaca,NY,USA AlfredKobsa UniversityofCalifornia,Irvine,CA,USA FriedemannMattern ETHZurich,Switzerland JohnC.Mitchell StanfordUniversity,CA,USA MoniNaor WeizmannInstituteofScience,Rehovot,Israel OscarNierstrasz UniversityofBern,Switzerland C.PanduRangan IndianInstituteofTechnology,Madras,India BernhardSteffen TUDortmundUniversity,Germany MadhuSudan MicrosoftResearch,Cambridge,MA,USA DemetriTerzopoulos UniversityofCalifornia,LosAngeles,CA,USA DougTygar UniversityofCalifornia,Berkeley,CA,USA GerhardWeikum MaxPlanckInstituteforInformatics,Saarbruecken,Germany Ranjit Jhala Atsushi Igarashi (Eds.) Programming Languages and Systems 10th Asian Symposium, APLAS 2012 Kyoto, Japan, December 11-13, 2012 Proceedings 1 3 VolumeEditors RanjitJhala UniversityofCalifornia,SanDiego ComputerScienceDepartment 9500GilmanDrive,LaJolla,CA92093-6237,USA E-mail:[email protected] AtsushiIgarashi KyotoUniversity GraduateSchoolofInformatics Yoshida-Honmachi,Sakyo-ku,Kyoto606-8501,Japan E-mail:[email protected] ISSN0302-9743 e-ISSN1611-3349 ISBN978-3-642-35181-5 e-ISBN978-3-642-35182-2 DOI10.1007/978-3-642-35182-2 SpringerHeidelbergDordrechtLondonNewYork LibraryofCongressControlNumber:2012952150 CRSubjectClassification(1998):D.3,D.2,F.3,D.4,D.2.4,D.1,F.4.1,C.2 LNCSSublibrary:SL2–ProgrammingandSoftwareEngineering ©Springer-VerlagBerlinHeidelberg2012 Thisworkissubjecttocopyright.Allrightsarereserved,whetherthewholeorpartofthematerialis concerned,specificallytherightsoftranslation,reprinting,re-useofillustrations,recitation,broadcasting, reproductiononmicrofilmsorinanyotherway,andstorageindatabanks.Duplicationofthispublication orpartsthereofispermittedonlyundertheprovisionsoftheGermanCopyrightLawofSeptember9,1965, initscurrentversion,andpermissionforusemustalwaysbeobtainedfromSpringer.Violationsareliable toprosecutionundertheGermanCopyrightLaw. Theuseofgeneraldescriptivenames,registerednames,trademarks,etc.inthispublicationdoesnotimply, evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevantprotectivelaws andregulationsandthereforefreeforgeneraluse. Typesetting:Camera-readybyauthor,dataconversionbyScientificPublishingServices,Chennai,India Printedonacid-freepaper SpringerispartofSpringerScience+BusinessMedia(www.springer.com) Preface This volume contains the proceedings of the 10th Asian Symposium on Programming Languages and Systems (APLAS 2012), held in Kyoto, Japan during December 11–13, 2012. APLAS aims at stimulating programming lan- guage research by providing a forum for the presentation of the latest results and the exchangeof ideas in topics concernedwith programminglanguagesand systems. APLAS is based in Asia, but is an international forum that serves the worldwide programming language community. The past APLAS symposia were successfully held in Kenting (2011), Shanghai (2010), Seoul (2009), Bangalore (2008), Singapore (2007), Sydney (2006), Tsukuba (2005), Taipei (2004), and Beijing (2003) after three informal workshops. The topics covered in the conference include, but are not limited to, seman- tics,logics,andfoundationaltheory;designoflanguagesandfoundationalcalculi; domain-specific languages; type systems; compilers, interpreters, and abstract machines;programderivation, synthesis, and transformation;programanalysis, constraints,verification,andmodel-checking;softwaresecurity;concurrencyand parallelism;andtoolsforprogramming,verification,andimplementation. This year, 58 papers were submitted to APLAS. Each submission was re- viewed by three or more program committee members. After thoroughly evalu- ating the relevance and quality of each paper,the committee chose to accept 24 papers for presentation at the conference. This year’s program also continues the APLAS tradition of invited talks by distinguished researchers: – Jan Vitek (Purdue University) on Planet Dynamic or: How I Learned to Stop Worrying and Love Reflection – Greg Morrisett (Harvard University) on Scalable Formal Machine Models, and, – Xavier Leroy (INRIA) on Mechanized Semantics for Compiler Verification. This program would not have been possible without the unstinting efforts of several people, whom we would like to thank. First, the program committee and subreviewers for the hard work put in towards ensuring the high quality of the proceedings. Our thanks also go to the Asian Association for Foundation of Software (AAFS), founded by Asian researchers in cooperation with many researchers from Europe and the USA, for sponsoring and supporting APLAS. We would like to warmly thank the steering committee in general and Jacques Garrigue and Kohei Suenaga for their support in the local organization and for organizing the poster session. Finally, we are grateful to Andrei Voronkov whoseEasyChairsystemeasedthe processesofsubmission,paperselection,and proceedings compilation. December 2012 Ranjit Jhala Atsushi Igarashi Conference Organization General Chair Atsushi Igarashi Program Chair Ranjit Jhala Program Committee Amal Ahmed Northeastern University Satish Chandra IBM Research Juan Chen Microsoft Research Jean-Christophe Filliatre CNRS Deepak Garg Max Planck Institute for Software Systems Aarti Gupta NEC Laboratories America Arie Gurfinkel SEI, Carnegie Mellon University Aquinas Hobor National University of Singapore Chung-Kil Hur University of Cambridge Atsushi Igarashi Kyoto University Thomas Jensen INRIA Ranjit Jhala UC San Diego Akash Lal Microsoft Research Keiko Nakata Tallinn University of Technology James Noble Victoria University of Wellington Luke Ong University of Oxford Sungwoo Park Pohang University of Science and Technology Zvonimir Rakamaric Carnegie Mellon University Tachio Terauchi Nagoya University Dimitrios Vytiniotis Microsoft Research Bow-Yaw Wang Academia Sinica Stephanie Weirich University of Pennsylvania Eran Yahav Technion Xiangyu Zhang Purdue University Jianjun Zhao Shanghai Jiao Tong University VIII Conference Organization Additional Reviewers Albarghouthi, Aws Li, Yi Besson, Frederic Madhavan, Ravichandhran Blackshear,Sam Meshman, Yuri Bonfante, Guillaume Park, Jonghyun Chang, Xi Pearce, David Danvy, Olivier Pichardie, David Downen, Paul Rinetzky, Noam Drossopoulou, Sophia Rolf, Carl Christian Gaboardi, Marco Sinha, Nishant Ganty, Pierre Sjo¨berg, Vilhelm Garoche, Pierre-Loic Staton, Sam Golan Gueta, Guy Stump, Aaron Gopan, Denis Suenaga, Kohei Harris, William Sun, Qiang Hasegawa,Masahito Swamy, Nikhil Im, Hyeonseung Xie, Feng Jia, Limin Yorsh, Greta Johannsen, Jacob Zhang, Cheng Komuravelli,Anvesh Zhang, Sai Kong, Soonho Table of Contents Session I: Invited Talk Planet Dynamic or: How I Learned to Stop Worrying and Love Reflection....................................................... 1 Jan Vitek Session II: Concurrency JATO: Native Code Atomicity for Java ............................. 2 Siliang Li, Yu David Liu, and Gang Tan Ownership Types for Object Synchronisation ........................ 18 Yi Lu, John Potter, and Jingling Xue Session III: Security A Functional View of Imperative Information Flow................... 34 Thomas H. Austin, Cormac Flanagan, and Mart´ın Abadi End-to-end Multilevel Hybrid Information Flow Control .............. 50 Lennart Beringer Succour to the Confused Deputy: Types for Capabilities .............. 66 Radha Jagadeesan, Corin Pitcher, and James Riely Types and Access Controls for Cross-DomainSecurity in Flash ........ 82 Aseem Rastogi, Avik Chaudhuri, and Rob Johnson Session IV: Static Analysis I Linear Approximation of Continuous Systems with Trapezoid Step Functions ....................................................... 98 Giulia Costantini, Pietro Ferrara, and Agostino Cortesi Signedness-Agnostic Program Analysis: Precise Integer Bounds for Low-Level Code ................................................. 115 Jorge A. Navas, Peter Schachte, Harald Søndergaard, and Peter J. Stuckey Hierarchical Shape Abstraction of Dynamic Structures in Static Blocks.......................................................... 131 Pascal Sotin and Xavier Rival X Table of Contents Vinter: A Vampire-Based Tool for Interpolation (Tool Paper).......... 148 Kryˇstof Hoder, Andreas Holzer, Laura Kov´acs, and Andrei Voronkov Session V: Static Analysis II Side-Effecting Constraint Systems: A Swiss Army Knife for Program Analysis ........................................................ 157 Kalmer Apinis, Helmut Seidl, and Vesal Vojdani Inference of Necessary Field Conditions with Abstract Interpretation ... 173 Mehdi Bouaziz, Francesco Logozzo, and Manuel F¨ahndrich Session VI: Language Design Lazy v. Yield: Incremental, Linear Pretty-Printing ................... 190 Oleg Kiselyov, Simon Peyton-Jones, and Amr Sabry Dynamic Software Update for Message Passing Programs ............. 207 Gabrielle Anderson and Julian Rathke A Synchronous Language with Partial Delay Specification for Real-Time Systems Programming .................................. 223 R´emy Wyss, Fr´ed´eric Boniol, Julien Forget, and Claire Pagetti Session VII: Dynamic Analysis Concurrent Test Generation Using Concolic Multi-trace Analysis....... 239 Niloofar Razavi, Franjo Ivanˇci´c, Vineet Kahlon, and Aarti Gupta Java Bytecode Instrumentation Made Easy: The DiSL Framework for Dynamic ProgramAnalysis ....................................... 256 Luka´ˇs Marek, Yudi Zheng, Danilo Ansaloni, Aibek Sarimbekov, Walter Binder, Petr T˚uma, and Zhengwei Qi Session VIII: Complexity and Semantics Indexed Realizability for Bounded-Time Programming with References and Type Fixpoints .............................................. 264 Alo¨ıs Brunel and Antoine Madet A New Order-Theoretic Characterisation of the Polytime Computable Functions ....................................................... 280 Martin Avanzini, Naohi Eguchi, and Georg Moser A Dynamic Interpretation of the CPS Hierarchy ..................... 296 Marek Materzok and Dariusz Biernacki Table of Contents XI Session IX: Invited Talk Scalable Formal Machine Models................................... 312 Greg Morrisett Session X: Program Logics and Verification Modular Verification of Concurrent Thread Management ............. 315 Yu Guo, Xinyu Feng, Zhong Shao, and Peizhi Shi A Case for Behavior-PreservingActions in Separation Logic........... 332 David Costanzo and Zhong Shao A Generic Cyclic Theorem Prover.................................. 350 James Brotherston, Nikos Gorogiannis, and Rasmus L. Petersen Decision Procedures over Sophisticated Fractional Permissions......... 368 Xuan Bach Le, Cristian Gherghina, and Aquinas Hobor Session XI: Invited Talk Mechanized Semantics for Compiler Verification ..................... 386 Xavier Leroy Author Index.................................................. 389 Planet Dynamic or: How I Learned to Stop Worrying and Love Reflection Jan Vitek PurdueUniversity [email protected] Abstract. Afundamentalbeliefunderlyingfortyyearsofprogramming languages research, aptly captured by the slogan “Well-typed programs can’t go wrong”, is that programs augmented with machine-checked an- notationsaremorelikelytobefreeofbugs.Butofcourse,realprograms dowrongandprogrammersarevotingwiththeirfeet.Dynamiclanguages suchas Ruby,Python,Lua,JavaScriptand Rareunencumberedby redundant type annotations and are increasingly popular. JavaScript, thelingua franca oftheweb,is movingtotheserverwith thesuccess of Node.js. R, another dynamic language, is being used in statistics, biol- ogy and finance for data analysis and visualization. Not only are these languagesdevoidoftypes,buttheyutterlylackanystaticstructurethat could be used for program verification. This talk will draw examples from recent results on JavaScript and R to illustrate theextent of the problem and propose some directions for research. R.JhalaandA.Igarashi(Eds.):APLAS2012,LNCS7705,p.1,2012. (cid:2)c Springer-VerlagBerlinHeidelberg2012