Ohad Kammar

Ohad Kammar

Auto-generated profile, based on publicly available information

Ohad Kammar

University of Edinburgh, Edinburgh, United Kingdom

Research Focus & Metrics

Academic Career Length

9Years (2018-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
8 October 2019 in Journal of Functional Programming
Verified
Journal Article
Closed access
PDF file
YFYannick Forster
Yannick Forster
OKOhad Kammar
Ohad Kammar
SLSam Lindley
Sam Lindley
MPMatija Pretnar
Matija Pretnar
We compare the expressive power of three programming abstractions for user-defined computational effects: Plotkin and Pretnar’s effect handlers, Filinski’s monadic reflection, and delimited control. This comparison allows a precise discussion about the relative expressiveness of each programming abstraction. It also demonstrates the sensitivity of the relative expressiveness of user-defined effects to seemingly orthogonal language features. We present three calculi, one per abstraction, extending Levy’s call-by-push-value. For each calculus, we present syntax, operational semantics, a natural type-and-effect system, and, for effect handlers and monadic reflection, a set-theoretic denotational semantics. We establish their basic metatheoretic properties: safety, termination, and, where applicable, soundness and adequacy. Using Felleisen’s notion of a macro translation, we show that these abstractions can macro express each other, and show which translations preserve typeability. We use the adequate finitary set-theoretic denotational semantics for the monadic calculus to show that effect handlers cannot be macro expressed while preserving typeability either by monadic reflection or by delimited control. Our argument fails with simple changes to the type system such as polymorphism and inductive types. We supplement our development with a mechanised Abella formalisation.

1 December 2018 in Electronic Notes in Theoretical Computer Science
Verified
Journal Article
Open access
OKOhad Kammar
Ohad Kammar
DMDylan McDermott
Dylan McDermott

5 April 2024
Verified
Book Chapter
Open access
PDF file
YDYotam Dvir
Yotam Dvir
OKOhad Kammar
Ohad Kammar
OLOri Lahav
Ori Lahav
We present a compositional denotational semantics for a functional language with first-class parallel composition and shared-memory operations whose operational semantics follows the Release/Acquire weak memory model (RA). The semantics is formulated in Moggi’s monadic approach, and is based on Brookes-style traces. To do so we adapt Brookes’s traces to Kang et al.’s view-based machine for RA, and supplement Brookes’s mumble and stutter closure operations with additional operations, specific to RA. The latter provides a more nuanced understanding of traces that uncouples them from operational interrupted executions. We show that our denotational semantics is adequate and use it to validate various program transformations of interest. This is the first work to put weak memory models on the same footing as many other programming effects in Moggi’s standard monadic approach.

12 January 2022 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
OKOhad Kammar
Ohad Kammar
SKShin-Ya Katsumata
Shin-Ya Katsumata
PSPhilip Saville
Philip Saville
We present a construction which, under suitable assumptions, takes a model of Moggi’s computational λ-calculus with sum types, effect operations and primitives, and yields a model that is adequate and fully The construction, which uses the theory of fibrations, categorical glueing, ⊤⊤-lifting, and ⊤⊤-closure, takes inspiration from O’Hearn & Riecke’s fully abstract model for PCF. Our construction can be applied in the category of sets and functions, as well as the category of diffeological spaces and smooth maps and the category of quasi-Borel spaces, which have been studied as semantics for differentiable and probabilistic programming.

25 November 2022
Verified
Book Chapter
Closed access
PDF file
YDYotam Dvir
Yotam Dvir
OKOhad Kammar
Ohad Kammar
OLOri Lahav
Ori Lahav

1 May 2025
Verified
Book Chapter
Open access
PDF file
YDYotam Dvir
Yotam Dvir
OKOhad Kammar
Ohad Kammar
OLOri Lahav
Ori Lahav
GPGordon Plotkin
Gordon Plotkin
We define a two sorted equational theory of algebraic effects that models concurrent shared state with preemptive interleaving, recovering Brookes’s seminal 1996 trace-based model precisely. The decomposition allows us to analyse Brookes’s model algebraically in terms of separate but interacting components. The multiple sorts partition terms into layers. We use two sorts: a “hold” sort for layers that disallow interleaving of environment memory accesses, analogous to holding a global lock on the memory; and a “cede” sort for the opposite. The algebraic signature comprises of independent interlocking components: two new operators that switch between these sorts, delimiting the atomic layers, thought of as acquiring and releasing the global lock; non-deterministic choice; and state-accessing operators. The axioms similarly divide cleanly: the delimiters behave as a closure pair; all operators are strict, and distribute over non-empty non-deterministic choice; and non-deterministic global state obeys Plotkin and Power’s presentation of global state. Our representation theorem expresses the free algebras over a two-sorted family of variables as sets of traces with suitable closure conditions. When the held sort has no variables, we recover Brookes’s trace semantics. We define several other single-and two-sorted theories to elucidate the connection to Brookes’s model via translation embeddings and equivalences.