Yukiyoshi Kameyama

dblp:81/6507 · DBLP profile ↗
← Back
25ranked-venue papers
8as first author
5since 2021 · last 2025
0000-0002-2693-5133ORCID · verified

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 22 · 7 first-author · 5 since 2021Theory of computation · 3 · 2 first-authorApplied, interdisciplinary, general and emerging computing · 1
YearPublicationVenuePosition
2025 Expressive Power of One-Shot Control Operators and Coroutines
Kentaro Kobayashi, Yukiyoshi Kameyama
APLAS2
2025 Staged Gradual Typing
abstract
Staging dynamically typed programming languages safely is a challenge, as the programming-language support for staged computation typically relies on static type systems. To solve this problem, we propose a staged gradual type system that seamlessly integrates static and dynamic typing with staged computation. Our system combines the basic gradual type system and the let-polymorphic staged type system for run-time code generation safely. We discuss the design and issues in developing the calculus, and present a type system and operational semantics via a translation to a cast calculus where dynamic type checking is made explicit. We also show several applications, such as lightweight stage polymorphism.
Hiroto Yaguchi, Yukiyoshi Kameyama
GPCE2
2024 Type-Safe Code Generation with Algebraic Effects and Handlers
abstract
Staged computation is a means to achieve maintainability and high performance simultaneously, by allowing a programmer to express domain-specific optimizations in a high-level programming language. Multi-stage programming languages such as MetaOCaml provide a static safety guarantee for generated programs by sophisticated type systems provided that program generators have no computational effects. Despite several studies, it remains a challenging problem to design a type-safe multi-stage programming language with advanced features for computational effects. This paper introduces a two-stage programming language with algebraic effects and handlers. Based on two novel principles 'handlers as future-stage binders' and 'handlers are universal', we design a type system and prove its soundness. We also show that our language is sufficiently expressive to write various effectful staged computations including multi-level let-insertion, which is a key technique to avoid code duplication in staged computation.
Kanaru Isoda, Ayato Yokoyama, Yukiyoshi Kameyama
GPCE3
2024 Program generation meets program verification: A case study on number-theoretic transform
abstract
Program generation allows us to produce high-performance code specialized to each application domain. Although it has made great success in various domains, it remains to be seen whether it is effective for cryptography where the correctness of programs is indispensable. This work presents a unified approach to program generation, analysis and verification. Our target is Number-Theoretic Transform (NTT), a key building block of several candidates in Post Quantum Cryptography. We develop a program-generation framework based on the typed tagless-final style, and obtained highly efficient implementations with vector instructions such as AVX2 and AVX-512. The framework allows us to implement a program analyzer for integer-overflow analysis. By combining a brute-force analysis with the standard static interval analysis, we have obtained more precise results than the state-of-the-art static analyzer, which let us find a new optimization. We have verified the generated program using the framework. While verifying the generated program all at once is intractable, we can separately verify the low-level components and the high-level algorithm, thanks to the compositional nature of our program generator. We have used an SMT solver for the former and a custom symbolic interpreter for the latter to prove the functional correctness of the generated program successfully.
Masahiro Masuda, Yukiyoshi Kameyama
Sci. Comput. Program.2
2021 Type-safe generation of modules in applicative and generative styles
abstract
The MetaML approach for multi-stage programming provides the static guarantee of type safety and scope safety for generated code, regardless of the values of static parameters. Modules are indispensable to build large-scale programs in ML-like languages, however, they have a performance problem. To solve this problem, several languages proposed recently allow one to generate ML-style modules. Unfortunately, those languages had the problems of limited expressiveness, incomplete proofs, and code explosion.
Yuhi Sato, Yukiyoshi Kameyama
GPCE2
2020 Reorganizing queries with grouping
abstract
Language-integrated query has attracted much attention from researchers and engineers. It enables one to write a database query with high-level abstractions, which makes it possible to compose, iterate, and reuse queries. An important issue in language-integrated query is the N+1 query problem, and Cheney et al. proposed a program-transformation approach to solve it for a core language of Microsoft’s LINQ. In our previous work, we extended their language to grouping (GROUP BY in SQL) and aggregate functions, and showed that any term can be transformed to a single SQL query. It still has a problem in that the resulting queries may be unnecessarily large and inefficient.
Rui Okura, Yukiyoshi Kameyama
GPCE2
2018 Program generation for ML modules (short paper)
abstract
Program generation has been successful in various domains which need high performance and high productivity. Yet, programming-language supports for program generation need further improvement. An important omission is the functionality of generating modules in a type safe way. Inoue et al. have addressed this issue in 2016, but investigated only a few examples. We propose a language as an extension of (a small subset of) MetaOCaml in which one can manipulate and generate code of a module, and implement it based on a simple translation to MetaOCaml. We show that our language solves the performance problem in functor applications pointed out by Inoue et al., and that it provides a suitable basis for writing code generators for modules.
Takahisa Watanabe, Yukiyoshi Kameyama
PEPM2
2017 Staging with control: type-safe multi-stage programming with control operators
abstract
Staging allows a programmer to write domain-specific, custom code generators. Ideally, a programming language for staging provides all necessary features for staging, and at the same time, gives static guarantee for the safety properties of generated code including well typedness and well scopedness. We address this classic problem for the language with control operators, which allow code optimizations in a modular and compact way. Specifically, we design a staged programming language with the expressive control operators shift0 and reset0, which let us express, for instance, multi-layer let-insertion, while keeping the static guarantee of well typedness and well scopedness. For this purpose, we extend our earlier work on refined environment classifiers which were introduced for the staging language with state. We show that our language is expressive enough to express interesting code generation techniques, and that the type system enjoys type soundness. We also mention a type inference algorithm for our language under reasonable restriction.
Junpei Oishi, Yukiyoshi Kameyama
GPCE2
2016 Refined Environment Classifiers - Type- and Scope-Safe Code Generation with Mutable Cells
Oleg Kiselyov, Yukiyoshi Kameyama, Yuto Sudo
APLAS2
2016 Staging beyond terms: prospects and challenges
abstract
Staging is a program generation paradigm with a clean, well-investigated semantics which statically ensures that the generated code is always well-typed and well-scoped. Staging is often used for specializing programs to the known properties or parts of data to improve efficiency, but so far it has been limited to generating terms. This short paper describes our ongoing work on extending staging, with its strong safety guarantees, to generation of non-terms, focusing on ML-style modules. The purpose is to map out the promises and challenges, then to pose a question to solicit the community's expertise in evaluating how essential our extensions are for the purpose of applying staging beyond the realm of terms. We demonstrate our extensions' use in specializing functor applications to eliminate its (currently large) overhead in OCaml. We explain the challenges that those extensions bring in and identify a promising line of attack. Unexpectedly, however, it turns out that we can avoid module generation altogether by representing modules, possibly containing abstract types, as polymorphic records. With the help of first-class modules, module specialization reduces to ordinary term specialization, which can be done with conventional staging. The extent to which this hack generalizes is unclear. Thus we have a question to the community: is there a compelling use case for module generation? With these insights and questions, we offer a starting point for a long-term program in the next stage of staging research.
Jun Inoue 0001, Oleg Kiselyov, Yukiyoshi Kameyama
PEPM3
2016 Finally, safely-extensible and efficient language-integrated query
abstract
Language-integrated query is an embedding of database queries into a host language to code queries at a higher level than the all-to-common concatenation of strings of SQL fragments. The eventually produced SQL is ensured to be well-formed and well-typed, and hence free from the embarrassing (security) problems. Language-integrated query takes advantage of the host language's functional and modular abstractions to compose and reuse queries and build query libraries. Furthermore, language-integrated query systems like T-LINQ generate efficient SQL, by applying a number of program transformations to the embedded query. Alas, the set of transformation rules is not designed to be extensible. We demonstrate a new technique of integrating database queries into a typed functional programming language, so to write well-typed, composable queries and execute them efficiently on any SQL back-end as well as on an in-memory noSQL store. A distinct feature of our framework is that both the query language as well as the transformation rules needed to generate efficient SQL are safely user-extensible, to account for many variations in the SQL back-ends, as well for domain-specific knowledge. The transformation rules are guaranteed to be type-preserving and hygienic by their very construction. They can be built from separately developed and reusable parts and arbitrarily composed into optimization pipelines. With this technique we have embedded into OCaml a relational query language that supports a very large subset of SQL including grouping and aggregation. Its types cover the complete set of intricate SQL behaviors.
Kenichi Suzuki, Oleg Kiselyov, Yukiyoshi Kameyama
PEPM3
2015 Combinators for impure yet hygienic code generation
Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
Sci. Comput. Program.1
2014 Combinators for impure yet hygienic code generation
abstract
Code generation is the leading approach to making high-performance software reusable. Effects are indispensable in code generators, whether to report failures or to insert let-statements and if-guards. Extensive painful experience shows that unrestricted effects interact with generated binders in undesirable ways to produce unexpectedly unbound variables, or worse, unexpectedly bound ones. These subtleties hinder domain experts in using and extending the generator. A pressing problem is thus to express the desired effects while regulating them so that the generated code is correct, or at least correctly scoped, by construction.
Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
PEPM1
2013 Shonan challenge for generative programming: short position paper
abstract
The appeal of generative programming is "abstraction without guilt": eliminating the vexing trade-off between writing high-level code and highly-performant code. Generative programming also promises to formally capture the domain-specific knowledge and heuristics used by high-performance computing (HPC)experts. How far along are we in fulfilling these promises? To gauge our progress, a recent Shonan Meeting on "bridging the theory of staged programming languages and the practice of high-performance computing" proposed to use a set of benchmarks, dubbed "Shonan Challenge".
Baris Aktemur, Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
PEPM2
2011 Polymorphic Multi-stage Language with Control Effects
Yuichiro Kokaji, Yukiyoshi Kameyama
APLAS2
2011 Shifting the stage - Staging with delimited control
abstract
Abstract It is often hard to write programs that are efficient yet reusable. For example, an efficient implementation of Gaussian elimination should be specialized to the structure and known static properties of the input matrix. The most profitable optimizations, such as choosing the best pivoting or memoization, cannot be expected of even an advanced compiler because they are specific to the domain, but expressing these optimizations directly makes for ungainly source code. Instead, a promising and popular way to reconcile efficiency with reusability is for a domain expert to write code generators. Two pillars of this approach are types and effects. Typed multilevel languages such as MetaOCaml ensure safety and early error reporting: a well-typed code generator neither goes wrong nor generates code that goes wrong. Side effects such as state and control ease correctness and expressivity : An effectful generator can resemble the textbook presentation of an algorithm, as is familiar to domain experts, yet insert let for memoization and if for bounds checking, as is necessary for efficiency. Together, types and effects enable structuring code generators as compositions of modules with well-defined interfaces, and hence scaling to large programs. However, blindly adding effects renders multilevel types unsound. We introduce the first multilevel calculus with control effects and a sound type system. We give small-step operational semantics as well as a one-pass continuation-passing-style translation. For soundness, our calculus restricts the code generator's effects to the scope of generated binders. Even with this restriction, we can finally write efficient code generators for dynamic programming and numerical methods in direct style, like in algorithm textbooks, rather than in continuation-passing or monadic style.
Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
J. Funct. Program.1
2011 Type checking and typability in domain-free lambda calculi
Koji Nakazawa, Makoto Tatsuta, Yukiyoshi Kameyama
Theor. Comput. Sci.3
2010 Equational axiomatization of call-by-name delimited control
abstract
Control operators for delimited continuations are useful in various fields such as partial evaluation, CPS translation, and representation of monadic effects. While many works in the literature study them in call-by-value, several recent works have shown call-by-name delimited control operators are also worth studying.
Yukiyoshi Kameyama, Asami Tanaka
PPDP1
2009 Shifting the stage: staging with delimited control
abstract
It is often hard to write programs that are efficient yet reusable. For example, an efficient implementation of Gaussian elimination should be specialized to the structure and known static properties of the input matrix. The most profitable optimizations, such as choosing the best pivoting or memoization, cannot be expected of even an advanced compiler because they are specific to the domain, but expressing these optimizations directly makes for ungainly source code. Instead, a promising and popular way to reconcile efficiency with reusability is for a domain expert to write code generators.
Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
PEPM1
2008 A Direct Algorithm for Multi-valued Bounded Model Checking
Jefferson O. Andrade, Yukiyoshi Kameyama
ATVA2
2008 Closing the stage: from staged code to typed closures
abstract
Code generation lets us write well-abstracted programs without performance penalty. Writing a correct code generator is easier than building a full-scale compiler but still hard. Typed multistage languages such as MetaOCaml help in two ways: they provide simple annotations to express code generation, and they assure that the generated code is well-typed and well-scoped. Unfortunately, the assurance only holds without side effects such as state and control. Without effects, generators often have to be written in a continuation-passing or monadic style that has proved inconvenient. It is thus a pressing open problem to combine effects with staging in a sound type system.
Yukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan
PEPM1
2008 Calculi of meta-variables
Masahiko Sato 0001, Takafumi Sakurai, Yukiyoshi Kameyama, Atsushi Igarashi
Frontiers Comput. Sci. China3
2007 Polymorphic Delimited Continuations
Kenichi Asai, Yukiyoshi Kameyama
APLAS2
2003 A sound and complete axiomatization of delimited continuations
abstract
The shift and reset operators, proposed by Danvy and Filinski, are powerful control primitives for capturing delimited continuations. Delimited continuation is a similar concept as the standard (unlimited) continuation, but it represents part of the rest of the computation, rather than the whole rest of computation. In the literature, the semantics of shift and reset has been given by a CPS-translation only. This paper gives a direct axiomatization of calculus with shift and reset, namely, we introduce a set of equations, and prove that it is sound and complete with respect to the CPS-translation. We also introduce a calculus with control operators which is as expressive as the calculus with shift and reset, has a sound and complete axiomatization, and is conservative over Sabry and Felleisen's theory for first-class continuations.
Yukiyoshi Kameyama, Masahito Hasegawa
ICFP1
2002 Strong normalizability of the non-deterministic catch/throw calculi
Yukiyoshi Kameyama, Masahiko Sato 0001
Theor. Comput. Sci.1