Skip to content

Embedding by Unembedding #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Embedding by Unembedding #244

merged 2 commits into from
Jan 24, 2025

Conversation

github-actions[bot]
Copy link
Contributor

This paper was randomly selected as your next reading.

Embedding by Unembedding

Embedding is a language development technique that implements the object language as a library in a host language. There are many advantages of the approach, including being lightweight and the ability to inherit features of the host language. A notable example is the technique of HOAS, which makes crucial use of higherorder functions to represent abstract syntax trees with binders. Despite its popularity, HOAS has its limitations. We observe that HOAS struggles with semantic domains that cannot be naturally expressed as functions, particularly when open expressions are involved. Prominent examples of this include incremental computation and reversiblebidirectional languages. In this paper, we pinpoint the challenge faced by HOAS as a mismatch between the semantic domain of host and object language functions, and propose a solution. The solution is based on the technique of unembedding , which converts from the finallytagless representation to de Bruijnindexed terms with strong correctness guarantees. We show that this approach is able to extend the applicability of HOAS while preserving its elegance. We provide a generic strategy for Embedding by Unembedding, and then demonstrate

Matsuda, Kazutaka, et al. “Embedding by Unembedding. Proceedings of the ACM on Programming Languages, vol. 7, no. ICFP, Aug. 2023, pp. 147. Crossref, https://doi.org/10.1145/3607830.

Merge this PR to apply selection.

@github-actions github-actions bot added next-paper paper-vote next paper vote option labels Jan 22, 2025
@phanukaev phanukaev merged commit ab7217d into main Jan 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-paper paper-vote next paper vote option
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants