Advanced Science and Technology Letters Vol.41 (Mechanical Engineering 2013), pp.39-42 0 Two Recent Approaches.

Slides:



Advertisements
Similar presentations
T YPE I SOMORPHISM O LA M AHMOUD S UPERVISED BY : D R. M ARCELO F IORE UNIVERSITY OF CAMBRIDGE Computer Laboratory Theory & Semantics Group I NTRODUCTION.
Advertisements

ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
Constraint Semantics for Abstract Read Permissions 28 th July 2014, FTfJP, Uppsala John Tang Boyland (UW-Milwaukee/ETH Zurich) Peter Müller, Malte Schwerhoff,
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Project Proposal.
Deeper Security Analysis of Web-based Identity Federation Apurva Kumar IBM Research – India.
VIDE als voortzetting van Cocktail SET Seminar 11 september 2008 Dr. ir. Michael Franssen.
CLF: A Concurrent Logical Framework David Walker Princeton (with I. Cervesato, F. Pfenning, K. Watkins)
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
A Concurrent Logical Framework (Joint work with Frank Pfenning, David Walker, and Kevin Watkins) Iliano Cervesato ITT Industries,
Twelf: The Quintessential Proof Assistant for Language Metatheory Karl Crary Carnegie Mellon University Joint work with Robert Harper and Michael Ashley-Rollman.
introduction to MSc projects
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Project.
1 Explicit Contexts in LF Karl Crary Carnegie Mellon University Workshop on Mechanized Metatheory, 9/21/06.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Slides 00 1 Advanced Logics Part 1: Lambda Calculus and Type Theory Lecturer: Lim Yohanes Stefanus Part 2: Modal Logic Lecturer: Gregory Wheeler.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Formal Specification.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Concurrency Programming Chapter 2. The Role of Abstraction Scientific descriptions of the world are based on abstractions. A living animal is a system.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 9 Slide 1 Formal Specification l Techniques for the unambiguous specification of software.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
A Taxonomy of Evaluation Approaches in Software Engineering A. Chatzigeorgiou, T. Chaikalis, G. Paschalidou, N. Vesyropoulos, C. K. Georgiadis, E. Stiakakis.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Martin Henz and Aquinas Hobor School of Computing National University of Singapore.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
IFIP WG2.1 meeting, 京都市, Sep Refinement and Transformations in Specware A progress report Alessandro Coglio, Kestrel Institute Stephen Westfold,
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
CSE S. Tanimoto Lambda Calculus 1 Lambda Calculus What is the simplest functional language that is still Turing complete? Where do functional languages.
Lambda Calculus History and Syntax. History The lambda calculus is a formal system designed to investigate function definition, function application and.
Logic. Mathematical logic is a subfield of mathematics exploring the applications of formal logic to mathematics. Topically, mathematical logic bears.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Proof-Carrying Code & Proof-Carrying Authentication Stuart Pickard CSCI 297 June 2, 2005.
A Locally Nameless Theory of Objects 1.Introduction:  -calculus and De Bruijn notation 2.locally nameless technique 3.formalization in Isabelle and proofs.
How to Read Research Papers? Xiao Qin Department of Computer Science and Software Engineering Auburn University
Designing software architectures to achieve quality attribute requirements F. Bachmann, L. Bass, M. Klein and C. Shelton IEE Proceedings Software Tzu-Chin.
Towards Automatic Verification of Safety Architectures Carsten Schürmann Carnegie Mellon University April 2000.
School of Computer Science, The University of Adelaide© The University of Adelaide, Australian Computer Science Week 2005 Selected papers from: ACSC.
Logic in Computer Science - Overview Sep 1, 2009 박성우.
Software Debugging, Testing, and Verification Presented by Chris Hundersmarck November 10, 2004 Dr. Bi’s SE516.
The Software Development Process
ASPfun: A Distributed Object Calculus and its Formalization in Isabelle Work realized in collaboration with Florian Kammüller and Henry Sudhof (Technische.
Question paper 1997.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Tool Support for proof Engineering Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA
Implementing a Dependently Typed λ -Calculus Ali Assaf Abbie Desrosiers Alexandre Tomberg.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Issues in Ontology-based Information integration By Zhan Cui, Dean Jones and Paul O’Brien.
Mechanizing Metatheory without Typing Contexts TYPES 2011 September 10, 2011 Jonghyun Park, Jeongbong Seo, Sungwoo Park, Gyesik Lee* Pohang University.
Computing Higher – SD Unit - Topic 8 – Procedure and Standard Algorithms P Lynch, St Andrew’s High School Unit 2 Software Development Process Topic.
Research Methodology For Information Technology Students [cf. Martin Olivier 1997] Created by Piet Boonzaier Chapter 2 Designing your project.
Advanced Science and Technology Letters Vol.46 (Mobile and Wireless 2014), pp University Dedicated Next.
1 Here are some quotations to get an overview of the kinds of issues of interest.
A Mechanized Model of the Theory of Objects 1.Functional  -calculus in Isabelle 2.Confluence Proof in Isabelle 3.Ongoing Work, Applications, Conclusion.
Getting Started in PL Design Research Stephanie Weirich University of Pennsylvania.
Yu, et al.’s “A Model-Driven Development Framework for Enterprise Web Services” In proceedings of the 10 th IEEE Intl Enterprise Distributed Object Computing.
Copyright 2006 Pearson Addison-Wesley, 2008, 2012 Joey Paquet 1 Concordia University Department of Computer Science and Software Engineering SOEN6441 –
Interface specifications At the core of each Larch interface language is a model of the state manipulated by the associated programming language. Each.
Generic Programming and Proving for Programming Language Metatheory
Il-Kyoung Kwon1, Sang-Yong Lee2
Advanced Compilation and Automatic Programming
Introduction to Automata Theory
Chapter 10: Mathematical proofs
How to Read Research Papers?
Engineering Aspects of Formal Metatheory
Department of Computer Science Abdul Wali Khan University Mardan
Paper by D.L Parnas And D.P.Siewiorek Prepared by Xi Chen May 16,2003
Sub-system interfaces
Presentation transcript:

Advanced Science and Technology Letters Vol.41 (Mechanical Engineering 2013), pp Two Recent Approaches to Mechanical Developments of Formal Metatheory Gyesik Lee Hankyong National University, Dept. of Computer & Web Information Engineering Anseong-si, Gyonggi-do, Korea Abstract. This paper introduces two recent approaches to mechanical developments of formal metatheory for programming languages. The key issue concerns the representation and manipulation of terms with variable binding. This paper addresses first-order approaches only and gives an short overview of recent progresses in this field. Keywords: Mechanization, variable binding, first-order representations, POPLMark challenge. 1 Introduction A key issue in mechanical developments of formal metatheory for programming languages concerns the representation and manipulation of terms with variable binding. There are first-order and higher-order approaches. The first-order approaches are close to pen- and-paper developments. However, they require tedious infrastructures for handling variable binding. For instance, in the locally nameless style [3] and locally named style [11], operations like substitution for parameters (free variables) and for (bound) variables as well some associated lemmas are necessary. And for de Bruijn indices [5] we need similar infrastructure. Approaches based on higher-order abstract syntax (HOAS) [13, 7] are used in logical frameworks such as Abella [6], Hybrid [12] or Twelf [14]. In HOAS, the object-language binding is represented using the binding of the meta-language. This has the important advantage that facts about substitution or alpha-equivalence come for free since the binding infrastructure of the meta-language is reused. In this paper we introduce two recent first- order approaches achieved by the author. 2 GMeta: a generic formal metatheory framework The main drawback of first-order approaches is that the tedious infrastructure required for handling variable binding has to be repeated each time for a new object language. For each binding construct in the language, there is a set of infrastructure operations and associated lemmas that should be implemented. ISSN: ASTL Copyright © 2013 SERSC

Advanced Science and Technology Letters Vol.41 (Mechanical Engineering 2013) For example, System F<, which is the language described in the POPLMark challenge [2], requires 6 out of the 8 substitutions. Because for each operation we need to also prove a number of associated lemmas, solutions to the POPLMark challenge typically have a large percentage of lemmas and definitions just for infrastructure. In the solution by Aydemir et al. [3], infrastructure amounts to 65% of the total number of definitions and lemmas. To deal with the combinatorial explosion of infrastructure operations and lemmas, Lee et al. [8] proposed a generic framework called GMeta for first-order representations of variable binding. GMeta makes use of datatype-generic programming (DGP) and modular programming techniques. The key idea is that, with DGP, one can define once and for all the tedious infrastructure lemmas and operations in a generic way and, with modules, one can provide a convenient interface for users to instantiate such generic infrastructure to their object languages. GMeta is implemented in the proof assistant Coq. In GMeta, a DGP universe [10] is used to represent a large family of object languages and includes constructs for representing the binding structure of those languages. The universe is independent of the particular choice of first-order representations: it can be instantiated, for example, to locally nameless or de Bruijn representations. GMeta uses that universe to provide libraries with the infrastructure for various first-order representations. The infrastructure is reused by users through so-called templates. Templates are functors parameterized by isomorphisms between the object language and the corresponding representation of that language in the universe. By instantiating templates with isomorphisms, users get access to a module that provides infrastructure tailored for a particular binding construct in their own object language. Fig. 1. Savings in terms of numbers of definitions and lemmas. In order to verify the effectiveness of GMeta in reducing the infrastructure overhead, GMeta is used for case studies using locally nameless and de Bruijn representations. The two case studies are a solution to the POPLMark challenge parts 1A+2A, and a formalization of the STLC. GMeta can reduce the infrastructure overhead because it provides reuse of boilerplate definitions and lemmas. By boilerplate we mean common operations, lemmas about common operations}, and lemmas involving well-formedness. The biggest benefit of GMeta is that it significantly lowers the overheads required in mechanical formalizations by providing reuse of the basic infrastructure. Figure 1 shows the savings that GMeta achieved relative to the reference solutions by Aydemir et al. [3] and Vouillon [18]. Note that in GMeta only user-defined code is counted. In all case studies more than 35% of the total numbers of definitions were saved. We conducted case studies in both System F< and STLC. 40 Copyright © 2013 SERSC

