Skip to main content

Showing 1–14 of 14 results for author: Pretnar, M

Searching in archive cs. Search in all archives.
.
  1. arXiv:2404.04218  [pdf, other

    cs.PL

    Simplifying explicit subty** coercions in a polymorphic calculus with effects

    Authors: Filip Koprivec, Matija Pretnar

    Abstract: Algebraic effect handlers are becoming increasingly popular way of structuring and reasoning about effectful computations, and their performance is often a concern. One of the proposed approaches towards efficient compilation is tracking effect information through explicit subty** coercions. However, in the presence of polymorphism, these coercions are compiled to additional arguments of compile… ▽ More

    Submitted 5 April, 2024; originally announced April 2024.

    Comments: 34 pages, 10 figures

  2. arXiv:2311.07223  [pdf, other

    cs.PL

    Wasm SpecTec: Engineering a Formal Language Standard

    Authors: Joachim Breitner, Philippa Gardner, Jaehyun Lee, Sam Lindley, Matija Pretnar, Xiaojia Rao, Andreas Rossberg, Sukyoung Ryu, Wonho Shin, Conrad Watt, Dongjun Youn

    Abstract: WebAssembly (Wasm) is a low-level bytecode language and virtual machine, intended as a compilation target for a wide range of programming languages, which is seeing increasing adoption across diverse ecosystems. As a young technology, Wasm continues to evolve -- it reached version 2.0 last year and another major update is expected soon. For a new feature to be standardised in Wasm, four key arte… ▽ More

    Submitted 13 November, 2023; originally announced November 2023.

    Comments: 5 pages, 7 figures

  3. arXiv:2308.08347  [pdf, ps, other

    cs.PL

    Continuing WebAssembly with Effect Handlers

    Authors: Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, KC Sivaramakrishnan, Matija Pretnar, Sam Lindley

    Abstract: WebAssembly (Wasm) is a low-level portable code format offering near native performance. It is intended as a compilation target for a wide variety of source languages. However, Wasm provides no direct support for non-local control flow features such as async/await, generators/iterators, lightweight threads, first-class continuations, etc. This means that compilers for source languages with such fe… ▽ More

    Submitted 13 September, 2023; v1 submitted 16 August, 2023; originally announced August 2023.

  4. arXiv:2307.13795  [pdf, other

    cs.PL cs.LO

    Higher-Order Asynchronous Effects

    Authors: Danel Ahman, Matija Pretnar

    Abstract: We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls into signalling that an operation's implementation needs to be executed, and interrupting a running computation with the operation's result, to which the computa… ▽ More

    Submitted 27 June, 2024; v1 submitted 25 July, 2023; originally announced July 2023.

    Comments: Extended version of POPL 2021 paper "Asynchronous Effects", arXiv:2003.02110

  5. Explicit Effect Subty**

    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 subty**-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

  6. Local Algebraic Effect Theories

    Authors: Žiga Lukšič, Matija Pretnar

    Abstract: Algebraic effects are computational effects that can be described with a set of basic operations and equations between them. As many interesting effect handlers do not respect these equations, most approaches assume a trivial theory, sacrificing both reasoning power and safety. We present an alternative approach where the type system tracks equations that are observed in subparts of the program,… ▽ More

    Submitted 27 May, 2020; originally announced May 2020.

    Comments: 24 pages, 8 figures

    Journal ref: LUKSIC, Z, & PRETNAR, M. (2020). Local algebraic effect theories. Journal of Functional Programming, 30, E13

  7. Asynchronous Effects

    Authors: Danel Ahman, Matija Pretnar

    Abstract: We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls into signalling that an operation's implementation needs to be executed, and interrupting a running computation with the operation's result, to which the computa… ▽ More

    Submitted 14 November, 2020; v1 submitted 4 March, 2020; originally announced March 2020.

    Comments: POPL 2021 camera ready version

  8. arXiv:1802.06217  [pdf, ps, other

    cs.LO

    Design and Implementation of the Andromeda Proof Assistant

    Authors: Andrej Bauer, Gaëtan Gilbert, Philipp G. Haselwarter, Matija Pretnar, Christopher A. Stone

    Abstract: Andromeda is an LCF-style proof assistant where the user builds derivable judgments by writing code in a meta-level programming language AML. The only trusted component of Andromeda is a minimalist nucleus (an implementation of the inference rules of an object-level type theory), which controls construction and decomposition of type-theoretic judgments. Since the nucleus does not perform complex… ▽ More

    Submitted 17 February, 2018; originally announced February 2018.

    MSC Class: 03B15

  9. arXiv:1610.09161  [pdf, ps, other

    cs.LO cs.PL

    On the Expressive Power of User-Defined Effects: Effect Handlers, Monadic Reflection, Delimited Control

    Authors: Yannick Forster, Ohad Kammar, Sam Lindley, Matija Pretnar

    Abstract: We compare the expressive power of three programming abstractions for user-defined computational effects: Bauer and Pretnar's effect handlers, Filinski's monadic reflection, and delimited control without answer-type-modification. This comparison allows a precise discussion about the relative expressiveness of each programming abstraction. It also demonstrates the sensitivity of the relative expres… ▽ More

    Submitted 28 February, 2017; v1 submitted 28 October, 2016; originally announced October 2016.

  10. No value restriction is needed for algebraic effects and handlers

    Authors: Ohad Kammar, Matija Pretnar

    Abstract: We present a straightforward, sound Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which allows type variable generalisation of arbitrary computations, not just values. This result is surprising. On the one hand, the soundness of unrestricted call-by-value Hindley-Milner polymorphism is known to fail in the presence of computational effects s… ▽ More

    Submitted 23 May, 2016; originally announced May 2016.

    Journal ref: Journal of Functional Programming, 27, 2017

  11. Inferring Algebraic Effects

    Authors: Matija Pretnar

    Abstract: We present a complete polymorphic effect inference algorithm for an ML-style language with handlers of not only exceptions, but of any other algebraic effect such as input & output, mutable references and many others. Our main aim is to offer the programmer a useful insight into the effectful behaviour of programs. Handlers help here by cutting down possible effects and the resulting lengthy outp… ▽ More

    Submitted 11 September, 2014; v1 submitted 9 December, 2013; originally announced December 2013.

    Journal ref: Logical Methods in Computer Science, Volume 10, Issue 3 (September 12, 2014) lmcs:1004

  12. Handling Algebraic Effects

    Authors: Gordon D Plotkin, Matija Pretnar

    Abstract: Algebraic effects are computational effects that can be represented by an equational theory whose operations produce the effects at hand. The free model of this theory induces the expected computational monad for the corresponding effect. Algebraic effects include exceptions, state, nondeterminism, interactive input/output, and time, and their combinations. Exception handling, however, has so far… ▽ More

    Submitted 16 December, 2013; v1 submitted 4 December, 2013; originally announced December 2013.

    Comments: 36 pages

    Journal ref: Logical Methods in Computer Science, Volume 9, Issue 4 (December 17, 2013) lmcs:705

  13. An Effect System for Algebraic Effects and Handlers

    Authors: Andrej Bauer, Matija Pretnar

    Abstract: We present an effect system for core Eff, a simplified variant of Eff, which is an ML-style programming language with first-class algebraic effects and handlers. We define an expressive effect system and prove safety of operational semantics with respect to it. Then we give a domain-theoretic denotational semantics of core Eff, using Pitts's theory of minimal invariant relations, and prove it ade… ▽ More

    Submitted 9 December, 2014; v1 submitted 26 June, 2013; originally announced June 2013.

    Journal ref: Logical Methods in Computer Science, Volume 10, Issue 4 (December 10, 2014) lmcs:1153

  14. Programming with Algebraic Effects and Handlers

    Authors: Andrej Bauer, Matija Pretnar

    Abstract: Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras. Eff supports first-class effects and handlers through which we may easily define new computational effects, seamlessly combine existing ones, and handle them in novel ways. We give a denotational semanti… ▽ More

    Submitted 7 March, 2012; originally announced March 2012.

    ACM Class: D.3.3; F.3.3

    Journal ref: Journal of Logical and Algebraic Methods in Programming. Volume 84, Issue 1, January 2015, Pages 108-123