Ad-hoc polymorphic delimited continuations
- URL: http://arxiv.org/abs/2307.16073v1
- Date: Sat, 29 Jul 2023 20:46:35 GMT
- Title: Ad-hoc polymorphic delimited continuations
- Abstract summary: First-class language features in other programming languages can be implemented as libraries with the help of our framework.
The core concept in our framework is the type class Dsl, which can be considered as both the ad-hoc polymorphic continuation and a more generic version of Monad.
- Score: 4.12935843184402
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: We designed and implemented a framework for creating extensible
domain-specific languages that consists of library-defined keywords.
First-class language features in other programming languages can be implemented
as libraries with the help of our framework. The core concept in our framework
is the type class Dsl, which can be considered as both the ad-hoc polymorphic
version of a delimited continuation and a more generic version of Monad. Thus
it can be also used as a statically typed extensible effect system that is more
efficient and more concise than existing Monad-based effect systems.
Related papers
- MorfFlex: Handling Rich Morphology [1.4766181043669164]
We present MorfFlex, a morphological dictionary architecture suitable for languages with extensive regularity in both inflection and derivation.<n>As the primary example of MorfFlex in use we introduce MorfFlex CZ, a morphological dictionary of Czech.<n>It is distributed as a simple, unstructured list of wordform, lemma, tag> triplets, however, its manually maintained, unpublished source files and conversion scripts encode a sophisticated system of inflectional and derivational patterns.
arXiv Detail & Related papers (2026-06-23T09:56:58Z) - NeSyCat: A Monad-Based Categorical Semantics of the Neurosymbolic ULLER Framework [0.0]
ULLER (Unified Language for LEarning and Reasoning) offers a unified first-order logic (FOL) syntax.<n>The original specification endows this syntax with three pairwise independent semantics: classical, fuzzy, and probabilistic.<n>We show that these seemingly disparate semantics are all instances of one categorical framework based on monads.
arXiv Detail & Related papers (2026-04-27T15:40:15Z) - Ensembling Language Models with Sequential Monte Carlo [48.149136054981334]
We introduce a unified framework for composing $K$ language models into $f$-ensemble distributions.<n>We show that better posterior approximations can yield better ensemble performance.
arXiv Detail & Related papers (2026-03-05T17:54:31Z) - AnCoder: Anchored Code Generation via Discrete Diffusion Models [36.226700922319075]
Diffusion language models offer a compelling alternative to autoregressive code generation.<n>We introduce AnchorTree, a framework that anchors the diffusion process using structured, hierarchical priors native to code.<n>We validate this framework via AnCoder, a family of models showing that structurally anchored diffusion offers a parameter-efficient path to high-quality code generation.
arXiv Detail & Related papers (2026-02-05T22:46:43Z) - Multilingual Grammatical Error Annotation: Combining Language-Agnostic Framework with Language-Specific Flexibility [4.524074577209036]
We introduce a standardized, modular framework for multilingual grammatical error annotation.<n>Our approach combines a language-agnostic foundation with structured language-specific extensions, enabling consistency and flexibility across languages.<n>This work supports scalable and interpretable GEC annotation across languages and promotes more consistent evaluation in multilingual settings.
arXiv Detail & Related papers (2025-06-09T13:01:19Z) - Type-Constrained Code Generation with Language Models [51.03439021895432]
Large language models (LLMs) produce uncompilable output because their next-token inference procedure does not model formal aspects of code.
We introduce a type-constrained decoding approach that leverages type systems to guide code generation.
Our approach reduces compilation errors by more than half and increases functional correctness in code synthesis, translation, and repair tasks.
arXiv Detail & Related papers (2025-04-12T15:03:00Z) - ULLME: A Unified Framework for Large Language Model Embeddings with Generation-Augmented Learning [72.90823351726374]
We introduce the Unified framework for Large Language Model Embedding (ULLME), a flexible, plug-and-play implementation that enables bidirectional attention across various LLMs.
We also propose Generation-augmented Representation Learning (GRL), a novel fine-tuning method to boost LLMs for text embedding tasks.
To showcase our framework's flexibility and effectiveness, we release three pre-trained models from ULLME with different backbone architectures.
arXiv Detail & Related papers (2024-08-06T18:53:54Z) - DocCGen: Document-based Controlled Code Generation [33.19206322891497]
DocCGen is a framework that can leverage rich knowledge by breaking the NL-to-Code generation task for structured code languages into a two-step process.
Our experiments show that DocCGen consistently improves different-sized language models across all six evaluation metrics.
arXiv Detail & Related papers (2024-06-17T08:34:57Z) - A Compositional Typed Semantics for Universal Dependencies [26.65442947858347]
We introduce UD Type Calculus, a compositional, principled, and language-independent system of semantic types and logical forms for lexical items.
We explain the essential features of UD Type Calculus, which all involve giving dependency relations denotations just like those of words.
We present results on a large existing corpus of sentences and their logical forms, showing that UD-TC can produce meanings comparable with our baseline.
arXiv Detail & Related papers (2024-03-02T11:58:24Z) - LISA++: An Improved Baseline for Reasoning Segmentation with Large
Language Model [54.850048630298495]
We introduce LISA++, an update to the existing LISA model, focusing on improving core functionalities while keeping the base architecture intact.
The instance segmentation ability has been added, providing a more detailed scene analysis along with the existing multi-region semantic segmentation.
These improvements are achieved by curating existing samples of generic segmentation datasets aimed specifically at enhancing the segmentation and conversational skills without structural change and additional data sources.
arXiv Detail & Related papers (2023-12-28T18:58:33Z) - OFA: A Framework of Initializing Unseen Subword Embeddings for Efficient Large-scale Multilingual Continued Pretraining [49.213120730582354]
Instead of pretraining multilingual language models from scratch, a more efficient method is to adapt existing pretrained language models (PLMs) to new languages via vocabulary extension and continued pretraining.
We propose a novel framework: $textbfO$ne $textbfF$or $textbfA$ll, which wisely initializes the embeddings of unseen subwords and thus can adapt a PLM to multiple languages efficiently and effectively.
arXiv Detail & Related papers (2023-11-15T10:40:45Z) - Efficient Guided Generation for Large Language Models [0.21485350418225244]
We show how the problem of neural text generation can be constructively reformulated in terms of transitions between the states of a finite-state machine.
This framework leads to an efficient approach to guiding text generation with regular expressions and context-free grammars.
arXiv Detail & Related papers (2023-07-19T01:14:49Z) - Soft Language Clustering for Multilingual Model Pre-training [57.18058739931463]
We propose XLM-P, which contextually retrieves prompts as flexible guidance for encoding instances conditionally.
Our XLM-P enables (1) lightweight modeling of language-invariant and language-specific knowledge across languages, and (2) easy integration with other multilingual pre-training methods.
arXiv Detail & Related papers (2023-06-13T08:08:08Z) - Efficient Spoken Language Recognition via Multilabel Classification [53.662747523872305]
We show that our models obtain competitive results while being orders of magnitude smaller and faster than current state-of-the-art methods.
Our multilabel strategy is more robust to unseen non-target languages compared to multiclass classification.
arXiv Detail & Related papers (2023-06-02T23:04:19Z) - CodePod: A Language-Agnostic Hierarchical Scoping System for Interactive Development [9.607679924449748]
We present CodePod, a hierarchical extension of Jupyter that introduces a novel scoped execution model with formal semantics.<n>Our key contribution is a language-agnostic runtime system that performs source-level transformations to implement hierarchical scoping rules.
arXiv Detail & Related papers (2023-01-06T07:48:51Z) - Language-Agnostic Representation Learning of Source Code from Structure
and Context [43.99281651828355]
We propose a new model, which jointly learns on Context and Structure of source code.
We show that jointly training on non-parallel data from multiple programming languages improves results on all individual languages.
arXiv Detail & Related papers (2021-03-21T06:46:06Z) - UNKs Everywhere: Adapting Multilingual Language Models to New Scripts [103.79021395138423]
Massively multilingual language models such as multilingual BERT (mBERT) and XLM-R offer state-of-the-art cross-lingual transfer performance on a range of NLP tasks.
Due to their limited capacity and large differences in pretraining data, there is a profound performance gap between resource-rich and resource-poor target languages.
We propose novel data-efficient methods that enable quick and effective adaptation of pretrained multilingual models to such low-resource languages and unseen scripts.
arXiv Detail & Related papers (2020-12-31T11:37:28Z) - A framework for a modular multi-concept lexicographic closure semantics [0.0]
We define a modular multi-concept extension of the lexicographic closure semantics for defeasible description logics with typicality.
The idea is that of distributing the defeasible properties of concepts into different modules, according to their subject, and of defining a notion of preference for each module based on the lexicographic closure semantics.
The preferential semantics of the knowledge base can then be defined as a combination of the preferences of the single modules.
arXiv Detail & Related papers (2020-09-02T11:41:38Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.