Write a Blog >>
SPLASH 2019
Sun 20 - Fri 25 October 2019 Athens, Greece

This paper proposes a fluent API generator for Scala, Haskell, and C++. It receives a grammar definition and generates a code skeleton of the library in the host programming language. The generated library is accessed through a chain of method calls; this style of API is called a fluent API. The library uses the host-language type checker to detect an invalid chain of method calls. Each method call is regarded as a lexical token in the embedded domain specific language implemented by that library. A sequence of the lexical tokens is checked and, if the sequence is not acceptable by the grammar, a type error is reported during compilation time. A contribution of this paper is to present an algorithm for generating the code-skeleton for a fluent API that reports a type error when a chain of method calls to the library does not match the given LR grammar. Our algorithm works in Scala, Haskell, and C++. To encode LR parsing, it uses the method/function overloading available in those languages. It does not need an advanced type system, or exponential compilation time or memory consumption. This paper also presents our implementation of the proposed generator.

This program is tentative and subject to change.

Fri 25 Oct

splash-2019-oopsla
11:00 - 12:30: OOPSLA - [THIS SESSION MAY MOVE TO THURSDAY] DSLs and Parsing at Olympia 2
Chair(s): Eric Van WykUniversity of Minnesota, USA
splash-2019-oopsla11:00 - 11:22
Talk
splash-2019-oopsla11:22 - 11:45
Talk
Tetsuro YamazakiGraduate School of Information Science and Technology, The University of Tokyo, Tomoki NakamaruGraduate School of Information Science and Technology, The University of Tokyo, Kazuhiro IchikawaGraduate School of Information Science and Technology, The University of Tokyo, Shigeru ChibaGraduate School of Information Science and Technology, The University of Tokyo
splash-2019-oopsla11:45 - 12:07
Talk
Ian HenriksenThe University of Texas at Austin, Gianfranco BilardiUniversity of Padova, Italy, Keshav PingaliThe University of Texas at Austin