Skip to main content Accessibility help
×
Home

Contextual equivalence for inductive definitions with binders in higher order typed functional programming

  • MATTHEW R. LAKIN (a1) and ANDREW M. PITTS (a1)

Abstract

Correct handling of names and binders is an important issue in meta-programming. This paper presents an embedding of constraint logic programming into the αML functional programming language, which provides a provably correct means of implementing proof search computations over inductive definitions involving names and binders modulo α-equivalence. We show that the execution of proof search in the αML operational semantics is sound and complete with regard to the model-theoretic semantics of formulae, and develop a theory of contextual equivalence for the subclass of αML expressions which correspond to inductive definitions and formulae. In particular, we prove that αML expressions, which denote inductive definitions, are contextually equivalent precisely when those inductive definitions have the same model-theoretic semantics. This paper is a revised and extended version of the conference paper (Lakin, M. R. & Pitts, A. M. (2009) Resolving inductive definitions with binders in higher-order typed functional programming. In Proceedings of the 18th European Symposium on Programming (ESOP 2009), Castagna, G. (ed), Lecture Notes in Computer Science, vol. 5502. Berlin, Germany: Springer-Verlag, pp. 47–61) and draws on material from the first author's PhD thesis (Lakin, M. R. (2010) An Executable Meta-Language for Inductive Definitions with Binders. University of Cambridge, UK).

Copyright

References

