Re: Networking in Prolog - a survey
- From: Alessio Stalla <alessiostalla@xxxxxxxxx>
- Date: Thu, 22 May 2008 11:33:22 -0700 (PDT)
On 22 Mag, 12:49, "rupertlssm...@xxxxxxxxxxxxxx"
<rupertlssm...@xxxxxxxxxxxxxx> wrote:
On May 21, 6:49 pm, Alessio Stalla <alessiosta...@xxxxxxxxx> wrote:
avoid that concern for now. Of course that doesn't really solve the
problem in general since the code triggered by events will eventually
have to cooperate with code running on the main thread, but in my
limited scenario, in which event handling will simply be some limited
processing of the received data and possibly an assert to augment the
current theory, that problem isn't influent.
Alessio
I think that that assert could be problematic. What if one interpreter
loop unifies against the current theory, then another asserts a new
fact, then the original unifies against the new theory and gets a
different result? That is what you want, but how to make sure that it
can only happen in predictable ways? Will be interesting to see what
solutions you come up with.
I don't think that is a problem, no more than an assert in single-
threaded code is. If the interpreter starts solving a goal, and in the
meantime the theory is modified, either it will see the newly asserted
clause or it won't. The goal might produce different results, but
that's precisely what I want. I can't imagine how that could break the
interpreter, but maybe I'm missing something.
Regards,
Alessio
.
- Follow-Ups:
- Re: Networking in Prolog - a survey
- From: rupertlssmith@xxxxxxxxxxxxxx
- Re: Networking in Prolog - a survey
- References:
- Networking in Prolog - a survey
- From: Alessio Stalla
- Re: Networking in Prolog - a survey
- From: rupertlssmith@xxxxxxxxxxxxxx
- Re: Networking in Prolog - a survey
- From: Alessio Stalla
- Re: Networking in Prolog - a survey
- From: rupertlssmith@xxxxxxxxxxxxxx
- Networking in Prolog - a survey
- Prev by Date: Re: JPL problem (newbie)
- Next by Date: Re: In which cases/problems is Prolog faster than Java?
- Previous by thread: Re: Networking in Prolog - a survey
- Next by thread: Re: Networking in Prolog - a survey
- Index(es):
Relevant Pages
|
|