
Prolog & others
We present, as a pure Prolog program, the first executable specification of the 3 + 3 dose-escalation protocol commonly used in early-phase oncology drug development. In this program, the imperative operations of the protocol emerge as consequences of clinically meaningful anticipatory-regret scenarios that are declared as CLP(ℤ) constraints. This ‘regret-constrained’ (RC) specification yields a robust formulation which can be used to prove clinically meaningful safety and liveness properties of the protocol before incorporating it into a trial, and then as an on-line decision support system while the trial is underway. Our RC specification also readily accommodates certain pragmatic modifications to trial enrollment which severely strain traditionally imperative formulations. The features of modern Prolog systems let us describe the 3 + 3 protocol with a short and general program that has desirable algebraic properties and can therefore be used, tested and reasoned about in several different ways.
Many Prolog programs are unnecessarily impure because of inadequate means to express syntactic inequality. While the frequently provided built-in dif/2
is able to correctly describe expected answers,
its direct use in programs often leads to overly complex and inefficient definitions — mainly due to the
lack of adequate indexing mechanisms. We propose to overcome these problems by using a new predicate
that subsumes both equality and inequality via reification. Code complexity is reduced with a monotonic,
higher-order if-then-else construct based on call/N
. For comparable correct uses of impure definitions, our
approach is as determinate and similarly efficient as its impure counterparts.
Higher order programming is possible in Prolog. There is no need to extend the language for that. See Richard O'Keefe's arguments in comp.lang.prolog more than ten years ago. What is missing are lambda expressions.
We present a very simple implementation of lambda expressions in ISO Prolog that fits into the existing conventions for higher order predicates based on call/N
. No syntax or compiler extension is needed.