Straight chain in YAP Prolog?

I need to use direct chaining in a specific Prolog issue. I would like for me not to implement this from scratch using a meta-interpreter of vanilla (but this is what I will need to do if there is no other option), since doing this using a meta-interpreter will be slow, and also I sure some good implementations should be around. Does anyone know if YAP or SWI Prolog has an integrated and efficient forward chaining? If so, then a pointer to its installation / use will be appreciated.

If these two Prolog engines do not have a built-in direct chain, can someone recommend me a good open source implementation based on a vanilla meta-interpreter that I could use as an external Prolog library?

Thanks in advance.

+3
source share
2 answers

YAP and SWI include the implementation of restriction restriction rules - http://dtai.cs.kuleuven.be/projects/CHR/ - which is a direct chain rule system.

I can’t talk about its effectiveness in relation to your specific problem, but CHR is known as effective (see documents related to the CHR website).

CHR also has Java, Haskell, and C implementations, so you can easily port your rules to one of these languages ​​if you need better performance later.

+3
source

, , . . , , P A- > P, , P A:

-------- (Id)
P |- P            G, A -> P |- A
--------------------------------- (Left ->)
        G, A -> P |- P

. P, A . A → P, P. :

------- (Id)
A |- A            G, A, A -> P, P |- B
--------------------------------------- (Left ->)
         G, A, A -> P |- B

, F (M) = M . , M0, M1, M2 .., , . Mn + 1 Mn. G, F (Mn)\Mn = G (Mn\Mn-1, Mn-1) .

G , . , , . , .

, , .

G (delta/2) ​​ F ( )
http://www.xlog.ch/jekejeke/forward/delta.p


http://www.xlog.ch/jekejeke/forward/expert.p

+4