prolog-coroutining Questions

4

Solved

Do they exist? How are they implemented? The coroutining predicates of SWI-Prolog (freeze, when, dif etc.) have the functionality of guards. How do they fit in the preferred Prolog programming sty...
Dangle asked 7/12, 2012 at 9:8

2

I've read quite a bit about Prolog's Negation by Failure where Prolog in order to prove that \+Goal holds tries to prove that Goal fails. This is highly connected with CWA (close world assumption) ...
Limestone asked 9/12, 2017 at 14:21

1

Solved

I was playing around with the prolog-coroutining predicates freeze/2 and frozen/2: ?- freeze(X,a=a), frozen(X,Goal). ?- freeze(X,a=a), freeze(Y,b=b), X=Y, frozen(X,Goal). sicstus-prolog (version...
Wallinga asked 17/11, 2019 at 20:43

1

Many Prolog systems have a freeze/2 predicate, a predicate that should possibly have the name geler/2 since it was even invented before Prolog-II. Assume I have a condition on the same variable, b...

2

Solved

(This is a followup to that question). How to write lead1(Xs,Ys) which is true, iff Ys is a suffix of Xs with all leading s(s(0)) terms removed. Thus instead of removing leading 0s this question i...
Dietsche asked 4/10, 2016 at 21:44

1

Solved

I made the following little program to determine if the memory used for goals like freeze(X,Goal) is reclaimed when X becomes unreachable: %:- use_module(library(freeze)). % Ciao Prolog needs this...
Tokenism asked 28/6, 2015 at 0:49

1

Solved

I want to freeze my goal until some variable, for example list, is unbounded, right now I have sieve(N,L) :- freeze(Aux,sieve(N,L,[],Aux)), numlist(2,N,Aux). sieve(N,L,R,[H|T]) :- freeze(X, X...
1

© 2022 - 2024 — McMap. All rights reserved.