Hide All
Albert, E., Hanus, M., Huch, F., Oliver, J. & Vidal, G. (2002) An operational semantics for declarative multi-paradigm languages. In Proceedings of the 11th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2002), Comini, M. & Falaschi, M. (eds), Electronic Notes in Theoretical Computer Science, vol. 76. Philadelphia PA: Elsevier, pp. 119.
Antoy, S., Echahed, R. & Hanus, M. (2000) A needed narrowing strategy. J. ACM 47 (4), 776822.
Aydemir, B., Charguéraud, A., Pierce, B. C., Pollack, R. & Weirich, S. (2008) Engineering formal metatheory. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2008), Necula, G. C. & Wadler, P. (eds). New York, NY: ACM Press, pp. 315.
Aydemir, B. E., Bohannon, A., Fairbairn, M., Foster, J. N., Pierce, B. C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S. & Zdancewic, S. (2005) Mechanized metatheory for the masses: The POPLmark challenge. In Proceedings of the 18th International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2005), Hurd, J. & Melham, T. F. (eds), Lecture Notes in Computer Science, vol. 3603. Berlin, Germany: Springer-Verlag, pp. 5065.
Baelde, D., Gacek, A., Miller, D., Nadathur, G. & Tiu, A. (2007) The Bedwyr system for model checking over syntactic expressions. In Proceedings of the 21st International Conference on Automated Deduction (CADE 2007), Pfenning, F. (ed), Lecture Notes in Computer Science, vol. 4603. Berlin, Germany: Springer-Verlag, pp. 391397.
Barendregt, H. P. (1984) The Lambda Calculus: Its Syntax and Semantics, Revised edn. Amsterdam, Netherlands: North-Holland.
Braßel, B. & Hanus, M. (2005) Nondeterminism analysis of functional logic programs. In Proceedings of the 21st International Conference on Logic Programming (ICLP 2005), Gabbrielli, M. & Gupta, G. (eds), Lecture Notes in Computer Science, vol. 3668. Berlin, Germany: Springer-Verlag, pp. 265279.
Cheney, J. (2005) Relating nominal and higher order pattern unification. In Proceedings of the 19th International Workshop on Unification (UNIF 2005), Vigneron, L. (ed), LORIA research report A05-R-022, pp. 104119.
Cheney, J. (2010) Equivariant unification. J. Autom. Reasoning 45 (3), 267300.
Cheney, J. & Urban, C. (2004) Alpha-Prolog: A logic programming language with names, binding and alpha-equivalence. In Proceedings of the 20th International Conference on Logic Programming (ICLP 2004), Demoen, B. & Lifschitz, V. (eds), Lecture Notes in Computer Science, no. 3132. Berlin, Germany: Springer-Verlag, pp. 269283.
Cheney, J. & Urban, C. (2008) Nominal logic programming. ACM Trans. Program. Lang. Syst. 30 (5), 147.
Clark, K. L. (1978) Negation as failure. In Logic and Data Bases, Gallaire, J. & Minker, J. (eds). New York, NY: Plenum Press, pp. 293322.
de Bruijn, N. (1972) Lambda calculus notation with nameless dummies: A tool for automatic formula manipulation, with application to the Church–Rosser Theorem. IIndag. Math. 34, 381392.
Dershowitz, N. & Manna, Z. (1979) Proving termination with multiset orderings. Commun. ACM 22 (8), 465476.
Flanagan, C., Sabry, A., Duba, B. F. & Felleisen, M. (1993) The essence of compiling with continuations. Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 1993). ACM SIGPLAN Not. 28 (6), 237247 (New York, NY: ACM Press).
Gabbay, M. J. & Mathijssen, A. (2008) Capture-avoiding substitution as a nominal algebra. Form. Asp. Comput. 20 (4–5), 451479.
Gabbay, M. J. & Pitts, A. M. (2002) A new approach to abstract syntax with variable binding. Form. Asp. Comput., 13 (3–5), 341363.
Gacek, A. (2010) Relating nominal and higher order abstract syntax specifications. In PPDP '10: Proceedings of the 2010 Symposium on Principles and Practice of Declarative Programming. New York, NY: ACM, pp. 177186.
Gacek, A., Miller, D. & Nadathur, G. (2009) Reasoning in Abella about structural operational semantics specifications. In Proceedings of the 3rd International Workshop on Logical Frameworks and Metalanguages: Theory and Practice (LFMTP 2008), Abel, A. & Urban, C. (eds), Electronic Notes in Theoretical Computer Science, vol. 228. Philadelphia PA: Elsevier, pp. 85100.
Goldfarb, W. D. (1981) The undecidability of the second-order unification problem. Theor. Comput. Sci. 13 (2), 225230.
Gordon, A. D. (1998) Operational Equivalences for Untyped and Polymorphic Object Calculi. Cambridge, UK: Newton Institute, Cambridge University Press.
Hanus, M. (1997) A unified computation model for declarative programming. In Proceedings of the 1997 Joint Conference on Declarative Programming (APPIA-GULP-PRODE 1997), Falaschi, M., Navarro, M. & Policriti, A. (eds), pp. 924.
Hanus, M. (2007) Multi-paradigm declarative languages. In Proceedings of the 23rd International Conference on Logic Programming (ICLP 2007), Dahl, V. & Niemelä, I. (eds), Lecture Notes in Computer Science, vol. 4670. Berlin, Germany: Springer-Verlag, pp. 4575.
Hanus, M. & Steiner, F. (1998) Controlling search in declarative programs. In Principles of Declarative Programming (Proceedings of the Joint International Symposium PLILP/ALP 1998), Goos, G., Hartmanis, J. & van Leeuwen, J. (eds), Lecture Notes in Computer Science, vol. 1490. Springer-Verlag, pp. 374390.
Hanus, M. & Steiner, F. (2000) Type-based nondeterminism checking in functional logic programs. In Proceedings of the 2nd International ACM-SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2000), New York, NY: ACM Press, pp. 202213.
Hanus, M. & Zartmann, F. (1994) Mode analysis of functional logic programs. In Proceedings of the 1st International Static Analysis Symposium (SAS 1994), le Charlier, B. (ed), Lecture Notes in Computer Science, vol. 864. Berlin, Germany: Springer-Verlag, pp. 2642.
Howe, D. J. (1996) Proving congruence of bisimulation in functional programming languages. Inf. Comput. 124 (2), 103112.
Huet, G. (1975) A unification algorithm for typed λ-calculus. Theor. Comput. Sci. 1 (1), 2757.
Jaffar, J., Maher, M., Marriott, K. & Stuckey, P. (1998) Semantics of constraint logic programming. J. Log. Program. 37 (1–3), 146.
Lakin, M. R. (2010) An Executable Meta-language for Inductive Definitions with Binders, PhD thesis, University of Cambridge, UK.
Lakin, M. R. (2011) Constraint-solving in non-permutative nominal abstract syntax. Logical Methods Comput. Sci. 7 (3:06), 131.
Lakin, M. R. & Pitts, A. M. (2009) Resolving inductive definitions with binders in higher-order typed functional programming. In Proceedings of the 18th European Symposium on Programming (ESOP 2009), Castagna, G. (ed), Lecture Notes in Computer Science, vol. 5502. Berlin, Germany: Springer-Verlag, pp. 4761.
Lakin, M. R. & Pitts, A. M. (2012) Encoding abstract syntax without fresh names. J. Autom. Reasoning 49 (2), 115140.
Lassen, S. B. (1998) Relational Reasoning about Contexts. Cambridge, UK: Newton Institute, Cambridge University Press.
Levy, J. & Villaret, M. (2008) Nominal unification from a higher-order perspective. In Proceedings of the 19th International Conference on Rewriting Techniques and Applications (RTA 2008), Voronkov, A. (ed), Lecture Notes in Computer Science, vol. 5117. Berlin, Germany: Springer-Verlag, pp. 246260.
Mason, I. A. & Talcott, C. L. (1991) Equivalence in functional languages with effects. J. Funct. Program. 1 (3), 287327.
McKinna, J. & Pollack, R. (1999) Some lambda calculus and type theory formalized. J. Autom. Reason. 23 (3), 373409.
Miller, D. (1991) A logic programming language with lambda-abstraction, function variables and simple unification. J. Logic Comput. 1 (4), 497536.
Miller, D. (2000) Abstract syntax for variable binders: An overview. In Proceedings of Computational Logic – CL 2000, First International Conference, London, UK, 24–28 July 2000, Lloyd, J., Dahl, V., Furbach, U., Kerber, M., Lau, K., Palamidessi, C., Pereira, L. Moniz, Sagiv, Y. & Stuckey, P. J. (eds), Lecture Notes in Computer Science, vol. 1861. Berlin, Germany: Springer-Verlag, pp. 239253.
Miller, D. & Tiu, A. (2005) A proof theory for generic judgments. ACM Trans. Comput. Logic 6 (4), 749783.
Milner, R., Tofte, M., Harper, R. & MacQueen, D. (1997) The Definition of Standard ML (revised). Cambridge, MA: MIT Press.
Nadathur, G. & Miller, D. (1988) An overview of λProlog. In Proceedings of the 5th International Conference on Logic Programming (ICLP 1988), Kowalski, R. A. & Bowen, K. A. (eds). Cambridge, MA: MIT Press, pp. 810827.
Nadathur, G. & Mitchell, D. J. (1999) System description: Teyjus – a compiler and abstract machine based implementation of λProlog. In Automated Deduction–-Cade-16, Ganzinger, H. (ed), Lecture Notes in Computer Science, vol. 1632. Berlin, Germany: Springer-Verlag, pp. 287291.
Nickolas, P. & Robinson, P. J. (1996) The Qu-Prolog unification algorithm: Formalisation and correctness. Theor. Comput. Sci. 169 (1), 81112.
Pfenning, F. & Schürmann, C. (1999) System description: Twelf – a meta-logical framework for deductive systems. In Proceedings of the 16th International Conference on Automated Deduction (CADE 1999), Ganzinger, H. (ed), Lecture Notes in Artifical Intelligence, vol. 1632. Berlin, Germany: Springer-Verlag, pp. 202206.
Pientka, B. & Dunfield, J. (2010) Beluga: A framework for programming and reasoning with deductive systems (System Description). In Proceedings of the 5th International Joint Conference on Automated Reasoning (IJCAR 2010), Edinburgh, UK, 16–19 July 2010, Giesl, J. & Hähnle, R. (eds), Lecture Notes in Computer Science, vol. 6173. Berlin, Germany: Springer-Verlag, pp. 1521.
Pitts, A. M. (2002) Operational semantics and program equivalence. In Applied Semantics, Advanced Lectures, Lecture Notes in Computer Science, vol. 2395. Berlin, Germany: Springer-Verlag, pp. 378412.
Pitts, A. M. (2003) Nominal logic, a first-order theory of names and binding. Inf. Comput. 186 (2), 165193.
Pitts, A. M. (2005) Typed operational reasoning. In Advanced Topics in Types and Programming Languages, Pierce, B. C. (ed). Cambridge, MA: MIT Press, Chap. 7, pp. 245289.
Pitts, A. M. (2006) Alpha-structural recursion and induction. J. ACM 53 (3), 459506.
Pitts, A. M. (2011) Howe's method for higher-order languages. In Advanced Topics in Bisimulation and Coinduction, Sangiorgi, D. & Rutten, J. (eds), Cambridge Tracts in Theoretical Computer Science, vol. 52. Cambridge, UK: Cambridge University Press, Chap. 5, pp. 197232.
Pitts, A. M. & Shinwell, M. R. (2008) Generative unbinding of names. Logical Methods Comput. Sci. 4 (1:4), 133.
Pollack, R., Sato, M. & Ricciotti, W. (2012) A canonical locally named representation of binding. J. Autom. Reasoning 49 (2), 185207.
Poswolsky, A. & Schürmann, C. (2009) System Description: Delphin–-a functional programming language for deductive systems. Proceedings of the International Workshop on Logical Frameworks and Metalanguages: Theory and Practice (LFMTP 2008). Electron. Notes Theor. Comput. Science, 228, 113120.
Pottier, F. (2006) An overview of Cαml. In Proceedings of the 2005 ACM-SIGPLAN Workshop on ML (ML 2005), Benton, N. & Leroy, X. (eds). Philadelphia PA: Elsevier, pp. 2752. (Electron. Notes Theor. Comput. Sci. 148 (2)).
Qi, X. (2009) An Implementation of the Language λProlog Organized Around Higher-order Pattern Unification. PhD thesis, University of Minnesota.
Sato, M. & Pollack, R. (2010) External and internal syntax of the lambda-calculus. J. Symb. Comput. 45, 598616.
Sewell, P., Nardelli, F. Z., Owens, S., Peskine, G., Ridge, T., Sarkar, S. & Strniša, R. (2007) Ott: Effective tool support for the working semanticist. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP 2007), Hinze, R. & Ramsey, N. (eds). New York, NY: ACM Press, pp. 112.
Shinwell, M. R. (2005) The Fresh Approach: Functional Programming with Names and Binders. PhD thesis, University of Cambridge, UK.
Shinwell, M. R. & Pitts, A. M. (2005) On a monadic semantics for freshness. Theor. Comput. Sci. 342 (1), 2855.
Shinwell, M. R., Pitts, A. M. & Gabbay, M. J. (2003) FreshML: Programming with binders made simple. In Proceedings of the 8th ACM SIGPLAN International Conference on Functional Programming (ICFP 2003), Runciman, C. & Shivers, O. (eds). New York, NY: ACM Press, pp. 263274.
Somogyi, Z., Henderson, F. & Conway, T. (1996) The execution algorithm of Mercury, an efficient purely declarative logic programming language. J. Funct. Program. 29 (1–3), 1764.
Tarski, A. (1955) A lattice-theoretical fixpoint theorem and its applications. Pac. J. Math. 5 (2), 285309.
Urban, C. & Cheney, J. (2005) Avoiding equivariance in Alpha-Prolog. In the Proceedings of the 7th International Conference on Typed Lambda Calculus and Applications (TLCA 2005), Urzyczyn, P. (ed), Lecture Notes in Computer Science, no. 3461. Berlin, Germany: Springer-Verlag, pp. 7489.
Urban, C., Pitts, A. M. & Gabbay, M. J. (2004) Nominal unification. Theor. Comput. Sci. 323 (1–3), 473497.
Weirich, S., Yorgey, B. A. & Sheard, T. (2011) Binders unbound. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP 2011), Tokyo, Japan, 19–21 September 2011, Chakravarty, M. M. T., Hu, Z. & Danvy, O. (eds), pp. 333345.

Contextual equivalence for inductive definitions with binders in higher order typed functional programming

  • MATTHEW R. LAKIN (a1) and ANDREW M. PITTS (a1)

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Contextual equivalence for inductive definitions with binders in higher order typed functional programming

  • MATTHEW R. LAKIN (a1) and ANDREW M. PITTS (a1)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *