XSB Prolog meta-interpreter issue with clpr constraints -
i running xsb prolog on mac (el capitan 10.11.2): xsb version 3.6. (gazpatcho) of april 22, 2015 [i386-apple-darwin15.2.0 64 bits; mode: optimal; engine: slg-wam; scheduling: local] [build date: 2016-01-17]
i using clpr package , want write little meta-interpreter:
:- [clpr]. try((g1,g2)):- !, try(g1), try(g2). try((g1; g2)):- !, try(g1); try (g2). try(true):- !. try({x}):- !, {x}. try(g):- clause(g, body), try(body).
however, try({x=1+2})
not work -- not match fourth clause, , descends fifth clause.
any idea why?
hmm, seems if load file containing code load_dyn(test)
code works. (it not work if consult file, i.e. load [test]
.
Comments
Post a Comment