Compilation of Coordinated Choice

04/29/2020
by   Yuki Nishida, et al.
0

Recently, we have proposed coordinated choices, which are nondeterministic choices equipped with names. The main characteristic of coordinated choices is that they synchronize nondeterministic decision among choices of the same name. The motivation of the synchronization mechanism is to solve a theoretical problem. So, as a practical programming language, we still want to use coordinated choices like standard ones. In other words, we want to avoid synchronization. Now, there are two problems: (i) practically, it is a bit complicated work to write a program using coordinated choices in which execution synchronization never happens; and (ii) theoretically, it is unknown whether any programs using standard choices can be written by using only coordinated ones. In this paper, we define two simply typed lambda calculi called λ^∥ equipped with standard choices and λ^∥ω equipped with coordinated choices, and give compilation rules from the former into the latter. The challenge is to show the correctness of the compilation because behavioral correspondence between expressions before and after compiling cannot be defined directly by the compilation rules. For the challenge, we give an effect system for λ^∥ω that characterizes expressions in which execution synchronization never happens. Then, we show that all compiled expressions can be typed by the effect system. As a result, we can easily show the correctness because the main concern of the correctness is whether synchronization happens or not.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/30/2022

Fence Synthesis under the C11 Memory Model

The C/C++11 (C11) standard offers a spectrum of ordering guarantees on m...
research
07/28/2023

QbC: Quantum Correctness by Construction

Thanks to the rapid progress and growing complexity of quantum algorithm...
research
10/10/2022

Data Synchronization: A Complete Theoretical Solution for Filesystems

Data reconciliation in general, and filesystem synchronization in partic...
research
05/29/2020

Avoiding Unnecessary Information Loss: Correct and Efficient Model Synchronization Based on Triple Graph Grammars

Model synchronization, i.e., the task of restoring consistency between t...
research
04/12/2022

Traits for Correct-by-Construction Programming

We demonstrate that traits are a natural way to support correctness-by-c...
research
03/29/2022

On Reinforcement Learning, Effect Handlers, and the State Monad

We study the algebraic effects and handlers as a way to support decision...

Please sign up or login with your details

Forgot password? Click here to reset