VLDB 2026 Research / reviewers in the wild / expert
Tom Schrijvers
dblp:s/TomSchrijvers
· DBLP profile ↗
108ranked-venue papers
30as first author
25since 2021 · last 2026
0000-0001-8771-5559ORCID · verified
Domains — the database's venue-derived domains; a paper can count in several
Software engineering, systems software and programming languages · 96 · 30 first-author · 19 since 2021Theory of computation · 35 · 16 first-author · 5 since 2021Artificial intelligence and machine learning · 3 · 1 first-author · 1 since 2021Human-computer interaction and ubiquitous computing · 2 · 2 since 2021Databases, data management, data science and information retrieval · 1Graphics, computer vision, multimedia, augmented reality and games · 1
| Year | Publication | Venue | Position |
|---|---|---|---|
| 2026 | The Impact of Introducing a Computer Science Course in Flemish Secondary Education on the Prior Programming Knowledge of Engineering StudentsabstractBackground and Context. Recently, a mandatory computer science course was introduced in the curriculum of several secondary education programs in Flanders. Objectives. Our goal is to measure the impact of this new course on the prior programming knowledge and interest of first-year engineering students. At the same time, we attempt to replicate the results of the original study introducing the self-evaluation instrument we used. Method. To measure the programming knowledge, we use a questionnaire in which students self-evaluate their programming knowledge based on a validated instrument, and compare the results of two cohorts: one which experienced the new curriculum and one which did not. On top of this, we replicate the data analysis done in the original study that presented the instrument. Findings. Our results indicate a significant improvement of the prior knowledge of engineering students due to the introduction of the programming course in secondary education. In contrast, their interest in programming has not changed significantly. The results of our replication study are similar to those of the original study, with a few interesting differences. Implications. Our findings reinforce prior research demonstrating the benefits of introducing programming earlier in the curriculum, while also highlighting that increased competence does not automatically translate into greater interest, suggesting the need for future work that disentangles how curricular content and pedagogical approaches shape both knowledge and interest. At the same time, our replication results confirm that the instrument can reliably track competency developments across cohorts. Jesse Hoobergs, Tom Schrijvers |
ICER (1) | 2 |
| 2026 | An Efficient Compiler for the IDP-Z3 Knowledge Base System
Wout Piessens, Simon Vandevelde, Joost Vennekens, Tom Schrijvers |
PADL | 4 |
| 2026 | Staging Effect Handlers for Modular SearchabstractConstraint Programming (CP) is a declarative paradigm where a programmer models a problem in terms of constraints over some set of variables. Monadic Constraint Programming (MCP) integrates CP with functional programming by modeling the constraint solver as a monad threaded through a monadic search tree. This abstraction allows us to define search as a first-class object which can be constructed from composable search transformers. Alexandru Trifanov, Tom Schrijvers |
PEPM | 2 |
| 2026 | LazyHMC: Hamiltonian Monte Carlo Simulation for Lazy, Infinite Dimensional Probabilistic ProgramsabstractHamiltonian Monte Carlo (HMC) is a successful generic inference method in probabilistic programming, but in its ordinary formulation it needs gradients and finite-dimensional parameter spaces. In Haskell, lazy evaluation lets probabilistic programs express stochastic processes and other non-parametric Bayesian models over implicit infinite-dimensional spaces. This paper develops new formulations of gradient-based HMC for this infinite-dimensional setting, via lazy evaluation. For automatic differentiation, we provide an analysis based on a new notion of "piecewise analytic under cylindrical analytic partition" (PACAP), to show that even if a program is infinite-dimensional and defined lazily, the gradient of the likelihood function is finitely supported. For the Monte Carlo method itself, we develop several HMC variants and a No-U-Turn Sampler that operate over the infinite-dimensional parameter space but are still productive because of lazy evaluation. Experiments cover Gaussian mixture clustering, random walks, and piecewise-constant regression with Poisson-process changepoints. Maria-Nicoleta Craciun, C.-H. Luke Ong, Tom Schrijvers, Sam Staton |
Proc. ACM Program. Lang. | 3 |
| 2025 | Staging Automatic Differentiation with FusionabstractAutomatic differentiation (AD) is a family of algorithms with many applications in scientific computing and machine learning. They compute numerical derivatives by interpreting or transforming the source code of numeric expressions. The correctness and efficiency of such AD algorithms has been the subject of much research, in particular that of reverse-mode AD which is particularly efficient for computing large gradients, but the code it generates is highly non-obvious. Samuel Klumpers, Tom Schrijvers |
Haskell | 2 |
| 2025 | Effectful Lenses: There and Back with Different MonadsabstractBidirectional transformations (BXs) are a widely adopted approach for data synchronisation that is usually based on two functions, one from the source to the view and one back. Traditionally, these functions must not have side effects. While a few frameworks aim to lift this restriction by introducing monads into lenses, they are still quite limited, e.g., allowing only side effects in the backwards transformation. In this paper, we propose a much more general framework for effectful lenses. Our effectful lenses can have different effects in their two directions, and the effects need not be cancellable. We also define the round-trip relations and use them to generalise the two well-known round-trip properties to effectful lenses. Moreover, composition preserves the two well-known round-trip properties, and we also provide a rich combinator language, which enables compositional programming for effectful lenses. Finally, we present a case study to illustrate the flexibility and expressivity of our framework. Ruifeng Xie, Tom Schrijvers, Zhenjiang Hu 0002 |
Proc. ACM Program. Lang. | 2 |
| 2025 | Biparsers: Exact Printing for Data SynchronisationabstractParsers and printers are vital for data synchronisation between different serialisation formats. As they are tightly related, much research has been devoted to showing that both can be derived from a single definition. It, however, turns out to be challenging to extend this work with exact-printing , which recovers the original source text for the parsed data. In this paper, we propose a new approach to tackling the challenge that considers a parser-printer pair as a mechanism to synchronize the input text string with the data, and formalizes them as a bidirectional program (lens). We propose the first biparser framework to support exact-printing with non-injective parsers, provide a library of combinators for common patterns, and demonstrate its usefulness with biparsers for subsets of JSON and YAML. Ruifeng Xie, Tom Schrijvers, Zhenjiang Hu 0002 |
Proc. ACM Program. Lang. | 2 |
| 2024 | From high to low: Simulating nondeterminism and state with stateabstractAbstract Some effects are considered to be higher level than others. High-level effects provide expressive and succinct abstraction of programming concepts, while low-level effects allow more fine-grained control over program execution and resources. Yet, often it is desirable to write programs using the convenient abstraction offered by high-level effects, and meanwhile still benefit from the optimizations enabled by low-level effects. One solution is to translate high-level effects to low-level ones. This paper studies how algebraic effects and handlers allow us to simulate high-level effects in terms of low-level effects. In particular, we focus on the interaction between state and nondeterminism known as the local state, as provided by Prolog. We map this high-level semantics in successive steps onto a low-level composite state effect, similar to that managed by Prolog’s Warren Abstract Machine. We first give a translation from the high-level local-state semantics to the low-level global-state semantics, by explicitly restoring state updates on backtracking. Next, we eliminate nondeterminism altogether in favour of a lower-level state containing a choicepoint stack. Then we avoid copying the state by restricting ourselves to incremental, reversible state updates. We show how these updates can be stored on a trail stack with another state effect. We prove the correctness of all our steps using program calculation where the fusion laws of effect handlers play a central role. Tom Schrijvers |
J. Funct. Program. | 2 |
| 2024 | A Calculus for Scoped Effects & HandlersabstractAlgebraic effects & handlers have become a standard approach for side-effects in functional programming. Their modular composition with other effects and clean separation of syntax and semantics make them attractive to a wide audience. However, not all effects can be classified as algebraic; some need a more sophisticated handling. In particular, effects that have or create a delimited scope need special care, as their continuation consists of two parts-in and out of the scope-and their modular composition introduces additional complexity. These effects are called scoped and have gained attention by their growing applicability and adoption in popular libraries. While calculi have been designed with algebraic effects & handlers built in to facilitate their use, a calculus that supports scoped effects & handlers in a similar manner does not yet exist. This work fills this gap: we present $\lambda_{\mathit{sc}}$, a calculus with native support for both algebraic and scoped effects & handlers. It addresses the need for polymorphic handlers and explicit clauses for forwarding unknown scoped operations to other handlers. Our calculus is based on Eff, an existing calculus for algebraic effects, extended with Koka-style row polymorphism, and consists of a formal grammar, operational semantics, a (type-safe) type-and-effect system and type inference. We demonstrate $\lambda_{\mathit{sc}}$ on a range of examples. Roger Bosman, Birthe van den Berg, Tom Schrijvers |
Log. Methods Comput. Sci. | 4 |
| 2024 | A framework for higher-order effects & handlersabstractAlgebraic effects & handlers are a modular approach for modeling side-effects in functional programming. Their syntax is defined in terms of a signature of effectful operations, encoded as a functor, that are plugged into the free monad; their denotational semantics is defined by fold-style handlers that only interpret their part of the syntax and forward the rest. However, not all effects are algebraic: some need to access an internal computation. For example, scoped effects distinguish between a computation in scope and out of scope; parallel effects parallellize over a computation, latent effects defer a computation. Separate definitions have been proposed for these higher-order effects and their corresponding handlers, often leading to expedient and complex monad definitions. In this work we propose a generic framework for higher-order effects, generalizing algebraic effects & handlers: a generic free monad with higher-order effect signatures and a corresponding interpreter. Specializing this higher-order syntax leads to various definitions of previously defined (scoped, parallel, latent) and novel (writer, bracketing) effects. Furthermore, we formally show our framework theoretically correct, also putting different effect instances on formal footing; a significant contribution for parallel, latent, writer and bracketing effects. Birthe van den Berg, Tom Schrijvers |
Sci. Comput. Program. | 2 |
| 2024 | Forward- or reverse-mode automatic differentiation: What's the difference?abstractAutomatic differentiation (AD) has been a topic of interest for researchers in many disciplines, with increased popularity since its application to machine learning and neural networks. Although many researchers appreciate and know how to apply AD, it remains a challenge to truly understand the underlying processes. From an algebraic point of view, however, AD appears surprisingly natural: it originates from the differentiation laws. In this work we use Algebra of Programming techniques to reason about different AD variants, leveraging Haskell to illustrate our observations. Our findings stem from three fundamental algebraic abstractions: (1) the notion of semimodule, (2) Nagata's construction of the ‘idealization of a module’, and (3) Kronecker's delta function, that together allow us to write a single-line abstract definition of AD. From this single-line definition, and by instantiating our algebraic structures in various ways, we derive different AD variants, that have the same extensional behaviour, but different intensional properties, mainly in terms of (asymptotic) computational complexity. We show the different variants equivalent by means of Kronecker isomorphisms, a further elaboration of our Haskell infrastructure which guarantees correctness by construction. With this framework in place, this paper seeks to make AD variants more comprehensible, taking an algebraic perspective on the matter. Birthe van den Berg, Tom Schrijvers, James McKinna, Alexander Vandenbroucke |
Sci. Comput. Program. | 2 |
| 2024 | Disjunctive Delimited ControlabstractAbstract Delimited control is a powerful mechanism for programming language extension which has been recently proposed for Prolog (and implemented in SWI-Prolog). By manipulating the control flow of a program from inside the language, it enables the implementation of powerful features, such as tabling, without modifying the internals of the Prolog engine. However, its current formulation is inadequate: it does not capture Prolog’s unique non-deterministic nature which allows multiple ways to satisfy a goal. This paper fully embraces Prolog’s non-determinism with a novel interface for disjunctive delimited control, which gives the programmer not only control over the sequential (conjunctive) control flow, but also over the non-deterministic control flow. We provide a meta-interpreter that conservatively extends Prolog with delimited control and show that it enables a range of typical Prolog features and extensions, now at the library level: findall, cut, branch-and-bound optimisation, probabilistic programming, … Alexander Vandenbroucke, Tom Schrijvers |
Theory Pract. Log. Program. | 2 |
| 2023 | eTeacher: A Pilot in Flemish Secondary EducationabstractThe Flemish Government has imposed a new and challenging set of learning objectives for secondary education. An important part comprises Computational Thinking for 3rd and 4th year students, and Computer Science for students in their 5th and 6th year. Yet, most teachers, who have mostly not been trained to teach these subjects, do not feel confident in programming-related topics. With eTeacher, we take away this burden from the teacher and allow students to work independently and at their own pace. In particular, we present a platform with an integrated course text for Computational Thinking. eTeacher is available on every device, gives automatic code-feedback both content-wise and on programming style and provides exercises of different types and levels. Teachers can monitor their students individually and consult statistics. The platform was extensively evaluated in a pilot at 20 schools. Jesse Hoobergs, Birthe van den Berg, Tom Schrijvers |
ITiCSE (2) | 3 |
| 2023 | No Unification Variable Left Behind: Fully Grounding Type Inference for the HDM System
Roger Bosman, Georgios Karachalias, Tom Schrijvers |
ITP | 3 |
| 2023 | sf Fluo: A Domain-Specific Language for Experiments in Fluorescence Microscopy (Application Paper)
Birthe van den Berg, Tom Schrijvers, Peter Dedecker |
PADL | 2 |
| 2023 | Automatic Differentiation in PrologabstractAbstract Automatic differentiation (AD) is a range of algorithms to compute the numeric value of a function’s (partial) derivative, where the function is typically given as a computer program or abstract syntax tree. AD has become immensely popular as part of many learning algorithms, notably for neural networks. This paper uses Prolog to systematically derive gradient-based forward- and reverse-mode AD variants from a simple executable specification: evaluation of the symbolic derivative. Along the way we demonstrate that several Prolog features (DCGs, co-routines) contribute to the succinct formulation of the algorithm. We also discuss two applications in probabilistic programming that are enabled by our Prolog algorithms. The first is parameter learning for the Sum-Product Loop Language and the second consists of both parameter learning and variational inference for probabilistic logic programming. Tom Schrijvers, Birthe van den Berg, Fabrizio Riguzzi |
Theory Pract. Log. Program. | 1 |
| 2022 | Structured Handling of Scoped EffectsabstractAbstract Algebraic effects offer a versatile framework that covers a wide variety of effects. However, the family of operations that delimit scopes are not algebraic and are usually modelled as handlers, thus preventing them from being used freely in conjunction with algebraic operations. Although proposals for scoped operations exist, they are either ad-hoc and unprincipled, or too inconvenient for practical programming. This paper provides the best of both worlds: a theoretically-founded model of scoped effects that is convenient for implementation and reasoning. Our new model is based on an adjunction between a locally finitely presentable category and a category of functorial algebras. Using comparison functors between adjunctions, we show that our new model, an existing indexed model, and a third approach that simulates scoped operations in terms of algebraic ones have equal expressivity for handling scoped operations. We consider our new model to be the sweet spot between ease of implementation and structuredness. Additionally, our approach automatically induces fusion laws of handlers of scoped effects, which are useful for reasoning and optimisation. Zhixuan Yang, Marco Paviotti, Nicolas Wu, Birthe van den Berg, Tom Schrijvers |
ESOP | 5 |
| 2022 | Oregano: staging regular expressions with Moore Cayley fusionabstractRegular expressions are a tool for recognising regular languages, historically implemented using derivatives or non-deterministic finite automata. They are convenient for many light-weight parsing workloads, but their traditional formulation only lends them to matching text, not returning fully-structured results. This contrasts with other forms of parsing, where the aim is to extract meaningful data, for example abstract syntax trees. Yet, most regular expression libraries do not support this useful output, and those that do are often slower, and backed by parser combinator libraries. Jamie Willis, Nicolas Wu, Tom Schrijvers |
Haskell | 3 |
| 2022 | Breadth-First Traversal via Staging
Jeremy Gibbons, Donnacha Oisín Kidney, Tom Schrijvers, Nicolas Wu |
MPC | 3 |
| 2022 | Fusing industry and academia at GitHub (experience report)abstractGitHub hosts hundreds of millions of code repositories written in hundreds of different programming languages. In addition to its hosting services, GitHub provides data and insights into code, such as vulnerability analysis and code navigation, with which users can improve and understand their software development process. GitHub has built Semantic, a program analysis tool capable of parsing and extracting detailed information from source code. The development of Semantic has relied extensively on the functional programming literature; this paper describes how connections to academic research inspired and informed the development of an industrial-scale program analysis toolkit. Patrick Thomson, Rob Rix, Nicolas Wu, Tom Schrijvers |
Proc. ACM Program. Lang. | 4 |
| 2021 | Latent Effects for Reusable Language Components
Birthe van den Berg, Tom Schrijvers, Casper Bach, Nicolas Wu |
APLAS | 2 |
| 2021 | Divide et Impera: Efficient Synthesis of Cyber-Physical System Architectures from Formal Contracts
César Augusto Ribeiro dos Santos, Tom Schrijvers, Amr Hany Saleh, Mike Nicolai |
FM | 2 |
| 2021 | Disjunctive Delimited Control
Alexander Vandenbroucke, Tom Schrijvers |
LOPSTR | 2 |
| 2021 | Special Issue on Probabilistic Logic Programming (PLP 2018)
Elena Bellodi, Tom Schrijvers |
Int. J. Approx. Reason. | 2 |
| 2021 | Efficient compilation of algebraic effect handlersabstractThe popularity of algebraic effect handlers as a programming language feature for user-defined computational effects is steadily growing. Yet, even though efficient runtime representations have already been studied, most handler-based programs are still much slower than hand-written code. This paper shows that the performance gap can be drastically narrowed (in some cases even closed) by means of type-and-effect directed optimising compilation. Our approach consists of source-to-source transformations in two phases of the compilation pipeline. Firstly, elementary rewrites, aided by judicious function specialisation, exploit the explicit type and effect information of the compiler’s core language to aggressively reduce handler applications. Secondly, after erasing the effect information further rewrites in the backend of the compiler emit tight code. This work comes with a practical implementation: an optimising compiler from Eff, an ML style language with algebraic effect handlers, to OCaml. Experimental evaluation with this implementation demonstrates that in a number of benchmarks, our approach eliminates much of the overhead of handlers, outperforms capability-passing style compilation and yields competitive performance compared to hand-written OCaml code as well Multicore OCaml’s dedicated runtime support. Georgios Karachalias, Filip Koprivec, Matija Pretnar, Tom Schrijvers |
Proc. ACM Program. Lang. | 4 |
| 2020 | Row and Bounded Polymorphism via Disjoint PolymorphismabstractPolymorphism and subtyping are important features in mainstream OO languages. The most common way to integrate the two is via 𝖥_{< :} style bounded quantification. A closely related mechanism is row polymorphism, which provides an alternative to subtyping, while still enabling many of the same applications. Yet another approach is to have type systems with intersection types and polymorphism. A recent addition to this design space are calculi with disjoint intersection types and disjoint polymorphism. With all these alternatives it is natural to wonder how they are related. This paper provides an answer to this question. We show that disjoint polymorphism can recover forms of both row polymorphism and bounded polymorphism, while retaining key desirable properties, such as type-safety and decidability. Furthermore, we identify the extra power of disjoint polymorphism which enables additional features that cannot be easily encoded in calculi with row polymorphism or bounded quantification alone. Ultimately we expect that our work is useful to inform language designers about the expressive power of those common features, and to simplify implementations and metatheory of feature-rich languages with polymorphism and subtyping. Ningning Xie, Bruno C. d. S. Oliveira, Xuan Bi, Tom Schrijvers |
ECOOP | 4 |
| 2020 | Explicit effect subtypingabstractAbstract As popularity of algebraic effects and handlers increases, so does a demand for their efficient execution. Eff, an ML-like language with native support for handlers, has a subtyping-based effect system on which an effect-aware optimising compiler could be built. Unfortunately, in our experience, implementing optimisations for Eff is overly error-prone because its core language is implicitly typed, making code transformations very fragile. To remedy this, we present an explicitly typed polymorphic core calculus for algebraic effect handlers with a subtyping-based type-and-effect system. It reifies appeals to subtyping in explicit casts with coercions that witness the subtyping proof, quickly exposing typing bugs in program transformations. Our typing-directed elaboration comes with a constraint-based inference algorithm that turns an implicitly typed Eff-like language into our calculus. Moreover, all coercions and effect information can be erased in a straightforward way, demonstrating that coercions have no computational content. Additionally, we present a monadic translation from our calculus into a pure language without algebraic effects or handlers, using the effect information to introduce monadic constructs only where necessary. Georgios Karachalias, Matija Pretnar, Amr Hany Saleh, Stien Vanderhallen, Tom Schrijvers |
J. Funct. Program. | 5 |
| 2020 | Generalized monoidal effects and handlersabstractAbstract Algebraic effects and handlers are a convenient method for structuring monadic effects with primitive effectful operations and separating the syntax from the interpretation of these operations. However, the scope of conventional handlers is limited as not all side effects are monadic in nature. This paper generalizes the notion of algebraic effects and handlers from monads to generalized monoids, which notably covers applicative functors and arrows as well as monads. For this purpose, we switch the category theoretical basis from free algebras to free monoids. In addition, we show how lax monoidal functors enable the reuse of handlers and programs across different computation classes, for example, handling applicative computations with monadic handlers. We motivate and present these handler interfaces in the context of build systems. Tasks in a build system are represented by a free computation and their interpretation as a handler. This use case is based on the work of Mokhov et al. [(2018). PACMPL 2 (ICFP), 79:1–79:29.]. Ruben P. Pieters, Exequiel Rivas, Tom Schrijvers |
J. Funct. Program. | 3 |
| 2020 | Faster coroutine pipelines: A reconstructionabstractAbstract The three-continuation approach to coroutine pipelines efficiently represents a large number of connected components. Previous work in this area introduces this alternative encoding but does not shed much light on the underlying principles for deriving this encoding from its specification. This paper gives this missing insight by deriving the three-continuation encoding based on eliminating the mutual recursion in the definition of the connect operation. Using the same derivation steps, we are able to derive a similar encoding for a more general setting, namely bidirectional pipes. Additionally, we evaluate the encoding in an advertisement analytics benchmark where it is as performant as pipes , conduit , and streamly , which are other common Haskell stream processing libraries. Ruben P. Pieters, Tom Schrijvers |
J. Funct. Program. | 2 |
| 2020 | Resolution as intersection subtyping via Modus PonensabstractResolution and subtyping are two common mechanisms in programming languages. Resolution is used by features such as type classes or Scala-style implicits to synthesize values automatically from contextual type information. Subtyping is commonly used to automatically convert the type of a value into another compatible type. So far the two mechanisms have been considered independently of each other. This paper shows that, with a small extension, subtyping with intersection types can subsume resolution. This has three main consequences. Firstly, resolution does not need to be implemented as a separate mechanism. Secondly, the interaction between resolution and subtyping becomes apparent. Finally, the integration of resolution into subtyping enables first-class (implicit) environments. The extension that recovers the power of resolution via subtyping is the modus ponens rule of propositional logic. While it is easily added to declarative subtyping, significant care needs to be taken to retain desirable properties, such as transitivity and decidability of algorithmic subtyping, and coherence. To materialize these ideas we develop λiMP, a calculus that extends a iprevious calculus with disjoint intersection types, and develop its metatheory in the Coq theorem prover. Koar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios Karachalias |
Proc. ACM Program. Lang. | 2 |
| 2020 | PλωNK: functional probabilistic NetKATabstractThis work presents PλωNK, a functional probabilistic network programming language that extends Probabilistic NetKAT (PNK). Like PNK, it enables probabilistic modelling of network behaviour, by providing probabilistic choice and infinite iteration (to simulate looping network packets). Yet, unlike PNK, it also offers abstraction and higher-order functions to make programming much more convenient. The formalisation of PλωNK is challenging for two reasons: Firstly, network programming induces multiple side effects (in particular, parallelism and probabilistic choice) which need to be carefully controlled in a functional setting. Our system uses an explicit syntax for thunks and sequencing which makes the interplay of these effects explicit. Secondly, measure theory, the standard domain for formalisations of (continuous) probablistic languages, does not admit higher-order functions. We address this by leveraging ω-Quasi Borel Spaces (ωQBSes), a recent advancement in the domain theory of probabilistic programming languages. We believe that our work is not only useful for bringing abstraction to PNK, but that—as part of our contribution—we have developed the meta-theory for a probabilistic language that combines advanced features like higher-order functions, iteration and parallelism, which may inform similar meta-theoretic efforts. Alexander Vandenbroucke, Tom Schrijvers |
Proc. ACM Program. Lang. | 2 |
| 2020 | Consistent Subtyping for AllabstractConsistent subtyping is employed in some gradual type systems to validate type conversions. The original definition by Siek and Taha serves as a guideline for designing gradual type systems with subtyping. Polymorphic types à la System F also induce a subtyping relation that relates polymorphic types to their instantiations. However, Siek and Taha’s definition is not adequate for polymorphic subtyping. The first goal of this article is to propose a generalization of consistent subtyping that is adequate for polymorphic subtyping and subsumes the original definition by Siek and Taha. The new definition of consistent subtyping provides novel insights with respect to previous polymorphic gradual type systems, which did not employ consistent subtyping. The second goal of this article is to present a gradually typed calculus for implicit (higher-rank) polymorphism that uses our new notion of consistent subtyping. We develop both declarative and (bidirectional) algorithmic versions for the type system. The algorithmic version employs techniques developed by Dunfield and Krishnaswami for higher-rank polymorphism to deal with instantiation. We prove that the new calculus satisfies all static aspects of the refined criteria for gradual typing. We also study an extension of the type system with static and gradual type parameters, in an attempt to support a variant of the dynamic criterion for gradual typing. Assuming a coherence conjecture for the extended calculus, we show that the dynamic gradual guarantee of our source language can be reduced to that of λ B, which, at the time of writing, is still an open question. Most of the metatheory of this article, except some manual proofs for the algorithmic type system and extensions, has been mechanically formalized using the Coq proof assistant. Ningning Xie, Xuan Bi, Bruno C. d. S. Oliveira, Tom Schrijvers |
ACM Trans. Program. Lang. Syst. | 4 |
| 2019 | Distributive Disjoint Polymorphism for Compositional ProgrammingabstractPopular programming techniques such as shallow embeddings of Domain Specific Languages (DSLs), finally tagless or object algebras are built on the principle of compositionality. However, existing programming languages only support simple compositional designs well, and have limited support for more sophisticated ones. This paper presents the $$\mathsf {F}_{i}^{+}$$ calculus, which supports highly modular and compositional designs that improve on existing techniques. These improvements are due to the combination of three features: disjoint intersection types with a merge operator; parametric (disjoint) polymorphism; and BCD-style distributive subtyping. The main technical challenge is $$\mathsf {F}_{i}^{+}$$ ’s proof of coherence. A naive adaptation of ideas used in System F’s parametricity to canonicity (the logical relation used by $$\mathsf {F}_{i}^{+}$$ to prove coherence) results in an ill-founded logical relation. To solve the problem our canonicity relation employs a different technique based on immediate substitutions and a restriction to predicative instantiations. Besides coherence, we show several other important meta-theoretical results, such as type-safety, sound and complete algorithmic subtyping, and decidability of the type system. Remarkably, unlike $$\mathsf {F}_{<:}$$ ’s bounded polymorphism, disjoint polymorphism in $$\mathsf {F}_{i}^{+}$$ supports decidable type-checking. Xuan Bi, Ningning Xie, Bruno C. d. S. Oliveira, Tom Schrijvers |
ESOP | 4 |
| 2019 | CONDEnSe: Contract Based Design SynthesisabstractIt is difficult to maintain consistency between artifacts produced during the development of mechatronic systems, and to ensure the successful integration of independently developed parts. The difficulty stems from the complex, multidisciplinary nature of the problem, with multiple artifacts produced by each engineering domain, throughout the design process, and across supplier chains. In this work, we develop a methodology and a tool, CONDEnSe, that given a set of Assume/Guarantee (A/G) contracts that capture the system requirements, and a high-level decomposition of the system model, automatically generates design variants that respect the requirements and exports those variants to different engineering tools for analysis. Our methodology makes use of a contract-based design algebra to ensure that all generated artifacts for all design variants are consistent by construction, even when the process is modularized and independently developed parts are only later integrated. In contrast with previous work, our approach reduces the search space to models that comply with the captured design requirements. César Augusto Ribeiro dos Santos, Amr Hany Saleh, Tom Schrijvers, Mike Nicolai |
MoDELS | 3 |
| 2019 | Handling Local State with Global State
Koen Pauwels, Tom Schrijvers, Shin-Cheng Mu |
MPC | 2 |
| 2019 | Faster Coroutine Pipelines: A Reconstruction
Ruben P. Pieters, Tom Schrijvers |
PADL | 2 |
| 2019 | COCHIS: Stable and coherent implicitsabstractAbstract Implicit programming (IP) mechanisms infer values by type-directed resolution, making programs more compact and easier to read. Examples of IP mechanisms include Haskell’s type classes, Scala’s implicits, Agda’s instance arguments, Coq’s type classes and Rust’s traits. The design of IP mechanisms has led to heated debate: proponents of one school argue for the desirability of strong reasoning properties, while proponents of another school argue for the power and flexibility of local scoping or overlapping instances. The current state of affairs seems to indicate that the two goals are at odds with one another and cannot easily be reconciled. This paper presents COCHIS, the Calculus Of CoHerent ImplicitS, an improved variant of the implicit calculus that offers flexibility while preserving two key properties: coherence and stability of type substitutions . COCHIS supports polymorphism, local scoping, overlapping instances, first-class instances and higher-order rules, while remaining type-safe, coherent and stable under type substitution. We introduce a logical formulation of how to resolve implicits, which is simple but ambiguous and incoherent, and a second formulation, which is less simple but unambiguous, coherent and stable. Every resolution of the second formulation is also a resolution of the first, but not conversely. Parts of the second formulation bear a close resemblance to a standard technique for proof search called focusing. Moreover, key for its coherence is a rigorous enforcement of determinism. Tom Schrijvers, Bruno C. d. S. Oliveira, Philip Wadler, Koar Marntirosian |
J. Funct. Program. | 1 |
| 2019 | Coherence of type class resolutionabstractElaboration-based type class resolution, as found in languages like Haskell, Mercury and PureScript, is generally nondeterministic: there can be multiple ways to satisfy a wanted constraint in terms of global instances and locally given constraints. Coherence is the key property that keeps this sane; it guarantees that, despite the nondeterminism, programs still behave predictably. Even though elaboration-based resolution is generally assumed coherent, as far as we know, there is no formal proof of this property in the presence of sources of nondeterminism, like superclasses and flexible contexts. This paper provides a formal proof to remedy the situation. The proof is non-trivial because the semantics elaborates resolution into a target language where different elaborations can be distinguished by contexts that do not have a source language counterpart. Inspired by the notion of full abstraction, we present a two-step strategy that first elaborates nondeterministically into an intermediate language that preserves contextual equivalence, and then deterministically elaborates from there into the target language. We use an approach based on logical relations to establish contextual equivalence and thus coherence for the first step of elaboration, while the second step’s determinism straightforwardly preserves this coherence property. Gert-Jan Bottu, Ningning Xie, Koar Marntirosian, Tom Schrijvers |
Proc. ACM Program. Lang. | 4 |
| 2019 | A mechanical formalization of higher-ranked polymorphic type inferenceabstractModern functional programming languages, such as Haskell or OCaml, use sophisticated forms of type inference. While an important topic in the Programming Languages research, there is little work on the mechanization of the metatheory of type inference in theorem provers. In particular we are unaware of any complete formalization of the type inference algorithms that are the backbone of modern functional languages. This paper presents the first full mechanical formalization of the metatheory for higher-ranked polymorphic type inference. The system that we formalize is the bidirectional type system by Dunfield and Krishnaswami (DK). The DK type system has two variants (a declarative and an algorithmic one) that have been manually proven sound , complete and decidable . We present a mechanical formalization in the Abella theorem prover of DK’s declarative type system with a novel algorithmic system. We have a few reasons to use a new algorithm. Firstly, our new algorithm employs worklist judgments , which precisely capture the scope of variables and simplify the formalization of scoping in a theorem prover. Secondly, while DK’s original formalization comes with very well-written manual proofs, there are several details missing and some incorrect proofs, which complicate the task of writing a mechanized proof. Despite the use of a different algorithm we prove the same results as DK, although with significantly different proofs and proof techniques. Since such type inference algorithms are quite subtle and have a complex metatheory, mechanical formalizations are an important advance in type-inference research. Jinxu Zhao, Bruno C. d. S. Oliveira, Tom Schrijvers |
Proc. ACM Program. Lang. | 3 |
| 2019 | Implicit quantification made explicit: How to interpret blank nodes and universal variables in Notation3 Logic
Dörthe Arndt, Tom Schrijvers, Jos De Roo, Ruben Verborgh |
J. Web Semant. | 2 |
| 2018 | The Essence of Nested CompositionabstractCalculi with disjoint intersection types support an introduction form for intersections called the merge operator, while retaining a coherent semantics. Disjoint intersections types have great potential to serve as a foundation for powerful, flexible and yet type-safe and easy to reason OO languages. This paper shows how to significantly increase the expressive power of disjoint intersection types by adding support for nested subtyping and composition, which enables simple forms of family polymorphism to be expressed in the calculus. The extension with nested subtyping and composition is challenging, for two different reasons. Firstly, the subtyping relation that supports these features is non-trivial, especially when it comes to obtaining an algorithmic version. Secondly, the syntactic method used to prove coherence for previous calculi with disjoint intersection types is too inflexible, making it hard to extend those calculi with new features (such as nested subtyping). We show how to address the first problem by adapting and extending the Barendregt, Coppo and Dezani (BCD) subtyping rules for intersections with records and coercions. A sound and complete algorithmic system is obtained by using an approach inspired by Pierce's work. To address the second problem we replace the syntactic method to prove coherence, by a semantic proof method based on logical relations. Our work has been fully formalized in Coq, and we have an implementation of our calculus. Xuan Bi, Bruno C. d. S. Oliveira, Tom Schrijvers |
ECOOP | 3 |
| 2018 | Explicit Effect SubtypingabstractAs popularity of algebraic effects and handlers increases, so does a demand for their efficient execution. Eff, an ML-like language with native support for handlers, has a subtyping-based effect system on which an effect-aware optimizing compiler could be built. Unfortunately, in our experience, implementing optimizations for Eff is overly error-prone because its core language is implicitly-typed, making code transformations very fragile. To remedy this, we present an explicitly-typed polymorphic core calculus for algebraic effect handlers with a subtyping-based type-and-effect system. It reifies appeals to subtyping in explicit casts with coercions that witness the subtyping proof, quickly exposing typing bugs in program transformations. Our typing-directed elaboration comes with a constraint-based inference algorithm that turns an implicitly-typed Eff-like language into our calculus. Moreover, all coercions and effect information can be erased in a straightforward way, demonstrating that coercions have no computational content. Amr Hany Saleh, Georgios Karachalias, Matija Pretnar, Tom Schrijvers |
ESOP | 4 |
| 2018 | Formalization of a Polymorphic Subtyping Algorithm
Jinxu Zhao, Bruno C. d. S. Oliveira, Tom Schrijvers |
ITP | 3 |
| 2018 | Syntax and Semantics for Operations with ScopesabstractMotivated by the problem of separating syntax from semantics in programming with algebraic effects and handlers, we propose a categorical model of abstract syntax with so-called scoped operations. As a building block of a term, a scoped operation is not merely a node in a tree, as it can also encompass a whole part of the term (a scope). Some examples from the area of programming are given by the operation catch for handling exceptions, in which the part in the scope is the code that may raise an exception, or the operation once, which selects a single solution from a nondeterministic computation. A distinctive feature of such operations is their behaviour under program composition, that is, syntactic substitution. Maciej Piróg, Tom Schrijvers, Nicolas Wu, Mauro Jaskelioff |
LICS | 2 |
| 2018 | A unified view of monadic and applicative non-determinism
Exequiel Rivas, Mauro Jaskelioff, Tom Schrijvers |
Sci. Comput. Program. | 3 |
| 2017 | Quantified class constraintsabstractQuantified class constraints have been proposed many years ago to raise the expressive power of type classes from Horn clauses to the universal fragment of Hereditiary Harrop logic. Yet, while it has been much asked for over the years, the feature was never implemented or studied in depth. Instead, several workarounds have been proposed, all of which are ultimately stopgap measures. Gert-Jan Bottu, Georgios Karachalias, Tom Schrijvers, Bruno C. d. S. Oliveira, Philip Wadler |
Haskell | 3 |
| 2017 | Elaboration on functional dependencies: functional dependencies are dead, long live functional dependencies!abstractFunctional dependencies are a popular extension to Haskell's type-class system because they provide fine-grained control over type inference, resolve ambiguities and even enable type-level computations. Georgios Karachalias, Tom Schrijvers |
Haskell | 2 |
| 2016 | Needle & Knot: Binder Boilerplate Tied Up
Steven Keuchel, Stephanie Weirich, Tom Schrijvers |
ESOP | 3 |
| 2016 | Tabling as a Library with Delimited Control
Benoit Desouter, Marko van Dooren, Tom Schrijvers, Alexander Vandenbroucke |
IJCAI | 3 |
| 2016 | From MinX to MinC: semantics-driven decompilation of recursive datatypesabstractReconstructing the meaning of a program from its binary executable is known as reverse engineering; it has a wide range of applications in software security, exposing piracy, legacy systems, etc. Since reversing is ultimately a search for meaning, there is much interest in inferring a type (a meaning) for the elements of a binary in a consistent way. Unfortunately existing approaches do not guarantee any semantic relevance for their reconstructed types. This paper presents a new and semantically-founded approach that provides strong guarantees for the reconstructed types. Key to our approach is the derivation of a witness program in a high-level language alongside the reconstructed types. This witness has the same semantics as the binary, is type correct by construction, and it induces a (justifiable) type assignment on the binary. Moreover, the approach effectively yields a type-directed decompiler. We formalise and implement the approach for reversing MinX, an abstraction of x86, to MinC, a type-safe dialect of C with recursive datatypes. Our evaluation compiles a range of textbook C algorithms to MinX and then recovers the original structures. Edward Robbins 0001, Andy King, Tom Schrijvers |
POPL | 3 |
| 2016 | Efficient algebraic effect handlers for PrologabstractAbstract Recent work has provideddelimited controlfor Prolog to dynamically manipulate the program control-flow, and to implement a wide range of control-flow and dataflow effects on top of. Unfortunately, delimited control is a rather primitive language feature that is not easy to use. As a remedy, this work introducesalgebraic effect handlersfor Prolog, as a high-level and structured way of defining new side-effects in a modular fashion. We illustrate the expressive power of the feature and provide an implementation by means of elaboration into the delimited control primitives. The latter add a non-negligible performance overhead when used extensively. To address this issue, we present an optimised compilation approach that combines partial evaluation with dedicated rewrite rules. The rewrite rules are driven by a lightweight effect inference that analyses what effect operations may be called by a goal. We illustrate the effectiveness of this approach on a range of benchmarks. Amr Hany Saleh, Tom Schrijvers |
Theory Pract. Log. Program. | 2 |
| 2016 | Tabling with Sound Answer SubsumptionabstractAbstract Tabling is a powerful resolution mechanism for logic programs that captures their least fixed point semantics more faithfully than plain Prolog. In many tabling applications, we are not interested in the set of all answers to a goal, but only require an aggregation of those answers. Several works have studied efficient techniques, such as lattice-based answer subsumption and mode-directed tabling, to do so for various forms of aggregation. While much attention has been paid to expressivity and efficient implementation of the different approaches, soundness has not been considered. This paper shows that the different implementations indeed fail to produce least fixed points for some programs. As a remedy, we provide a formal framework that generalises the existing approaches and we establish a soundness criterion that explains for which programs the approach is sound. Alexander Vandenbroucke, Maciej Piróg, Benoit Desouter, Tom Schrijvers |
Theory Pract. Log. Program. | 4 |
| 2015 | GADTs meet their match: pattern-matching warnings that account for GADTs, guards, and lazinessabstractFor ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today's compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evidence of its utility in practice. Georgios Karachalias, Tom Schrijvers, Dimitrios Vytiniotis, Simon L. Peyton Jones |
ICFP | 2 |
| 2015 | Fusion for Free - Efficient Algebraic Effect Handlers
Nicolas Wu, Tom Schrijvers |
MPC | 2 |
| 2015 | From monoids to near-semirings: the essence of MonadPlus and alternativeabstractIt is well-known that monads are monoids in the category of endofunctors, and in fact so are applicative functors. Unfortunately, the benefits of this unified view are lost when the additional nondeterminism structure of MonadPlus or Alternative is required. Exequiel Rivas, Mauro Jaskelioff, Tom Schrijvers |
PPDP | 3 |
| 2015 | Preface for SCP special issue on Principles and Practice of Declarative Programming
Tom Schrijvers |
Sci. Comput. Program. | 1 |
| 2015 | Tabling as a library with delimited controlabstractAbstract Tabling is probably the most widely studied extension of Prolog. But despite its importance and practicality, tabling is not implemented by most Prolog systems. Existing approaches require substantial changes to the Prolog engine, which is an investment out of reach of most systems. To enable more widespread adoption, we present a new implementation of tabling in under 600 lines of Prolog code. Our lightweight approach relies on delimited control and provides reasonable performance. Benoit Desouter, Marko van Dooren, Tom Schrijvers |
Theory Pract. Log. Program. | 3 |
| 2014 | Effect handlers in scopeabstractAlgebraic effect handlers are a powerful means for describing effectful computations. They provide a lightweight and orthogonal technique to define and compose the syntax and semantics of different effects. The semantics is captured by handlers, which are functions that transform syntax trees. Nicolas Wu, Tom Schrijvers, Ralf Hinze |
Haskell | 2 |
| 2014 | Partial Type Signatures for Haskell
Thomas Winant, Dominique Devriese, Frank Piessens, Tom Schrijvers |
PADL | 4 |
| 2014 | Heuristics Entwined with Handlers Combined: From Functional Specification to Logic Programming ImplementationabstractA long-standing problem in logic programming is how to cleanly separate logic and control. While solutions exist, they fall short in one of two ways: some are too intrusive, because they require significant changes to Prolog's underlying implementation; others are lacking a clean semantic grounding. We resolve both of these issues in this paper. Tom Schrijvers, Nicolas Wu, Benoit Desouter, Bart Demoen |
PPDP | 1 |
| 2014 | Tor: Modular search with hookable disjunction
Tom Schrijvers, Bart Demoen, Markus Triska, Benoit Desouter |
Sci. Comput. Program. | 1 |
| 2014 | Introduction to the 30th International Conference on Logic Programming Special IssueabstractThe 30th edition of the International Conference of Logic Programming took place in Vienna in July 2014 at the Vienna Summer of Logic - the largest scientific conference in the history of logic. Following the initiative in 2010 taken by the Association for Logic Programming and Cambridge University Press, the full papers accepted for the International Conference on Logic Programming again appear as a special issue of Theory and Practice of Logic Programming (TPLP) - the 30th International Conference on Logic Programming Special Issue. Papers describing original, previously unpublished research and not simultaneously submitted for publication elsewhere were solicited in all areas of logic programming including but not restricted to: Theory: Semantic Foundations, Formalisms, Non- monotonic Reasoning, Knowledge Representation; Implementation: Compilation, Memory Management, Virtual Machines, Parallelism; Environments: Program Analysis, Transformation, Validation, Verification, Debugging, Profiling, Testing; Language Issues: Concurrency, Objects, Coordination, Mobility, Higher Order, Types, Modes, Assertions, Programming Techniques; Related Paradigms: Abductive Logic Programming, Inductive Logic Programming, Constraint Logic Programming, Answer-Set Programming; Applications: Databases, Data Integration and Federation, Software Engineering, Natural Language Processing, Web and Semantic Web, Agents, Artificial Intelligence, Bioinformatics. Michael Leuschel, Tom Schrijvers |
Theory Pract. Log. Program. | 2 |
| 2013 | Understanding idiomatic traversals backwards and forwardsabstractWe present new ways of reasoning about a particular class of effectful Haskell programs, namely those expressed as idiomatic traversals. Starting out with a specific problem about labelling and unlabelling binary trees, we extract a general inversion law, applicable to any monad, relating a traversal over the elements of an arbitrary traversable type to a traversal that goes in the opposite direction. This law can be invoked to show that, in a suitable sense, unlabelling is the inverse of labelling. The inversion law, as well as a number of other properties of idiomatic traversals, is a corollary of a more general theorem characterising traversable functors as finitary containers: an arbitrary traversable object can be decomposed uniquely into shape and contents, and traversal be understood in terms of those. Proof of the theorem involves the properties of traversal in a special idiom related to the free applicative functor. Richard S. Bird, Jeremy Gibbons, Stefan Mehner, Janis Voigtländer, Tom Schrijvers |
Haskell | 5 |
| 2013 | Modular monadic meta-theoryabstractThis paper presents 3MT, a framework for modular mechanized meta-theory of languages with effects. Using 3MT, individual language features and their corresponding definitions -- semantic functions, theorem statements and proofs-- can be built separately and then reused to create different languages with fully mechanized meta-theory. 3MT combines modular datatypes and monads to define denotational semantics with effects on a per-feature basis, without fixing the particular set of effects or language constructs. Benjamin Delaware, Steven Keuchel, Tom Schrijvers, Bruno C. d. S. Oliveira |
ICFP | 3 |
| 2013 | Meta-theory à la carteabstractFormalizing meta-theory, or proofs about programming languages, in a proof assistant has many well-known benefits. Unfortunately, the considerable effort involved in mechanizing proofs has prevented it from becoming standard practice. This cost can be amortized by reusing as much of existing mechanized formalizations as possible when building a new language or extending an existing one. One important challenge in achieving reuse is that the inductive definitions and proofs used in these formalizations are closed to extension. This forces language designers to cut and paste existing definitions and proofs in an ad-hoc manner and to expend considerable effort to patch up the results. Benjamin Delaware, Bruno C. d. S. Oliveira, Tom Schrijvers |
POPL | 3 |
| 2013 | Delimited continuations for prologabstractAbstract Delimited continuations are a famous control primitive that originates in the functional programming world. It allows the programmer to suspend and capture the remaining part of a computation in order to resume it later. We put a new Prolog-compatible face on this primitive and specify its semantics by means of a meta-interpreter. Moreover, we establish the power of delimited continuations in Prolog with several example definitions of high-level language features. Finally, we show how to easily and effectively add delimited continuations support to the WAM. Tom Schrijvers, Bart Demoen, Benoit Desouter, Jan Wielemaker |
Theory Pract. Log. Program. | 1 |
| 2012 | An Introduction to Search Combinators
Tom Schrijvers, Guido Tack, Pieter Wuille, Horst Samulowitz, Peter J. Stuckey |
LOPSTR | 1 |
| 2012 | Optimizing Inequality Joins in Datalog with Approximated Constraint Propagation
Dario Campagna, Beata Sarna-Starosta, Tom Schrijvers |
PADL | 3 |
| 2012 | The implicit calculus: a new foundation for generic programmingabstractGeneric programming (GP) is an increasingly important trend in programming languages. Well-known GP mechanisms, such as type classes and the C++0x concepts proposal, usually combine two features: 1) a special type of interfaces; and 2) implicit instantiation of implementations of those interfaces. Bruno C. d. S. Oliveira, Tom Schrijvers, Wontae Choi, Wonchan Lee, Kwangkeun Yi |
PLDI | 2 |
| 2012 | Tor: extensible search with hookable disjunctionabstractHorn Clause Programs have a natural depth-first procedural semantics. However, for many programs this procedural semantics is ineffective. In order to compute useful solutions, one needs the ability to modify the search method that explores the alternative execution branches. Tom Schrijvers, Markus Triska, Bart Demoen |
PPDP | 1 |
| 2012 | MRI: Modular reasoning about interference in incremental programmingabstractAbstract Incremental Programming (IP) is a programming style in which new program components are defined as increments of other components. Examples of IP mechanisms include Object-oriented programming inheritance, aspect-oriented programming advice, and feature-oriented programming . A characteristic of IP mechanisms is that, while individual components can be independently defined, the composition of components makes those components become tightly coupled, sharing both control and data flows. This makes reasoning about IP mechanisms a notoriously hard problem: modular reasoning about a component becomes very difficult; and it is very hard to tell if two tightly coupled components interfere with each other's control and data flows. This paper presents modular reasoning about interference (MRI), a purely functional model of IP embedded in Haskell. MRI models inheritance with mixins and side effects with monads. It comes with a range of powerful reasoning techniques: equational reasoning, parametricity, and reasoning with algebraic laws about effectful operations. These techniques enable MRI in the presence of side effects. MRI formally captures harmlessness , a hard-to-formalize notion in the interference literature, in two theorems. We prove these theorems with a non-trivial combination of all three reasoning techniques. Bruno C. d. S. Oliveira, Tom Schrijvers, William R. Cook |
J. Funct. Program. | 2 |
| 2012 | SWI-PrologabstractAbstract SWI-Prolog is neither a commercial Prolog system nor a purely academic enterprise, but increasingly a community project. The core system has been shaped to its current form while being used as a tool for building research prototypes, primarily for knowledge-intensive and interactive systems. Community contributions have added several interfaces and the constraint (CLP) libraries. Commercial involvement has created the initial garbage collector, added several interfaces and two development tools: PlDoc (a literate programming documentation system) and PlUnit (a unit testing environment). In this article, we present SWI-Prolog as an integrating tool, supporting a wide range of ideas developed in the Prolog community and acting as glue between foreign resources. This article itself is the glue between technical articles on SWI-Prolog, providing context and experience in applying them over a longer period. Jan Wielemaker, Tom Schrijvers, Markus Triska, Torbjörn Lager |
Theory Pract. Log. Program. | 2 |
| 2011 | Search Combinators
Tom Schrijvers, Guido Tack, Pieter Wuille, Horst Samulowitz, Peter J. Stuckey |
CP | 1 |
| 2011 | Monads, zippers and views: virtualizing the monad stackabstractWe make monadic components more reusable and robust to changes by employing two new techniques for virtualizing the monad stack: the monad zipper and monad views. The monad zipper is a higher-order monad transformer that creates virtual monad stacks by ignoring particular layers in a concrete stack. Monad views provide a general framework for monad stack virtualization: they take the monad zipper one step further and integrate it with a wide range of other virtualizations. For instance, particular views allow restricted access to monads in the stack. Furthermore, monad views provide components with a call-by-reference-like mechanism for accessing particular layers of the monad stack. Tom Schrijvers, Bruno C. d. S. Oliveira |
ICFP | 1 |
| 2011 | OutsideIn(X) Modular type inference with local assumptionsabstractAbstract Advanced type system features, such as GADTs, type classes and type families, have proven to be invaluable language extensions for ensuring data invariants and program correctness. Unfortunately, they pose a tough problem for type inference when they are used as local type assumptions. Local type assumptions often result in the lack of principal types and cast the generalisation of local let-bindings prohibitively difficult to implement and specify. User-declared axioms only make this situation worse. In this paper, we explain the problems and – perhaps controversially – argue for abandoning local let-binding generalisation. We give empirical results that local let generalisation is only sporadically used by Haskell programmers. Moving on, we present a novel constraint-based type inference approach for local type assumptions. Our system, called OutsideIn(X) , is parameterised over the particular underlying constraint domain X, in the same way as HM(X). This stratification allows us to use a common metatheory and inference algorithm. OutsideIn(X) extends the constraints of X by introducing implication constraints on top. We describe the strategy for solving these implication constraints, which, in turn, relies on a constraint solver for X. We characterise the properties of the constraint solver for X so that the resulting algorithm only accepts programs with principal types, even when the type system specification accepts programs that do not enjoy principal types. Going beyond the general framework, we give a particular constraint solver for X = type classes + GADTs + type families, a non-trivial challenge in its own right. This constraint solver has been implemented and distributed as part of GHC 7. Dimitrios Vytiniotis, Simon L. Peyton Jones, Tom Schrijvers, Martin Sulzmann |
J. Funct. Program. | 3 |
| 2010 | Strictness Meets Data Flow
Tom Schrijvers, Alan Mycroft |
SAS | 1 |
| 2010 | As time goes by: Constraint Handling RulesabstractAbstract Constraint Handling Rules (CHR) is a high-level programming language based on multiheaded multiset rewrite rules. Originally designed for writing user-defined constraint solvers, it is now recognized as an elegant general purpose language. Constraint Handling Rules related research has surged during the decade following the previous survey by Frühwirth (J. Logic Programming, Special Issue on Constraint Logic Programming, 1998, vol. 37, nos. 1–3, pp. 95–138). Covering more than 180 publications, this new survey provides an overview of recent results in a wide range of research areas, from semantics and analysis to systems, extensions, and applications. Jon Sneyers, Peter Van Weert, Tom Schrijvers, Leslie De Koninck |
Theory Pract. Log. Program. | 3 |
| 2009 | Complete and decidable type inference for GADTsabstractGADTs have proven to be an invaluable language extension, for ensuring data invariants and program correctness among others. Unfortunately, they pose a tough problem for type inference: we lose the principal-type property, which is necessary for modular type inference. Tom Schrijvers, Simon L. Peyton Jones, Martin Sulzmann, Dimitrios Vytiniotis |
ICFP | 1 |
| 2009 | Attributed Data for CHR Indexing
Beata Sarna-Starosta, Tom Schrijvers |
ICLP | 2 |
| 2009 | Towards a Framework for Constraint-Based Test Case Generation
François Degrave, Tom Schrijvers, Wim Vanhoof |
LOPSTR | 2 |
| 2009 | A Transformational Approach for Proving Properties of the CHR Constraint Store
Paolo Pilozzi, Tom Schrijvers, Maurice Bruynooghe |
LOPSTR | 2 |
| 2009 | Monadic constraint programmingabstractAbstract A constraint programming system combines two essential components: a constraint solver and a search engine. The constraint solver reasons about satisfiability of conjunctions of constraints, and the search engine controls the search for solutions by iteratively exploring a disjunctive search tree defined by the constraint program. In this paper we give a monadic definition of constraint programming in which the solver is defined as a monad threaded through the monadic search tree. We are then able to define search and search strategies as first-class objects that can themselves be built or extended by composable search transformers. Search transformers give a powerful and unifying approach to viewing search in constraint programming, and the resulting constraint programming system is first class and extremely flexible. Tom Schrijvers, Peter J. Stuckey, Philip Wadler |
J. Funct. Program. | 1 |
| 2009 | The computational power and complexity of constraint handling rulesabstractConstraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general-purpose programming. We introduce the CHR machine, a model of computation based on the operational semantics of CHR. Its computational power and time complexity properties are compared to those of the well-understood Turing machine and Random Access Memory machine. This allows us to prove the interesting result that every algorithm can be implemented in CHR with the best known time and space complexity. We also investigate the practical relevance of this result and the constant factors involved. Finally we expand the scope of the discussion to other (declarative) programming languages. Jon Sneyers, Tom Schrijvers, Bart Demoen |
ACM Trans. Program. Lang. Syst. | 2 |
| 2008 | Type checking with open type functionsabstractWe report on an extension of Haskell with open type-level functions and equality constraints that unifies earlier work on GADTs, functional dependencies, and associated types. The contribution of the paper is that we identify and characterise the key technical challenge of entailment checking; and we give a novel, decidable, sound, and complete algorithm to solve it, together with some practically-important variants. Our system is implemented in GHC, and is already in active use. Tom Schrijvers, Simon L. Peyton Jones, Manuel M. T. Chakravarty, Martin Sulzmann |
ICFP | 1 |
| 2008 | Constraint Handling Rules
Tom Schrijvers |
ICLP | 1 |
| 2008 | Towards Typed Prolog
Tom Schrijvers, Vítor Santos Costa, Jan Wielemaker, Bart Demoen |
ICLP | 1 |
| 2008 | Uniting the Prolog Community
Tom Schrijvers, Bart Demoen |
ICLP | 1 |
| 2008 | Transactions in Constraint Handling Rules
Tom Schrijvers, Martin Sulzmann |
ICLP | 1 |
| 2008 | Automatic Generation of Test Inputs for Mercury
François Degrave, Tom Schrijvers, Wim Vanhoof |
LOPSTR | 2 |
| 2008 | From Monomorphic to Polymorphic Well-Typings and Beyond
Tom Schrijvers, Maurice Bruynooghe, John P. Gallagher |
LOPSTR | 1 |
| 2008 | TCHR: a framework for tabled CLPabstractAbstract Tabled Constraint Logic Programming is a powerful execution mechanism for dealing with Constraint Logic Programming without worrying about fixpoint computation. Various applications, e.g. in the fields of program analysis and model checking, have been proposed. Unfortunately, a high-level system for developing new applications is lacking, and programmers are forced to resort to complicated ad hoc solutions. This papers presents TCHR, a high-level framework for tabled Constraint Logic Programming. It integrates in a light-weight manner Constraint Handling Rules (CHR), a high-level language for constraint solvers, with tabled Logic Programming. The framework is easily instantiated with new application-specific constraint domains. Various high-level operations can be instantiated to control performance. In particular, we propose a novel, generalized technique for compacting answer sets. Tom Schrijvers, Bart Demoen, David Scott Warren |
Theory Pract. Log. Program. | 1 |
| 2008 | Improving Prolog programs: Refactoring for PrologabstractAbstract Refactoring is an established technique from the object-oriented (OO) programming community to restructure code: it aims at improving software readability, maintainability, and extensibility. Although refactoring is not tied to the OO-paradigm in particular, its ideas have not been applied to logic programming until now. This paper applies the ideas of refactoring to Prolog programs. A catalogue is presented listing refactorings classified according to scope. Some of the refactorings have been adapted from the OO-paradigm, while others have been specifically designed for Prolog. The discrepancy between intended and operational semantics in Prolog is also addressed by some of the refactorings. In addition, ViPReSS, a semi-automatic refactoring browser, is discussed and the experience with applying ViPReSS to a large Prolog legacy system is reported. The main conclusion is that refactoring is both a viable technique in Prolog and a rather desirable one. Alexander Serebrenik, Tom Schrijvers, Bart Demoen |
Theory Pract. Log. Program. | 2 |
| 2007 | The Correspondence Between the Logical Algorithms Language and CHR
Leslie De Koninck, Tom Schrijvers, Bart Demoen |
ICLP | 2 |
| 2007 | Aggregates in Constraint Handling Rules
Jon Sneyers, Peter Van Weert, Tom Schrijvers, Bart Demoen |
ICLP | 3 |
| 2007 | User-definable rule priorities for CHRabstractThis paper introduces CHRrp: Constraint Handling Rules with user-definable rule priorities. CHRrp offers flexible execution control which is lacking in CHR. A formal operational semantics for the extended language is given and is shown to be an instance of the theoretical operational semantics of CHR. It is discussed how the CHR rp semantics influences confluence results. A translation scheme for CHRrp programs with static rule priorities into (regular) CHR is presented. The translation is proven correct and bench-mark results are given. CHRrp is related to priority systems in other constraint programming and rule based languages. Leslie De Koninck, Tom Schrijvers, Bart Demoen |
PPDP | 2 |
| 2006 | Principal Type Inference for GHC-Style Multi-parameter Type Classes
Martin Sulzmann, Tom Schrijvers, Peter J. Stuckey |
APLAS | 2 |
| 2006 | Memory Reuse for CHR
Jon Sneyers, Tom Schrijvers, Bart Demoen |
ICLP | 2 |
| 2006 | Polymorphic algebraic data type reconstructionabstractOne of the disadvantages of statically typed languages is the programming overhead caused by writing all the necessary type information: Both type declarations and type definitions are typically required. Traditional type inference aims at relieving the programmer from the former.We present a rule-based constraint rewriting algorithm that reconstructs both type declarations and type definitions, allowing the programmer to effectively program type-less in a strictly typed language. This effectively combines strong points of dynamically typed languages (rapid prototyping) and statically typed ones (documentation, optimized compilation). Moreover it allows to quickly port code from a statically untyped to a statically typed setting.Our constraint-based algorithm reconstructs uniform polymorphic definitions of algebraic data types and simultaneously infers the types of all expressions and functions (supporting polymorphic recursion) in the program. The declarative nature of the algorithm allows us to easily show that it has a number of highly desirable properties such as soundness, completeness and various optimality properties. Moreover, we show how to easily extend and adapt it to suit a number of different language constructs and type system features Tom Schrijvers, Maurice Bruynooghe |
PPDP | 1 |
| 2006 | Improving PARMA trailingabstractTaylor introduced a variable binding scheme for logic variables in his PARMA system, that uses cycles of bindings rather than the linear chains of bindings used in the standard WAM representation. Both the HAL and dProlog languages make use of the PARMA representation in their Herbrand constraint solvers. Unfortunately, PARMA's trailing scheme is considerably more expensive in both time and space consumption. The aim of this paper is to present several techniques that lower the cost. First, we introduce a trailing analysis for HAL using the classic PARMA trailing scheme that detects and eliminates unnecessary trailings. The analysis, whose accuracy comes from HAL's determinism and mode declarations, has been integrated in the HAL compiler and is shown to produce space improvements as well as speed improvements. Second, we explain how to modify the classic PARMA trailing scheme to halve its trailing cost. This technique is illustrated and evaluated both in the context of dProlog and HAL. Finally, we explain the modifications needed by the trailing analysis in order to be combined with our modified PARMA trailing scheme. Empirical evidence shows that the combination is more effective than any of the techniques when used in isolation. Tom Schrijvers, Bart Demoen, Maria Garcia de la Banda, Peter J. Stuckey |
Theory Pract. Log. Program. | 1 |
| 2006 | Optimal union-find in Constraint Handling RulesabstractConstraint Handling Rules (CHR) is a committed-choice rule-based language that was originally intended for writing constraint solvers. In this paper we show that it is also possible to write the classic union-find algorithm and variants in CHR. The programs neither compromise in declarativeness nor efficiency. We study the time complexity of our programs: they match the almost-linear complexity of the best known imperative implementations. This fact is illustrated with experimental results. Tom Schrijvers, Thom W. Frühwirth |
Theory Pract. Log. Program. | 1 |
| 2005 | Analyses, Optimizations and Extensions of Constraint Handling Rules: Ph.D. Summary
Tom Schrijvers |
ICLP | 1 |
| 2005 | Guard and Continuation Optimization for Occurrence Representations of CHR
Jon Sneyers, Tom Schrijvers, Bart Demoen |
ICLP | 2 |
| 2005 | Abstract interpretation for constraint handling rulesabstractProgram analysis is essential for the optimized compilation of Constraint Handling Rules (CHRs) as well as the inference of behavioral properties such as confluence and termination. Up to now all program analyses for CHRs have been developed in an ad hoc fashion.In this work we bring the general program analysis methodology of abstract interpretation to CHRs: we formulate an abstract interpretation framework over the call-based operational semantics of CHRs. The abstract interpretation framework is non-obvious since it needs to handle the highly non-deterministic execution of CHRs. The use of the framework is illustrated with two instantiations: the CHR-specific late storage analysis and the more generally known groundness analysis. In addition, we discuss optimizations based on these analyses and present experimental results. Tom Schrijvers, Peter J. Stuckey, Gregory J. Duck |
PPDP | 1 |
| 2004 | JmmSolve: A Generative Java Memory Model Implemented in Prolog and CHR
Tom Schrijvers |
ICLP | 1 |
| 2004 | Improving Prolog Programs: Refactoring for Prolog
Tom Schrijvers, Alexander Serebrenik |
ICLP | 1 |
| 2004 | Constraint Handling Rules and Tabled Execution
Tom Schrijvers, David Scott Warren |
ICLP | 1 |
| 2002 | Trailing Analysis for HAL
Tom Schrijvers, Maria Garcia de la Banda, Bart Demoen |
ICLP | 1 |
| 2002 | Combining an improvement to PARMA trailing with trailing analysisabstractTrailing of bindings in the PARMA variable representation is expensive in time and space. Two schemes are presented that lower its cost: the first is a technique that halves the space cost of trailing in PARMA. It can be used with conditional and unconditional trailing. It is illustrated and evaluated in the context of dProlog and in the Mercury backend of HAL. The second scheme combines a variant of a previously developed trailing analysis with the first technique. Empirical evidence shows the usefulness of these schemes and that the combination is more effective than each scheme apart. Tom Schrijvers, Bart Demoen |
PPDP | 1 |