Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstracting enroll/3 as a predicate to override? #1

Open
dcnorris opened this issue May 30, 2021 · 0 comments
Open

Abstracting enroll/3 as a predicate to override? #1

dcnorris opened this issue May 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dcnorris
Copy link
Owner

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?)

@dcnorris dcnorris added the enhancement New feature or request label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant