precautionary
precautionary copied to clipboard
Abstracting enroll/3 as a predicate to override?
One place where the first hints of a dose-escalation DSL might be found is in treating ccd:enroll/3 (current version below) as merely a default implementation that might be redefined by special cases of CCD trials.
%% This enroll/3 goal, with its reified 'success' arg #3, creates fine
%% opportunities to bring various CCD-adapted STOPPING CRITERIA to bear.
%% Presently, we are simply checking whether cohort N0 is already 'full'.
enroll(T0/N0, T1/N1, Truth) :-
( N0 #>= 6 -> Truth = false
; N1 #= N0 + 1,
T in 0..1, % T is the pending tox assessment of newly-enrolled patient
indomain(T), % TODO: How to 'parametrize' this? Use OPTIONS?
T1 #= T0 + T,
Truth = true
).
Is this do-able, and idiomatic? Can a library(boin) e.g. use_module(library(ccd)) and then provide its own version boin:enroll/3 which predicates from ccd would then call? (Am I right to understand that Prolog is not lexically scoped?)