Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3358504.3361227acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Implementing a language with explicit assignment semantics

Published: 22 October 2019 Publication History

Abstract

Anzen is a multi-paradigm programming language that aims to provide explicit and controllable assignment semantics. It is based on the observation that abstractions over memory management and data representation, as commonly adopted by contemporary programming languages, often transpire relics of the underlying memory model and lead to confusing assignment semantics in the presence of aliases. In response, Anzen’s goal is to offer a modern approach to programming, built on a sound and unambiguous semantics.This paper describes the implementation of a compiler for Anzen. Our implementation transpiles sources to an intermediate language inspired by the LLVM IR, designed to ease further analysis on Anzen’s statements. This intermediate representation is then consumed by a register-based virtual machine. We present the Anzen compiler’s architecture, introduce its intermediate language and describe the latter’s evaluation. Our work aims to set a reference implementation for future developments and extensions of the language.

References

[1]
Apple. 2019. The Swift Programming Language. https://github.com/ apple/swift . (2019).
[2]
John Boyland. 2003. Checking Interference with Fractional Permissions. In SAS 2003. Springer, Berlin, Heidelberg, 55–72.
[3]
John Boyland, James Noble, and William Retert. 2001. Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only. In ECOOP 2001. Springer, Berlin, Heidelberg, 2–27.
[4]
Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. 1991. Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems 13, 4 (1991), 451–490.
[5]
Iulian Dragos and Martin Odersky. 2009. Compiling generics through user-directed type specialization. In ICOOOLPS 2009. ACM, New York, NY, USA, 42–47.
[6]
Karel Driesen. 1999. Software and Hardware Techniques for Efficient Polymorphic Calls. Ph.D. Dissertation. University of California, Santa Barbara, CA, USA.
[7]
Nicu G. Fruja. 2004. The Correctness of the Definite Assignment Analysis in C#. Journal of Object Technology 3, 9 (2004), 29–52.
[8]
Colin S. Gordon, Matthew J. Parkinson, Jared Parsons, Aleks Bromfield, and Joe Duffy. 2012. Uniqueness and reference immutability for safe parallelism. In OOPSLA 2012. ACM, New York, NY, USA, 21–40.
[9]
David Gregg, Andrew Beatty, Kevin Casey, Brian Davis, and Andy Nisbet. 2005. The Case for Virtual Register Machines. Science of Computer Programming 57, 3 (2005), 319–338.
[10]
Bastiaan Heeren, Jurriaan Hage, and Doaitse Swierstra. 2002. Generalizing Hindley-Milner Type Inference Algorithms. Technical Report. Institute of Information and Computing Sciences, Utrecht University.
[11]
Mark P. Jones. 1997. First-class Polymorphism with Type Inference. In POPL 1997. ACM, New York, NY, USA, 483–496.
[12]
Chris Lattner and Vikram S. Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In CGO 2004. IEEE, San Jose, CA, USA, 75–88.
[13]
Amit A. Levy, Michael P. Andersen, Bradford Campbell, David E. Culler, Prabal Dutta, Branden Ghena, Philip Levis, and Pat Pannuto. 2015. Ownership is theft: experiences building an embedded OS in rust. In PLOS 2015. ACM, New York, NY, USA, 21–26.
[14]
Niko Matsakis. 2019. Introducing MIR. https://blog.rust-lang.org/2016/ 04/19/MIR.html . (2019). Accessed: 2019-07-27.
[15]
Martin Odersky, Dan Rabin, and Paul Hudak. 1993. Call by Name, Assignment, and the Lambda Calculus. In POPL 1993. ACM, New York, NY, USA, 43–56.
[16]
Benjamin C. Pierce and David N. Turner. 2000. Local type inference. ACM Transactions on Programming Languages and Systems 22, 1 (2000), 1–44.
[17]
Dimitri Racordon and Didier Buchs. 2019. Explicit and Controllable Assignment Semantics. CoRR (2019).
[18]
John C. Reynolds. 1998. Definitional Interpreters for Higher-Order Programming Languages. Higher-Order and Symbolic Computation 11, 4 (1998), 363–397.
[19]
Peter J. Stuckey, Martin Sulzmann, and Jeremy Wazny. 2006. Type Processing by Constraint Reasoning. In APLAS 2006. Springer, Berlin, Heidelberg, 1–25.
[20]
Jesse A. Tov and Riccardo Pucella. 2011. Practical Affine Types. In POPL 2011. ACM, New York, NY, USA, 447–458.
[21]
Danfeng Zhang, Andrew C. Myers, Dimitrios Vytiniotis, and Simon L. Peyton Jones. 2017. SHErrLoc: A Static Holistic Error Locator. ACM Transactions on Programming Languages and Systems 39, 4 (2017), 18:1– 18:47.

Cited By

View all
  • (2021)Patterns for Assignment and Passing Objects Between Contexts in Programming LanguagesProceedings of the 26th European Conference on Pattern Languages of Programs10.1145/3489449.3489975(1-9)Online publication date: 7-Jul-2021

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
VMIL 2019: Proceedings of the 11th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages
October 2019
66 pages
ISBN:9781450369879
DOI:10.1145/3358504
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 October 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. assignment
  2. imperative languages
  3. intermediate language
  4. memory management
  5. virtual machine

Qualifiers

  • Research-article

Conference

SPLASH '19
Sponsor:

Acceptance Rates

Overall Acceptance Rate 4 of 4 submissions, 100%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)2
Reflects downloads up to 13 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2021)Patterns for Assignment and Passing Objects Between Contexts in Programming LanguagesProceedings of the 26th European Conference on Pattern Languages of Programs10.1145/3489449.3489975(1-9)Online publication date: 7-Jul-2021

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media