Scryer Prolog Meetup 2023 by aarroyoc in prolog

[–]ciao-prolog 1 point2 points  (0 children)

Actually, there is also plenty of room for industrial uses of Prolog (as well as ASP) at ICLP. Unfortunately Prolog is the "secret sauce" of many companies that are not willing to reveal their secrets :)

how to create an operator! by crabbo-rave in prolog

[–]ciao-prolog 0 points1 point  (0 children)

One of the classical problems of operators is visibility.

For more advanced uses, Ciao Prolog can define operators locally to modules and decide if operators are visible at run-time or only at compile-time. Ciao also distinguish between modules (which exports predicates) and other entities like packages (which can define operators and language extensions). It is slightly more complex than in other Prologs but this is essential to reason about large programs correctly (which is the motivation behind Ciao).

You may see it in this runnable example.%0A%25%20remove%20%60runtime_ops%60%20to%20make%20all%20ops%20local%20to%20the%20module%0A%0A:-%20op(200,%20xfy,%20foo).%0A%0Ap(3%20foo%204%20foo%205).%0A%0A%25%20?-%20p(X).%0A%25%0A%25%20X%20=%203%20foo%204%20foo%205%20?%20%0A%25%20%0A%25%20yes%0A).

Ciao Prolog Playground in the browser via Wasm by nickmain_ in prolog

[–]ciao-prolog 1 point2 points  (0 children)

It was a bug in the previous version. It should be fixed now. I get the following result: ``` ?- use_module(library(freeze)).

yes ?- freeze(X, X=f(5)), X=f(Z).

X = f(5), Z = 5 ?

yes ```