Safety-Refined Liveness

Safety-Refined Liveness

Correctness properties of programs are traditionally decomposed into safety (“nothing bad happens”) and liveness (“something good eventually happens”). In sequential verification, this corresponds to the well-known decomposition of total correctness into partial correctness and termination.

In this paper, we present a principle-first view of correctness: under suitable safety guarantees, liveness reduces to a pure progress property. Specifically, if all produced results are correct by construction, then ensuring eventual production of a result is sufficient to guarantee that a correct result is eventually produced.

We formalise this observation in linear temporal logic and show that, under these safety guarantees, eventual correctness reduces to a progress property. A central consequence is conditional compositional correctness: although correctness does not generally compose, it becomes compositional in systems where progress composes under suitable structural conditions.

This reframes compositional reasoning about correctness: under suitable safety guarantees, correctness composes precisely when progress composes.

read more

Deconstructing Inheritance

Deconstructing Inheritance

In this talk I make a critique of Inheritance as it is present in mainstream OOP. We look from multiple points of views on the Inheritance relationship, and we show that, at a closer inspection, it doesn’t reach up to the promises it makes. The talk touches the simple problem of the Rectangle and Square, it discusses the parallel with the is-a relationship, and it shows how the Liskov Substitution Principle runs against inheritance.

read more

Programming Language Unlimited

Programming Language Unlimited

Based on Language Unlimited: The Science Behind Our Most Creative Power book by David Adger, in this Overload article I tried to explore how programming languages should be built, taking a linguistic perspective. The main idea is that we might hope that programming languages are structured in such a way that, reading the code can be done without any effort, leaving the main cognitive powers to focus on the semantics of the code.

read more

Executors: a Change of Perspective

Executors: a Change of Perspective

In my last Overload article, I was arguing that the senders/receivers models may be a bit too complex. Soon after writing it, I realized that this is just perceived complexity. One can change the perspective at looking at the same proposal, and with that change of perspective, the concepts may be simpler to understand and work with. Moreover, the model seems to be strong enough to use it as a base for all our concurrent applications.

read more