Brandenburg

From ifipwg21

Meeting Information

The 77th meeting was organised by Cezar Ionescu and Eva Richter.

Location: Seehotel Brandenburg (Beetzsee room) near Brandenburg an der Havel, Germany. For practical information, go to Brandenburg (practical).

Dates

Sunday 2018-07-01 to Friday 2018-07-06.

Participants

Name Function
Cezar Ionescu organizer
Carroll Morgan chair
Tom Schrijvers secretary
Lambert Meertens
Doaitse Swierstra
Jeremy Gibbons
Patrik Jansson
José Pedro Magalhães
José Oliveira
Meng Wang
Matija Pretnar
Janis Voigtländer
Florian Rabe
Zhenjiang Hu
Moa Johansson
James McKinna
Sam Lindley
Peter Höfner
Oleg Kiselyov
Walter Guttmann
Conor McBride
Andres Löh
Bruno Oliveira
Wouter Swierstra
Fritz Henglein
Eva Richter local observer
Tim Richter local observer
Nicola Botta local observer

See also the table of participants on the “practical” page for detailed practical information

Organizational and administrative matters

Friday morning, July 6, 2018.

Membership
These private matters are not recorded in the public version of the minutes.
Formal resolution
The members and observers of IFIP WG2.1 present at Meeting #77 in Brandenburg will remember it for its conspicuous juxtaposition of opposites. There was the bustle of Brandenburg against the rustic isolation of the Seehotel; then the many hours seated, but followed by literally tens of thousands of steps briskly walking to dinner and back; and the request for +5 extra bicycles that in fact led to -5 extra bicycles' being provided; the exalted abstraction of many-sorted morally co-inductive forgetfully functorial attribute grammars, enclosed all together in quasi-quotes, vs. the ancient simplicity of Eratosthenes' Sieve; and the transporting beauty of mediaeval music sung before a five-hundred-year-old ornamental Altar in that very Dom where --so the story goes-- in the year 980 the Bishop himself was transported to his death below through a hole in the high vault of the right-hand transept (because his dogs were barking out-of-tune); and finally from the exquisite dinner at the Inspektorenhaus to the surprising ubiquity of rotting fish. Thank you Cezar Ionescu and Eva Richter for organising all of this for the Group in such an efficient and well judged way!

Next meetings:

  • M78 (Mar 2019) Taiwan.
  • M79 (Dec 2019) Romania?

Technical presentations in scheduled order

Eva Richter, Clean-up Monad (Monday, July 2, 2018, 11:08)

TBD

Patrik Jansson, Type Safe Interpreters for Free (Monday, July 2, 2018, 11:55)

Many programs written in the functional programming language Haskell take advantage of its advanced type system. Haskell's type system is very expressive and allows us to write interesting programs without sacrificing type safety. Haskell programs that expose its API to an open world, however, are faced with the problem of dynamic type checking. Existing techniques that address this problem, such as Typeable and Dynamic, are often closed and difficult to extend. We have constructed an extensible library for describing APIs using annotated type representations. As a result, API calls can be interpreted in a type safe manner without any extra programming effort. In addition, the user has full control over the universe of allowed types, which helps to catch any misconceptions in an early stage. We have applied our technique to connect a real-world DSL (GRACe) to a !JavaScript GUI.

Authors: M. Algehed, S. H. Einarsdóttir, A. Gerdes, P. Jansson

Slides for "Type Safe Interpreters for Free"

Source code on github

Jose Oliveira, What happened to the Oxford boxes? (Monday, July 2, 2018, 14:04)

In this (non technical) talk I will report on the outcome of the archival treatment of the collection donated by WG2.1 chairman Willem van der Poel, which has taken place in the Braga District Archives (ADB) since the agreement signed between ADB and WG2.1 in November, last year. The collection (1509 documents in total) has been re-organized, classified and made available on the web, including scanning (still on-going). Further to technical reports and scientific work, it includes a very comprehensive account of the correspondence exchanged by WG2.1 members, in particular by those involved in the "Algol effort". (Slides)

Jeremy Gibbons, Profunctor Optics and the Yoneda Lemma (Monday, July 2, 2018, 14:24):

