English
Related papers

Related papers: Generic Programming in OCaml

200 papers

The concept of functionality oriented programming is proposed, and some of its aspects are discussed, such as: (1) implementation independent basic types and generic collection types; (2) syntax requirements and recommendations for…

Programming Languages · Computer Science 2011-02-21 Chengpu Wang

Implicit heterogeneous metaprogramming (a.k.a. offshoring) is an attractive approach for generating C with some correctness guarantees: generate OCaml code, where the correctness guarantees are easier to establish, and then map that code to…

Programming Languages · Computer Science 2022-11-09 Oleg Kiselyov

We revisit occurrence typing, a technique to refine the type of variables occurring in type-cases and, thus, capturesome programming patterns used in untyped languages. Although occurrence typing was tied from its inceptionto set-theoretic…

Programming Languages · Computer Science 2022-02-25 Giuseppe Castagna , Victor Lanvin , Mickaël Laurent , Kim Nguyen

In this paper we describe a new approach to programming which generalizes object-oriented programming. It is based on using a new programming construct, called concept, which generalizes classes. Concept is defined as a pair of two classes:…

Programming Languages · Computer Science 2008-01-03 Alexandr Savinov

Recent years have seen important advances in the building of interpretable models, machine learning models that are designed to be easily understood by humans. In this work, we show that large language models (LLMs) are remarkably good at…

Machine Learning · Computer Science 2024-02-23 Sebastian Bordt , Ben Lengerich , Harsha Nori , Rich Caruana

Flow-sensitive type systems offer an elegant way to ensure memory-safety in programming languages. Unfortunately, their adoption in new or existing languages is often hindered by a painful effort to implement or integrate them into…

Programming Languages · Computer Science 2021-06-24 Dimitri Racordon , Aurélien Coet , Didier Buchs

A generally intelligent learner should generalize to more complex tasks than it has previously encountered, but the two common paradigms in machine learning -- either training a separate learner per task or training a single learner for all…

Machine Learning · Computer Science 2019-05-09 Michael B. Chang , Abhishek Gupta , Sergey Levine , Thomas L. Griffiths

Liquid Haskell's refinement-reflection feature augments the Haskell language with theorem proving capabilities, allowing programmers to retrofit their existing code with proofs. But many of these proofs require routine, boilerplate code…

Programming Languages · Computer Science 2017-08-09 Ryan Scott , Vikraman Choudhury , Ryan Newton , Niki Vazou , Ranjit Jhala

A type system is introduced for a generic Object Oriented programming language in order to infer resource upper bounds. A sound andcomplete characterization of the set of polynomial time computable functions is obtained. As a consequence,…

Programming Languages · Computer Science 2018-02-20 Emmanuel Hainry , Romain Péchoux

Many variants of type theory extend a basic theory with additional primitives or properties like univalence, guarded recursion or parametricity, to enable constructions or proofs that would be harder or impossible to do in the original…

Programming Languages · Computer Science 2022-07-05 Joris Ceulemans , Andreas Nuyts , Dominique Devriese

The C++ Standard Template Library is the flagship example for libraries based on the generic programming paradigm. The usage of this library is intended to minimize the number of classical C/C++ errors, but does not warrant bug-free…

Programming Languages · Computer Science 2011-11-17 N. Pataki

We prove a general congruence result for bisimilarity in higher-order languages, which generalises previous work to languages specified by a labelled transition system in which programs may occur as labels, and which may rely on operations…

Logic in Computer Science · Computer Science 2023-03-22 Tom Hirschowitz , Ambroise Lafont

Traversal strategies \'a la Stratego (also \'a la Strafunski and 'Scrap Your Boilerplate') provide an exceptionally versatile and uniform means of querying and transforming deeply nested and heterogeneously structured data including terms…

Programming Languages · Computer Science 2012-01-31 Ralf Laemmel , Simon Thompson , Markus Kaiser

We scale layered modal type theory to dependent types, introducing DeLaM, dependent layered modal type theory. This type theory is novel in that we have one uniform type theory in which we can not only compose and execute code, but also…

Logic in Computer Science · Computer Science 2024-07-09 Jason Z. S. Hu , Brigitte Pientka

Algebraic effects and handlers are a powerful abstraction to build non-local control-flow mechanisms such as resumable exceptions, lightweight threads, co-routines, generators, and asynchronous I/O. All of such features have very evolved…

Logic in Computer Science · Computer Science 2023-02-08 Tiago Soares , Mário Pereira

Qualitative Numerical Planning (QNP) serves as an important abstraction model for generalized planning (GP), which aims to compute general plans that solve multiple instances at once. Recent works show that large language models (LLMs) can…

Artificial Intelligence · Computer Science 2026-02-12 Zhenhe Cui , Huaxiang Xia , Hangjun Shen , Kailun Luo , Yong He , Wei Liang

Common functional languages incentivize tail-recursive functions, as opposed to general recursive functions that consume stack space and may not scale to large inputs. This distinction occasionally requires writing functions in a…

Programming Languages · Computer Science 2024-12-02 Clément Allain , Frédéric Bour , Basile Clément , François Pottier , Gabriel Scherer

A fundamental challenge in Continual Learning (CL) is catastrophic forgetting, where adapting to new tasks degrades the performance on previous ones. While the field has evolved with diverse methods, this rapid surge in diverse…

Machine Learning · Computer Science 2025-12-29 Wenbin Li , Shangge Liu , Borui Kang , Yiyang Chen , KaXuan Lew , Yang Chen , Yinghuan Shi , Lei Wang , Yang Gao , Jiebo Luo

We present an implementation of the relational programming language miniKanren as a set of combinators and syntax extensions for OCaml. The key feature of our approach is polymorphic unification, which can be used to unify data structures…

Programming Languages · Computer Science 2019-01-01 Dmitrii Kosarev , Dmitry Boulytchev

The Gisela framework for declarative programming was developed with the specific aim of providing a tool that would be useful for knowledge representation and reasoning within real-world applications. To achieve this, a complete integration…

Software Engineering · Computer Science 2007-05-23 Goran Falkman , Olof Torgersson