info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] Writing dynamic and rules


From: Daniel Warzecha
Subject: Re: [Info-gnuprologjava] Writing dynamic and rules
Date: Thu, 24 Mar 2011 13:31:27 +0100

Thanks, that helps very much.

Bye,
Daniel W.

2011/3/24 Daniel Thomas <address@hidden>:
> Hello,
>
> You can't do ":- dynamic(initPassed/3)." at dynamically, it needs to be
> specified in a file. However having done that you can dynamically assert
> the rules for initPassed/3.
>
> So you can dynamically generate rules but you need to specify in advance
> using ensureLoaded files the terms to be used for the generated rules.
>
> I hope that that helps,
>
> Daniel
>
> On Thu, 2011-03-24 at 12:16 +0100, Daniel Warzecha wrote:
>> Hello,
>>
>> I just wanted to check if I remembered right:
>>
>> Using the interpreter in Java, and having loaded a Prolog file with
>> ensureLoaded and runInitialization, can I assert facts like ":-
>> dynamic(initPassed/3)."?
>>
>> Also, can I incorporate rules into the environment?
>>
>> The reason I ask is I want to dynamically generate predicates and
>> rules at runtime with Java. It would be either doing the above or
>> generating the prolog file to parse with ensureLoaded. I would prefer
>> the dynamic generation, of course.
>>
>> Bye,
>> Daniel W.
>>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]