At Meeting 75 I gave a talk on Profunctor Optics, a higher-order, higher-ranked representation of modular accessors into data structures ("composable references"). At that time I had only a brute-force proof that a profunctor representation of an optic was equivalent to the corresponding concrete representation in terms of a "getter" and "setter". I now have a much neater proof, which basically boils down to the Yoneda Lemma - one of the key results in category theory, due as it happens to a former member of this group. I gave a general introduction to the Yoneda Lemma (it has a number of other interesting applications); and veery briefly discussed the connection to profunctor optics; or do both. This is joint work with my student Guillaume Boisseau, and to appear at ICFP 2018.

(Slides)

Bruno Oliveira, Unifying Typing and Subtyping (Monday, July 2, 2018, 15:00)

This talk is about how to develop typed calculi that support dependent types and subtyping. The long-term motivation for this is to develop Functional Object-Oriented Programming languages, which add features like Subtyping and Inheritance on top of conventional FP. A key challenge in combining dependent types and subtyping is the strong coupling between the typing and subtyping relations. Many previous works aimed at untangling the two relations, at the cost of several compromises. In particular none of the previous works managed to fully subsume Fsub: the canonical Polymorphic Lambda Calculus with subtyping. This work proposes the opposite: we embrace the tangling and instead develop a single, unified subtyping relation that subsumes both typing and subtyping. I will discuss the key idea, explain the main challenges and achievements. In particular, our calculus is able to fully subsume Fsub, while enabling simple forms of dependent types, higher-kinds and kind polymorphism.

Slides

Andres Löh, Deriving Via (Monday, July 2, 2018, 16:02)

The Haskell language has type classes, which are a bit like interfaces. When instantiating such a type class for a given datatype, the programmer is either fortunate, and can use one of the built-in deriving mechanisms of the compiler, which means no work and getting the instance for free. More often than not, though, the programmer is not fortunate, because derivation is not supported for the class or datatype in question, or because the deriving mechanism does not yield the desired implementation. Then one has to define the instance manually, by providing implementations for each of the class methods.

_Deriving Via is a language extension for Haskell which allows you to define rules that describe how to construct new instances out of already existing instances. Rules are very flexible. They can be named, composed, and explicitly invoked, providing the programmer with a high-level programmatic way to construct new instances with little effort.

The talk introduces the language extension, describes how it works, and shows several examples of its use.

DerivingVia.pdf

Oleg Kiselyov, Lambda to SKI (Monday, July 2, 2018, 17:08)

TBD

Web page

Moa Johansson, Theory Exploration in Hipster (Tuesday, July 3, 2018, 9:00)

TBD

Slides

Wouter Swierstra, From Algebra to Abstract Machine (Tuesday, July 3, 2018, 10:00)

