Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!pipex!uunet!sparky!kwiudl.kwi.com!usenet
From: tom@kwi.com (Tom Howland)
Subject: Re: dynamic/multifile in ECLiPSe, Quintus *and* SICStus?
In-Reply-To: staerk@math.stanford.edu's message of Wed, 16 Nov 1994 12:46:52 -0800
Message-ID: <TOM.94Nov18133908@heather.kwi.com>
Lines: 16
Sender: usenet@kwiudl.kwi.com
Organization: KnowledgeWare Inc, Redwood City, CA 94065-1417
References: <staerk-1611941246520001@math-mac-staerk.stanford.edu>
Date: Fri, 18 Nov 1994 21:39:08 GMT

> But multidynamic/1 does not work, since in Quintus it is not allowed
> to use dynamic/1 in the body of clauses.
> 
> What is the solution to my problem?
> 
> #define MULTIDYNAMIC(X) :- dynamic X. :- multifile X.

Have you considered a term expansion something like

term_expansion((:-multidynamic(PredSpec)), Expansion) :-
    implementation(I),
    multidynamic(I, PredSpec, Expansion).

multidynmaic(quintus, PredSpec, [(:-multifile PredSpec), (:-dynamic PredSpec)]).
multidynmaic(eclipse, PredSpec, []).
multidynmaic(sicstus, PredSpec, []).