Advanced Science and Technology Letters Vol.41 (Mechanical Engineering 2013) 3 Stoughton-style nominal approach Stoughton [16] demonstrated a non- canonical, but elegant and sound nominal approach to variable binding. Any substitution (including identity substitution) puts terms in a substitution normal form, and alpha- congruence is equality of substitution normal forms. In spite of the non-canonical aspect, Stoughton's representation is very interesting because it is closely related to Barendregt’s Variable Convention: VARIABLE CONVENTION. If M1,..., Mn occur in a certain mathematical context (e.g. definition, proof), then in these terms all bound variables are chosen to be different from the free variables. (Barendregt [4]) This convention tacitly assumes that bound variables can be renamed by fresh ones when necessary, for example, in case of possible variable capture. On the other hand, in Stoughton's representation bound variables are to be renamed whenever we do substitutions without thinking of whether variable capture occurs or not. From the standpoint of mechanization, it is much more convenient to do reasoning without being based on tacit conventions. Indeed, as long as we stick to one-sorted variable names, there is no direct way to formalize reasoning based on such tacit assumptions like Barendregt’s Variable Convention. Such a formalization would work entirely at the level of terms quotiented by alpha- congruence. Pitts’s Nominal Logic [15] and nominal techniques in Isabelle/HOL [17], e.g., can be regarded as methods of formalizing the spirit of Barendregt. Lee and Na [9] used [16] as a test case in exploring a nominal approach to variable binding in Coq. This approach is characterized by a close correspondence between the original reasoning on paper and ours within Coq. They showed that it is not only feasible, but also convenient to work with the nominal approach in Coq. Most of all, our formalization is very compact and close to the original reasoning on paper. The formalization in Coq was done as close as possible to the original reasoning on paper and showed that it is not only feasible, but also convenient to work with the nominal approach in Coq. In particular, Nominal approach with one-sorted variable names is applied to variable binding in Coq. Coq's internal equality is used instead of any kind of set- theoretic equalities or setoid equalities. Only Coq's basic terminology and techniques are used. 4 Conclusion We introduced two recent approaches in mechanical developments of formal metatheory for programming languages: GMeta and Stoughton- style nominal approach. GMeta improves on the development of the infrastructure for a new formalization, whereas Stoughton-style nominal approach makes it plausible to use one sort of variables without much worrying about variable capture. It remains to extend these works by applying the two approaches to more realistic examples. Copyright © 2013 SERSC 41

