Skip to main content

Showing 1–34 of 34 results for author: Schrijvers, T

  1. Let a Thousand Flowers Bloom: An Algebraic Representation for Edge Graphs

    Authors: Jack Liell-Cock, Tom Schrijvers

    Abstract: Context: Edge graphs are graphs whose edges are labelled with identifiers, and nodes can have multiple edges between them. They are used to model a wide range of systems, including networks with distances or degrees of connection and complex relational data. Inquiry: Unfortunately, the homogeneity of this graph structure prevents an effective representation in (functional) programs. Either their… ▽ More

    Submitted 4 March, 2024; originally announced March 2024.

    Journal ref: The Art, Science, and Engineering of Programming, 2024, Vol. 8, Issue 3, Article 9

  2. arXiv:2312.02054  [pdf, ps, other

    cs.PL

    From High to Low: Simulating Nondeterminism and State with State

    Authors: Wenhao Tang, Tom Schrijvers

    Abstract: 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 optimisation… ▽ More

    Submitted 4 December, 2023; originally announced December 2023.

    Comments: 120 pages

  3. arXiv:2305.07878  [pdf, ps, other

    cs.PL

    Automatic Differentiation in Prolog

    Authors: Tom Schrijvers, Birthe van den Berg, Fabrizio Riguzzi

    Abstract: 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 va… ▽ More

    Submitted 13 May, 2023; originally announced May 2023.

    Comments: accepted for publication in the issues of Theory and Practice of Logic Programming dedicated to ICLP 2023

  4. arXiv:2304.09697  [pdf, ps, other

    cs.PL

    A Calculus for Scoped Effects & Handlers

    Authors: Roger Bosman, Birthe van den Berg, Wenhao Tang, Tom Schrijvers

    Abstract: Algebraic 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… ▽ More

    Submitted 5 March, 2024; v1 submitted 19 April, 2023; originally announced April 2023.

  5. arXiv:2302.01415  [pdf, ps, other

    cs.PL cs.LO

    A Framework for Higher-Order Effects & Handlers

    Authors: Birthe van den Berg, Tom Schrijvers

    Abstract: Algebraic 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 alg… ▽ More

    Submitted 2 February, 2023; originally announced February 2023.

  6. arXiv:2212.11088  [pdf, ps, other

    cs.PL

    Forward- or Reverse-Mode Automatic Differentiation: What's the Difference?

    Authors: Birthe van den Berg, Tom Schrijvers, James McKinna, Alexander Vandenbroucke

    Abstract: Automatic 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 orig… ▽ More

    Submitted 9 August, 2023; v1 submitted 21 December, 2022; originally announced December 2022.

  7. arXiv:2206.09206  [pdf, other

    cs.SE

    Fusing Industry and Academia at GitHub (Experience Report)

    Authors: Patrick Thomson, Rob Rix, Nicolas Wu, Tom Schrijvers

    Abstract: GitHub 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 e… ▽ More

    Submitted 18 June, 2022; originally announced June 2022.

    Comments: 14 pages, 2 figures, submitted to ICFP 2022

    ACM Class: D.2.m

  8. arXiv:2201.10287  [pdf, ps, other

    cs.PL

    Structured Handling of Scoped Effects: Extended Version

    Authors: Zhixuan Yang, Marco Paviotti, Nicolas Wu, Birthe van den Berg, Tom Schrijvers

    Abstract: 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 practi… ▽ More

    Submitted 25 January, 2022; originally announced January 2022.

    Comments: Extended version of the paper Structured Handling of Scoped Effects in ESOP 2022

  9. arXiv:2108.11155  [pdf, other

    cs.PL

    Latent Effects for Reusable Language Components: Extended Version

    Authors: Birthe van den Berg, Tom Schrijvers, Casper Bach-Poulsen, Nicolas Wu

    Abstract: The development of programming languages can be quite complicated and costly. Hence, much effort has been devoted to the modular definition of language features that can be reused in various combinations to define new languages and experiment with their semantics. A notable outcome of these efforts is the algebra-based "datatypes a la carte" (DTC) approach. When combined with algebraic effects, DT… ▽ More

    Submitted 25 August, 2021; originally announced August 2021.

    Comments: extended version of APLAS 2021 paper

  10. arXiv:2108.02972  [pdf, ps, other

    cs.PL cs.LO

    Disjunctive Delimited Control

    Authors: Alexander Vandenbroucke, Tom Schrijvers

    Abstract: 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… ▽ More

    Submitted 6 August, 2021; originally announced August 2021.

    Comments: Pre-proceedings paper presented at the 31st International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR 2021), Tallinn, Estonia, and Virtual, September 7-8, 2021 (arXiv:2107.10160). arXiv admin note: substantial text overlap with arXiv:2009.04909

    Report number: LOPSTR/2021/8

  11. arXiv:2010.06216  [pdf, other

    cs.PL cs.LO

    Resolution as Intersection Subtyping via Modus Ponens

    Authors: Koar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios Karachalias

    Abstract: Resolution 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.… ▽ More

    Submitted 15 October, 2020; v1 submitted 13 October, 2020; originally announced October 2020.

    Comments: 43 pages, 20 figures; typos corrected, link to artifact added

  12. arXiv:2009.09975  [pdf, other

    cs.FL

    Grey-Box Learning of Register Automata

    Authors: Bharat Garhewal, Frits Vaandrager, Falk Howar, Timo Schrijvers, Toon Lenaerts, Rob Smits

    Abstract: Model learning (a.k.a. active automata learning) is a highly effective technique for obtaining black-box finite state models of software components. Thus far, generalisation to infinite state systems with inputs/outputs that carry data parameters has been challenging. Existing model learning tools for infinite state systems face scalability problems and can only be applied to restricted classes of… ▽ More

    Submitted 21 September, 2020; originally announced September 2020.

    Comments: To be published in iFM'2020 27 pages, 6 figures, 1 table

  13. arXiv:2009.04909  [pdf, ps, other

    cs.PL

    Disjunctive Delimited Control

    Authors: Alexander Vandenbroucke, Tom Schrijvers

    Abstract: 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… ▽ More

    Submitted 7 March, 2023; v1 submitted 10 September, 2020; originally announced September 2020.

    Comments: Other version of paper is available at: arXiv:2108.02972. This paper is under consideration for publication in Theory and Practice of Logic Programming (TPLP)

  14. Explicit Effect Subtyping

    Authors: Georgios Karachalias, Matija Pretnar, Amr Hany Saleh, Stien Vanderhallen, Tom Schrijvers

    Abstract: 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 optimizing compiler could be built. Unfortunately, in our experience, implementing optimizations for Eff is overly error-prone because its core language is implicitly-typed,… ▽ More

    Submitted 28 May, 2020; originally announced May 2020.

    Comments: 57 pages, 29 figures

    Journal ref: J. Funct. Prog. 30 (2020) e15

  15. arXiv:2002.02171  [pdf, ps, other

    cs.PL

    PaSe: An Extensible and Inspectable DSL for Micro-Animations

    Authors: Ruben P. Pieters, Tom Schrijvers

    Abstract: This paper presents PaSe, an extensible and inspectable DSL embedded in Haskell for expressing micro-animations. The philosophy of PaSe is to compose animations based on sequential and parallel composition of smaller animations. This differs from other animation libraries that focus more on sequential composition and have only limited forms of parallel composition. To provide similar flexibility a… ▽ More

    Submitted 6 February, 2020; originally announced February 2020.

  16. Lazy Stream Programming in Prolog

    Authors: Paul Tarau, Jan Wielemaker, Tom Schrijvers

    Abstract: In recent years, stream processing has become a prominent approach for incrementally handling large amounts of data, with special support and libraries in many programming languages. Unfortunately, support in Prolog has so far been lacking and most existing approaches are ad-hoc. To remedy this situation, we present lazy stream generators as a unified Prolog interface for stateful computations on… ▽ More

    Submitted 19 September, 2019; v1 submitted 25 July, 2019; originally announced July 2019.

    Comments: In Proceedings ICLP 2019, arXiv:1909.07646

    Journal ref: EPTCS 306, 2019, pp. 224-237

  17. Coherence of Type Class Resolution

    Authors: Gert-Jan Bottu, Ningning Xie, Koar Marntirosian, Tom Schrijvers

    Abstract: Elaboration-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 ela… ▽ More

    Submitted 15 July, 2019; v1 submitted 1 July, 2019; originally announced July 2019.

    Comments: Accepted to ICFP 2019

    MSC Class: 68N15; 68N18 ACM Class: D.3.1

  18. arXiv:1906.12242  [pdf, other

    cs.PL

    Bidirectional Type Class Instances (Extended Version)

    Authors: Koen Pauwels, Georgios Karachalias, Michiel Derhaeg, Tom Schrijvers

    Abstract: GADTs were introduced in Haskell's eco-system more than a decade ago, but their interaction with several mainstream features such as type classes and functional dependencies has a lot of room for improvement. More specifically, for some GADTs it can be surprisingly difficult to provide an instance for even the simplest of type classes. In this paper we identify the source of this shortcoming and… ▽ More

    Submitted 1 July, 2019; v1 submitted 28 June, 2019; originally announced June 2019.

  19. arXiv:1608.00816  [pdf, ps, other

    cs.PL

    Efficient Algebraic Effect Handlers for Prolog

    Authors: Amr Hany Saleh, Tom Schrijvers

    Abstract: Recent work has provided delimited control for 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 introduces algebraic effect handlers for Prolog, as a high-level and structured way of definin… ▽ More

    Submitted 2 August, 2016; originally announced August 2016.

    Comments: Paper presented at the 32nd International Conference on Logic Programming (ICLP 2016), New York City, USA, 16-21 October 2016, LaTex, 14 pages, 2 figures

  20. arXiv:1608.00787  [pdf, ps, other

    cs.PL

    Tabling with Sound Answer Subsumption

    Authors: Alexander Vandenbroucke, Maciej Piróg, Benoit Desouter, Tom Schrijvers

    Abstract: 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,… ▽ More

    Submitted 2 August, 2016; originally announced August 2016.

    Comments: Paper presented at the 32nd International Conference on Logic Programming (ICLP 2016), New York City, USA, 16-21 October 2016, 15 pages, LaTeX, 0 PDF figures

  21. arXiv:1511.09394  [pdf, ps, other

    cs.LO

    Proof Relevant Corecursive Resolution

    Authors: Peng Fu, Ekaterina Komendantskaya, Tom Schrijvers, Andrew Pond

    Abstract: Resolution lies at the foundation of both logic programming and type class context reduction in functional languages. Terminating derivations by resolution have well-defined inductive meaning, whereas some non-terminating derivations can be understood coinductively. Cycle detection is a popular method to capture a small subset of such derivations. We show that in fact cycle detection is a restrict… ▽ More

    Submitted 30 November, 2015; originally announced November 2015.

    Comments: 23 pages, with appendices in FLOPS 2016

  22. Reasoning about modular datatypes with Mendler induction

    Authors: Paolo Torrini, Tom Schrijvers

    Abstract: In functional programming, datatypes a la carte provide a convenient modular representation of recursive datatypes, based on their initial algebra semantics. Unfortunately it is highly challenging to implement this technique in proof assistants that are based on type theory, like Coq. The reason is that it involves type definitions, such as those of type-level fixpoint operators, that are not stri… ▽ More

    Submitted 10 September, 2015; originally announced September 2015.

    Comments: In Proceedings FICS 2015, arXiv:1509.02826

    ACM Class: I.2.3; F.4.1

    Journal ref: EPTCS 191, 2015, pp. 143-157

  23. Tabling as a Library with Delimited Control

    Authors: Benoit Desouter, Tom Schrijvers, Marko van Dooren

    Abstract: 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. Ou… ▽ More

    Submitted 29 July, 2015; originally announced July 2015.

    Comments: 15 pages. To appear in Theory and Practice of Logic Programming (TPLP), Proceedings of ICLP 2015

    Journal ref: Theory and Practice of Logic Programming 15 (2015) 419-433

  24. arXiv:1307.4635  [pdf, other

    cs.PL cs.DB

    Integrating Datalog and Constraint Solving

    Authors: Benoit Desouter, Tom Schrijvers

    Abstract: LP is a common formalism for the field of databases and CSP, both at the theoretical level and the implementation level in the form of Datalog and CLP. In the past, close correspondences have been made between both fields at the theoretical level. Yet correspondence at the implementation level has been much less explored. In this article we work towards relating them at the implementation level. C… ▽ More

    Submitted 17 July, 2013; originally announced July 2013.

    Comments: Proceedings of the 13th International Colloquium on Implementation of Constraint LOgic Programming Systems (CICLOPS 2013), Istanbul, Turkey, August 25, 2013

  25. arXiv:1203.4499  [pdf, ps, other

    cs.PL

    Extended Report: The Implicit Calculus

    Authors: Bruno C. d. S. Oliveira, Tom Schrijvers, Wontae Choi, Wonchan Lee, Kwangkeun Yi

    Abstract: Generic 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. Scala implicits are a GP language mechanism, inspired by type classes, that break with the traditio… ▽ More

    Submitted 20 March, 2012; originally announced March 2012.

    Comments: 13 pages, extended report of paper accepted at PLDI 2012

  26. arXiv:1203.1095  [pdf, other

    cs.AI

    Search Combinators

    Authors: Tom Schrijvers, Guido Tack, Pieter Wuille, Horst Samulowitz, Peter J. Stuckey

    Abstract: The ability to model search in a constraint solver can be an essential asset for solving combinatorial problems. However, existing infrastructure for defining search heuristics is often inadequate. Either modeling capabilities are extremely limited or users are faced with a general-purpose programming language whose features are not tailored towards writing search heuristics. As a result, major im… ▽ More

    Submitted 5 March, 2012; originally announced March 2012.

  27. arXiv:1112.3787  [pdf, other

    cs.PL

    Approximating Constraint Propagation in Datalog

    Authors: Dario Campagna, Beata Sarna-Starosta, Tom Schrijvers

    Abstract: We present a technique exploiting Datalog with aggregates to improve the performance of programs with arithmetic (in)equalities. Our approach employs a source-to-source program transformation which approximates the propagation technique from Constraint Programming. The experimental evaluation of the approach shows good run time speed-ups on a range of non-recursive as well as recursive programs. F… ▽ More

    Submitted 16 December, 2011; originally announced December 2011.

    Comments: Online Proceedings of the 11th International Colloquium on Implementation of Constraint LOgic Programming Systems (CICLOPS 2011), Lexington, KY, U.S.A., July 10, 2011

    ACM Class: D.1.6; D.3

  28. arXiv:1011.5332  [pdf, other

    cs.PL

    SWI-Prolog

    Authors: Jan Wielemaker, Tom Schrijvers, Markus Triska, Torbjörn Lager

    Abstract: 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 \textit{knowledge-intensive} and \textit{interactive} systems. Community contributions have added several interfaces and the constraint (CLP) libraries.… ▽ More

    Submitted 24 November, 2010; originally announced November 2010.

    Comments: 30 pages, 6 figures, 1 table. To appear in Theory and Practice of Logic Programming (TPLP)

  29. arXiv:0906.4474  [pdf, ps, other

    cs.PL

    As time goes by: Constraint Handling Rules - A survey of CHR research from 1998 to 2007

    Authors: Jon Sneyers, Peter Van Weert, Tom Schrijvers, Leslie De Koninck

    Abstract: Constraint Handling Rules (CHR) is a high-level programming language based on multi-headed multiset rewrite rules. Originally designed for writing user-defined constraint solvers, it is now recognized as an elegant general purpose language. CHR-related research has surged during the decade following the previous survey by Fruehwirth. Covering more than 180 publications, this new survey provides… ▽ More

    Submitted 25 June, 2009; v1 submitted 24 June, 2009; originally announced June 2009.

    Comments: 49 pages. To appear in Theory and Practice of Logic Programming

    ACM Class: D.1.3; D.1.6; D.3.0; F.3.2; J.0

  30. arXiv:0712.3830  [pdf, ps, other

    cs.PL

    TCHR: a framework for tabled CLP

    Authors: Tom Schrijvers, Bart Demoen, David S. Warren

    Abstract: 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… ▽ More

    Submitted 26 December, 2007; originally announced December 2007.

    Comments: Accepted for publication in Theory and Practice of Logic Programming

  31. arXiv:cs/0702083  [pdf, ps, other

    cs.SE

    Improving Prolog programs: Refactoring for Prolog

    Authors: Alexander Serebrenik, Tom Schrijvers, Bart Demoen

    Abstract: 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 catalogu… ▽ More

    Submitted 14 February, 2007; originally announced February 2007.

    Comments: To appear in Theory and Practice of Logic Programming (TPLP)

    Report number: 2006-1 ACM Class: D.2.7; D.1.6

  32. arXiv:cs/0505085  [pdf, ps, other

    cs.PL cs.PF

    Improving PARMA Trailing

    Authors: Tom Schrijvers, Maria Garcia de la Banda, Bart Demoen, Peter J. Stuckey

    Abstract: Taylor 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 spac… ▽ More

    Submitted 31 May, 2005; originally announced May 2005.

    Comments: 36 pages, 7 figures, 8 tables

    ACM Class: D.3.4; D.1.6; D.3.3

  33. arXiv:cs/0501073  [pdf, ps, other

    cs.PL cs.CC cs.DS cs.PF

    Optimal Union-Find in Constraint Handling Rules

    Authors: Tom Schrijvers, Thom Fruehwirth

    Abstract: Constraint 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… ▽ More

    Submitted 25 January, 2005; originally announced January 2005.

    Comments: 12 pages, 3 figures, to appear in Theory and Practice of Logic Programming (TPLP)

  34. arXiv:cs/0406026  [pdf, ps, other

    cs.SE cs.PL

    Improving Prolog Programs: Refactoring for Prolog

    Authors: Tom Schrijvers, Alexander Serebrenik

    Abstract: Refactoring is an established technique from the OO-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 refacto… ▽ More

    Submitted 16 June, 2004; originally announced June 2004.

    Comments: To appear in ICLP 2004

    ACM Class: D.2.7; D.1.6