In this talk I wanted to show how to prove that the abstract machine arising from dissecting a fold, terminates and preserves semantics.(wouter-slides.pdf

Nicola Botta, Specifications in Small and Large Contexts (Tuesday, July 3, 2018, 11:01)

Dependently typed languages support both the implementation of

programs and the unambiguous specification of programming tasks or challenges. I am going to discuss elementary questions that naturally arise when attempting at putting forward specifications. I'll do so on the basis of two examples: that of specifying indexing and lookup operations for vectors and the problem of specifying a generic backwards induction algorithm for sequential decision problems.

Slides

Source code

James McKinna, Free-ing Hutton: Generic Programming and Modular Reasoning a la carte (Tuesday, July 3, 2018, 12:01)

I will show how the functoriality and monadicity of the Free f

construction are provable via a single generic traversal, based on the (I have now discovered) old idea of (right) module for a functor, with f (Free f) being the initial such module, for Functor f. I'll illustrate this with Hutton's razor, using the `Fusion' methods of Allais et al. (CPP 2017) to prove the various laws. I'll close with a (categorical; diagrammatic) conjecture regarding how we might understand Fusion in terms of Kan extension.

Based on joint work with James Chapman at Strathclyde, itself derived from our earlier work as coauthors with Guillaume Allais and Conor McBride at CPP 2017, "Type and Scope Safe Programs and Their Proofs".

Slides

Code

Tom Schrijvers, Kuifje: Quantified Information Flow with Monads in Haskell (Tuesday, July 3, 2018, 14:00)

Monads are a popular feature of the programming language

Haskell because they can model many di↵erent notions of computation in a uniform and purely functional way. Our particular interest here is the probability monad, which can be –and has been– used to synthesise models for probabilistic programming.

Quantitative Information Flow, or QIF, arises when security is combined with probability, and concerns the measurement of the amount of information that ‘leaks’ from a probabilistic program’s state to a (usually) hostile observer: that is, not “whether” leaks occur but rather “how much?”

Recently it has been shown that QIF can be seen monadically, a ‘lifting’ of the probability monad from (simply) distributions to distributions of distributions — so called “hyper-distributions”. Haskell’s support for monads therefore suggests a synthesis of an executable model for QIF. Here we provide the first systematic and thorough account of doing that: using distributions of distributions to synthesise a model for Quantitative Information Flow in terms of monads in Haskell.

This is joint work with Carroll Morgan, Annabelle McIver and Jeremy Gibbons.

Slides

Sam Lindley, Data-Parallel Idealised Algol (Tuesday, July 3, 2018, 14:47)

Parallel hardware has the potential for accelerating a wide class of algorithms. However, expert programming skills are required to achieve maximum performance. Typical parallel architectures expose low-level hardware details through imperative programming interfaces where programmers explicitly encode device-specific optimisation strategies. This inevitably results in non-performance-portable programs that deliver suboptimal performance on other devices.

Functional programming models have recently seen a renaissance in the systems community as they offer solutions for tackling the performance-portability challenge. Recent work has demonstrated how to automatically choose high-performance parallelisation strategies for a wide range of hardware architectures encoded in a functional representation. However, the translation of such functional representations to the imperative program demanded by the hardware interface is typically performed ad hoc with no correctness guarantees and no guarantee to preserve the intended parallelisation strategy.

We introduce Data Parallel Idealised Algol (DPIA), a parallel dialect of Reynolds' Idealised Algol, which supports both high-level functional code and low-level imperative code. We define and prove correct a translation from parallel high-level functional code to low-level data-race-free imperative code. Our performance results show that the translation yields performance on a par with hand-written low-level code.

Slides

Matija Pretnar, Putting Reason Back Into Algebraic Effect Handlers (Tuesday, July 3, 2018, 16:02)

The main premise of algebraic effects is that effects can be described with an equational theory consisting of a set of operations and equations between them. However, many computationally interesting algebraic effect handlers do not respect these equations, which most approaches nowadays reconcile by assuming a trivial equational theory. I will present an approach in which the expected equations may be encoded in computation types.

Slides

Jose Oliveira, Compiling quantamorphisms for the IBM Q-Experience (Wednesday, July 4, 2018, 9:00)

At the Montevideo meeting I sketched some ideas about calculating quantum programs. Since then, I have been trying to extend ``catamorphisms" to quantum programming, leading to ``quantamorphisms". The main idea is to see how far one can go in writing quantum programs without measurements (ie. ``quantum state reads"), which have a much simpler semantics (e.g. no distributions of quantum states, no density matrices). This links nicely to calculating reversibility and function complements. I will show how to ``compile" such quantamorphisms into quantum circuits using monads and a "tool chain" in which the Quipper tool plays a central role. We have run some of such compiled programs on IBM Q-Experience devices and expect to run more interesting ones in the near future thanks to a recent agreement between IBM and our lab. This is joint work with Ana Neri and Rui Barbosa.

(Slides)

Conor McBride, Space Monads (Wednesday, July 4, 2018, 9:42)

TBD

Cezar Ionescu, Reinforcement Learning for Functional Programmers (Wednesday, July 4, 2018, 11:09)

TBD

Zhenjiang Hu, Bidirectional Programming in Datalog (Wednesday, July 4, 2018, 12:09)

Bidirectional programming is to develop well-behaved bidirectional transformations in order to solve various synchronization problems. Several bidirectional programming languages exist to aid programmers in writing bidirectional transformations with increased maintainability but decreased expressiveness. Recently, the put-based approach to bidirectional programming has gained more and more interest, which lets programmers write a backward transformation "put" and automatically derives the forward transformation "get" that can be uniquely paired with "put" to form a well-behaved bidirectional transformation. Despite its expressive power and full control of bidirectional behavior, it is considered to be hard to program "put". In this talk, I'd show that with Datalog, one can easily
write "put", while obtaining "get" for free.

Fritz Henglein, Blockchain Deconstructed (Thursday, July 5, 2018, 9:09)

TBD

Slides

Florian Rabe (Rabe.pdf) (Thursday, July 5, 2018, 9:43)

In previous meetings I present my MMT meta-logical framework for defining formal languages. Here every language, logic, theory, etc. as represented as a theory, and theory morphisms are used to represent inheritance and translations.
For years, I have now thought about two dual fundamental constructions that turn theories into types: the type of expressions over a theory, and the type of morphisms out of a theory.
The former is closely related to reflection/quotation, but also yields inductive types as a special case. The latter is closely related to models of theories and implementations of specifications, but also yields record types as a special case.
Taken together, they can provide an extremely elegant setting in which we can reason about the syntax and semantics of formal languages.
In this talk I present my latest thinking, describing both the potential of the idea and the difficulties that remain to be addressed.

Oleg Kiselyov, Sieve of Eratosthenes (Thursday, July 5, 2018, 10:25)

TBD

Talk

Code

Patrik Jansson, Domain Specific Languages of Mathematics: Examples and Results (Thursday, July 5, 2018, 11:16)

In 2015, at the 73rd meeting of IFIP WG2.1, in Gothenburg, we (Jansson and Ionescu) gave the talk ``[[1][DSLM - Presenting Mathematical Analysis Using Functional Programming]].

That talk presented the ideas of a BSc level course which has now been taught three times. The current talk presents some examples from the course and a few slides about the results (in terms of student pass rates on other courses).

Presentation slides.

Course material etc.

James McKinna, The Relation Between Logical Relations and Howe's Construction (Thursday, July 5, 2018, 11:58)

While revising our CPP 2018 paper for publication, "Triangulating

Context Lemmas" (j/w Craig McLaughlin and Ian Stark) there remained outstanding a question from the reviewers regarding the relationship between our methods and those of `Howe's construction', usually considered in arguments about greatest fixed point definitions of various approximation and equivalence relations on programs. I'll show here that under suitable conditions, including that S is a `logical', and R an `applicative' relation, that

O^[ S ]^O = [ [ R ]^O ]^H

where [_]^H is Howe's construction, and [_]^O, resp. O^[_]^O, the one- (resp. two-) sided extension of a relation to open terms.

Wouter Swierstra, Program Calculation in Effectful Languages (Thursday, July 5, 2018, 14:01)

In this talk I wanted to present the weakest precondition semantics for a variety of effects, described by a free monad, and study the refinement relation that arises.

Sam Lindley, Session Types without Tiers (Thursday, July 5, 2018, 14:40)

Session types statically guarantee that communication complies with a protocol. However, most accounts of session typing do not account for failure, which means they are of limited use in real applications — especially distributed applications — where failure is pervasive.

We present the first formal integration of asynchronous session types with exception handling in a functional programming language. We define a core calculus which satisfies preservation and progress properties, is deadlock free, confluent, and terminating.

We provide the first implementation of session types with exception handling for a fully-fledged functional programming language, by extending the Links web programming language; our implementation draws on existing work on effect handlers. We illustrate our approach through a running example of two-factor authentication, and a larger example of a session-based chat application where communication occurs over session-typed channels and disconnections are handled gracefully.

Slide

Jeremy Gibbons, Profunctor Optics and the Yoneda Lemma (Thursday, July 5, 2018, 16:01)

Continued.

Conor McBride, Irish Induction Recursion and Session Types (Thursday, July 5, 2018, 16:35)

TBD

Schedule

Sessions will start at 9:00 on Monday and finish at noon on Friday.

Monday, Tuesday, and Thursday, the schedule is as follows:

  • session – 9:00 to 10:30
  • coffee break – 10:30 to 11:00
  • session – 11:00 to 12:30
  • lunch – 12:30 to 14:00
  • session – 14:00 to 15:30
  • coffee break – 15:30 to 16:00
  • session – 16:00 to 18:00
  • dinner – 19:30 to 21:30

Wednesday and Friday we will have sessions only in the morning:

  • session – 9:00 to 10:30
  • coffee break – 10:30 to 11:00
  • session – 11:00 to 12:30
  • lunch (Wednesday) – 12:30 to 13:30

The Friday-morning session before the 10:30 coffee break is attended by members only.

Links