Advanced Science and Technology Letters Vol.41 (Mechanical Engineering 2013) References 1.Aydemir, B., Weirich, S., Zdancewic, S.: Abstracting syntax. Technical Report MS-CIS-09-06, University of Pennsylvania (2009) 2.Aydemir, B. E., Bohannon, A., Fairbairn, M., Nathan Foster, N., Pierce, B. C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S., Zdancewic, S.; Mechanized Metatheory for the Masses: The POPLmark Challenge. In: TPHOLs ’05 ( 2005) 3.Aydemir, B. E., Chargu é raud, A., Pierce, B. C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: POPL ’08 (2008) 4.Barendregt, H. P.: The Lambda Calculus - Its Syntax and Semantics. North-Holland (1984) 5.De Bruijn, N. G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae (Proceedings), 75(5): (1972) 6.Gacek, A.: The Abella Interactive Theorem Prover (System Description). In: IJCAR ’08 (2008) 7.Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. J. ACM, 40(1): (1993) 8.Lee, G., Oliveira, B. C. d. S., Cho, S., Yi, K.: Gmeta: A generic formal metatheory framework for first-order representations. In: ESOP, pages (2012) 9.Lee G., Na, H.: Using nominal reasoning techniques in the coq proof assistant. Journal of KIISE: Software and Applications, 40(11): (2013) 10.Martin-L ö f, P.: Intuitionistic Type Theory. Bibliopolis (1984) 11.McKinna, J., Pollack, R.: Pure type systems formalized. In: TLCA ’93, pages Springer-Verlag (1993) 12.Momigliano, A., Martin, A. J., Felty, A. P.: Two-level hybrid: A system for reasoning using higher-order abstract syntax. Electron. Notes Theor. Comput. Sci., 196:85-93 (2008) 13.Pfenning, F., Elliot, C.: Higher-order abstract syntax. In: PLDI ’88 (1988) 14.Pfenning, F., Sch ü rmann, C.: System description: Twelf - a meta-logical framework for deductive systems. In: CADE ’99 (1999) 1.Pitts, A. M.: Nominal logic, a first order theory of names and binding. Inf. Comput., 186(2): (2003) 2.Stoughton, A.: Substitution Revisited. Theor. Comput. Sci., 59: (1988) 3.Urban, C., Tasson, C.: Nominal Techniques in Isabelle/HOL. In: CADE ’05 (2005) 4.Vouillon, J.: Poplmark solutions using de Bruijn indices (2007) Available at 42 Copyright © 2013 SERSC