skip to main content
10.1145/3457784.3457798acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicscaConference Proceedingsconference-collections
research-article

Untyped lambda calculus with functionally referable environments

Published:30 July 2021Publication History

ABSTRACT

The environment is the relationship between variables and their bound values during program execution and is a notion in program semantics. A first-class environment is a mechanism that allows the environment to be treated like data, such as integer values or Boolean values, and can be passed to a function as an argument or received as a return value. The environment calculus is a formal computational system proposed by Nishizaki and is a lambda calculus that extends the first-class environment mechanism. The formulation of the environment was based on explicit substitution by Curien et al., who viewed the environment as a substitution. The operational semantics of the environmental calculus, or the reduction, is based on the reduction of the lambda-sigma calculus. In the calculus, there are two constructs for first-class environments: one is the identity environment to reify the current environment, that is, to transfer a meta-level environment to object-level data; the other is the environment composition to reflect the object-level environment data, that is, to transfer object-level environment data back to a meta-level environment. In this paper, instead of the environment composition, we propose a new interface with a first-class environment, a functionally referable environment. If object-level environment data is given as an argument for a function application, the functional reflection brings the environment back to the meta-level and makes the lambda term evaluable under that environment. Using the functionally referable environment, one can unify the environment composition with the function application. We define the untyped lambda calculus with functionally referable environments: we give the syntax of the calculus and its reduction. Then we provide the semantics for the reduction using a translation of the environment calculus into the record calculus. We prove the soundness of the translation semantics. Finally, we discuss the evaluation strategy, especially the call-by-value reduction.

References

  1. M. Abadi, L. Cardelli, P-.L. Curien, and J.-J. Lévy. 1991. Explicit Substitutions. Journal of Functional Programming 1, 4 (October 1991), 375–416.Google ScholarGoogle ScholarCross RefCross Ref
  2. Yuta Aoyagi and Shin-ya Nishizaki. 2018. Untyped Call-by-Value Calculus with First-Class Continuations and Environments. In Theory and Practice of Computation. World Scientific, 101–117. doi:10.1142/9789813279674_0008.Google ScholarGoogle Scholar
  3. H. P. Barendregt. 2013. The Lambda Calculus: Its Sytax and Semantics Revised Edition. North Holland.Google ScholarGoogle Scholar
  4. Carl A. Gunter. 1992. Semantics of Programming Lanuages: Structures and Techniques. The MIT Press.Google ScholarGoogle Scholar
  5. Oliver Laumann. [n.d.]. Elk – The Extension Language Kit Scheme Reference. http://www-rn.informatik.uni-bremen.de/software/elk/doc.html.Google ScholarGoogle Scholar
  6. S. Nishizaki. 1995. Simply Typed Lambda Calculus with First-class Environments. Publications of Research Institute for Mathematical Sciences Kyoto University 30, 6 (1995), 1055–1121.Google ScholarGoogle ScholarCross RefCross Ref
  7. Shin-ya Nishizaki. 2000. A Polymorphic Environment Calculus and its Type Inference Algorithm. Higher-Order and Symbolic Computation 13 (2000), 239–278.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Shin-ya Nishizaki. 2013. Evaluation Strategy and Translation of Environment Calculus. In Information Computing and Applications. Springer Berlin Heidelberg, 232–242.Google ScholarGoogle Scholar
  9. Shin-ya Nishizaki. 2019. Simple type system for call-by-value calculus with first-class continuations and ennvironments. In Theory and Practice of Computation. CRC Press, 119–130.Google ScholarGoogle Scholar
  10. S. Nishizaki and Mizuki Fujii. 2012. Strong reduction for typed lambda calculus with first-class environments. In Lecture Notes in Computer Science, Vol. 7473. Springer-Verlag Berlin Heidelberg, 632–639.Google ScholarGoogle Scholar
  11. Masahiko Sato, Takafumi Sakurai, and Yukiyoshi Kameyama. 2002. A Simply Typed Context Calculus with First-Class Environments. The Journal of Functional and Logic Programming 2002, 3(2002), 1–41.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Other conferences
    ICSCA '21: Proceedings of the 2021 10th International Conference on Software and Computer Applications
    February 2021
    325 pages
    ISBN:9781450388825
    DOI:10.1145/3457784

    Copyright © 2021 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 30 July 2021

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
    • Research
    • Refereed limited

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format .

View HTML Format