Integrating Prolog with C# [closed]

You can take a look at Yield Prolog. Yield Prolog uses yield keyword in C# (and Python, and JavaScript) and custom Variable class to simulate Prolog machine. This way, you get a Prolog API in your favourite language. You don’t need to connect your main language with P# or similiar projects.

Alternatives to the WAM

Prior to the WAM, there was the ZIP by Clocksin. Its design is still very interesting. SWI-Prolog uses it. And also B-Prolog has slowly migrated from a WAM design towards the ZIP. Of course, on that way many new innovations were developed. Another alternative is the VAM. A comparison as of 1993 is: http://www.complang.tuwien.ac.at/ulrich/papers/PDF/binwam-nov93.pdf In … Read more

How do I include a .pl file in Prolog?

If your file is called foo.pl, you can include it using :- [foo]. or, equivalently and a bit more explicit :- consult(foo). or, if you’re worried it may be loaded several times in a larger app :- ensure_loaded(foo). or, if you’re using full-blown modules :- use_module(foo). though the exact name of the last predicate differs … Read more

How to define (and name) the corresponding safe term comparison predicates in ISO Prolog?

iso_dif/2 is much simpler to implement than a comparison: The built-in \= operator is available You now exactly what arguments to provide to\= Definition Based on your comments, the safe comparison means that the order won’t change if variables in both subterms are instanciated. If we name the comparison lt, we have for example: lt(a(X), … Read more

different/2 – does a pure, determinate definition exist?

First try! The following code is based on the meta-predicates tfilter/3 and tpartition/4, the monotone if-then-else control construct if_/3, the reified unary logical connective not_t/3, and the reified term equality predicate (=)/3: different([],[_|_]). different([X|Xs0],Ys0) :- tpartition(=(X),Ys0,Es,Ys1), if_(Es=[], true, (tfilter(not_t(=(X)),Xs0,Xs1),different(Xs1,Ys1))). Sample query: ?- different([A,B],[X,Y]). A=Y , dif(B,Y), X=Y ; A=X , B=X , dif(X,Y) ; A=X … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)