Abstract-- This paper describes a technique combining higher order functions, algebraic datatypes, and monads to incrementally implement syntax driven logics. Extensions can be compositionally stacked while the base logic is left unchanged. The technique can furthermore be used to build a set of weaker logics for light weight verification or to generate validation traces. The paper explains the technique through an example: a Hoare logic for a simple command language. The example also shows how exceptions can be treated as an extension, without having to change the underlying logic.
Ignatius Sri Wishnu Brata Prasetya, A. Azurat, Tan