ABSTRACT
April is a compiler from a subset of the APL language to Common Lisp. To realize a more performant and elegant APL implementation, April now defers the evaluation of certain types of input. This means that the compiler produces code building a tree of "virtual arrays" – objects that represent arrays not yet computed. The object tree's methods are called to write an output array to memory, which may involve performing a second stage of compilation to build an efficient array-generating kernel with the option to emit assembly code for high speed. This evaluation model enables high performance and its component functions can be elegantly specified thanks to the object-oriented programming faculties of Common Lisp.
- Philip S. Abrams. 1970. An APL Machine (SLAC Report, Vol. 114). Stanford University, Stanford, CA. Google Scholar
- Linda G. DeMichiel and Richard P. Gabriel. 1987. The Common Lisp Object System: An Overview. In Proceedings of the European Conference on Object-Oriented Programming, Jean Bézivin, Jean-Marie Hullot, Pierre Cointe, and Henry Lieberman (Eds.) (ECOOP ’87, Vol. 1). Springer Berlin, Heidelberg, Germany. 151–170. https://doi.org/10.1007/3-540-47891-4 Google ScholarCross Ref
- Elizabeth Gibney. 2022. How many yottabytes in a quettabyte? Extreme numbers get new names. Nature, Nov., https://doi.org/10.1038/d41586-022-03747-9 Google ScholarCross Ref
- Paul Graham. 1993. On Lisp. Prentice Hall, New York, NY. 224–229. http://www.paulgraham.com/onlisptext.html Google Scholar
- John T. Hancock and Taghi M. Khoshgoftaar. 2020. Survey on categorical data for neural networks. Journal of Big Data, 7, 1 (2020), 10 Apr, 41. issn:2196-1115 https://doi.org/10.1186/s40537-020-00305-w Google ScholarCross Ref
- Troels Henriksen. 2017. Design and Implementation of the Futhark Programming Language. University of Copenhagen, Faculty of Science Department of Computer Science, Copenhagen. https://di.ku.dk/english/research/phd/phd-theses/2017/Troels_Henriksen_thesis.pdf Google Scholar
- Troels Henriksen and Cosmin Eugen Oancea. 2013. A T2 Graph-Reduction Approach to Fusion. In Proceedings of the 2nd ACM SIGPLAN Workshop on Functional High-Performance Computing (FHPC ’13). Association for Computing Machinery, New York, NY, USA. 47–58. isbn:9781450323819 https://doi.org/10.1145/2502323.2502328 Google ScholarDigital Library
- Steven G. Johnson. 2017. More Dots: Syntactic Loop Fusion in Julia. https://julialang.org/blog/2017/01/moredots/ Google Scholar
- Ronald L. Johnston. 1979. The Dynamic Incremental Compiler of APL\ 3000. SIGAPL APL Quote Quad, 9, 4-P1 (1979), May, 82–87. issn:0163-6006 https://doi.org/10.1145/390009.804442 Google ScholarDigital Library
- Alan Kay. 1998. Re: prototypes vs classes was: Re: Sun’s HotSpot. http://wiki.c2.com/?AlanKayOnMessaging Google Scholar
- Paul Khuong. 2014. How to define new intrinsics in SBCL. https://pvk.ca/Blog/2014/08/16/how-to-define-new-intrinsics-in-sbcl/ Google Scholar
- Morten Kromberg. 2017. Beauty and the Beast. https://www.dyalog.com/blog/2017/03/beauty-and-the-beast/ Google Scholar
- Nuno P. Lopes. 2023. Torchy: A Tracing JIT Compiler for PyTorch. In Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction (CC 2023). Association for Computing Machinery, New York, NY, USA. 98–109. isbn:9798400700880 https://doi.org/10.1145/3578360.3580266 Google ScholarDigital Library
- APL Products and Services. 2016. APL2 Language Summary. IBM Silicon Valley Laboratory, San Jose, CA. 223. Google Scholar
- Sven-Bodo Scholz. 1998. With-loop-folding in Sac – condensing consecutive array operations. In Proceedings of the 9th International Workshop on Implementation of Functional Languages, Chris Clack, Kevin Hammond, and Tony Davie (Eds.) (IFL ’97, LNCS vol. 1467). Springer Berlin Heidelberg, Berlin, Heidelberg. 72–91. isbn:978-3-540-68528-9 https://doi.org/10.1007/BFb0055425 Google ScholarCross Ref
- Andrew Sengul. 2022. April: APL Compiling to Common Lisp. In Proceedings of the European Lisp Symposium (ELS ’22). ACM, New York, NY, USA. 5 pages. https://doi.org/10.5281/zenodo.6381963 Google ScholarCross Ref
Index Terms
- Faster APL with Lazy Extensions
Recommendations
Compiling a Subset of APL Into a Typed Intermediate Language
ARRAY'14: Proceedings of ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array ProgrammingWe present a compiler and a typed intermediate language for a subset of APL. The intermediate language treats all numeric data as multi-dimensional arrays and the type system makes explicit the ranks of arrays. Primitive operators are polymorphic in ...
Towards a jitting VM for prolog execution
PPDP '10: Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programmingMost Prolog implementations are implemented in low-level languages such as C and are based on a variation of the WAM instruction set, which enhances their performance but makes them hard to write. In addition, many of the more dynamic features of Prolog ...
Comments