prolog-directive-dynamic Questions
2
Solved
In the beginning of a Prolog program I see:
:-dynamic(path/1).
It seems to be a clause that doesn't have a head. What does it mean?
Autograph asked 5/1, 2013 at 3:47
1
Solved
I wrote the following simple code, and I expect that when I write 'male.', this code ask me once "is it male?" and if i input 'No' it write on screen "she is female".
male :- ( print('is it male ...
Luehrmann asked 29/12, 2011 at 14:42
1
Solved
What I have now checks that X(Y) is not an accepted fact in my small DB. Since X(Y) returns false it will attempt to assert it. (I realize this presents problems when X is a rule and not a fact)
i...
Insistency asked 25/12, 2011 at 2:17
1
Solved
Is there a Prolog implementation or library that caches predicates?
Or would you implement a, say, FIFO cache using assertz/1 and retract/1, like this:
:- dynamic cache/1.
ccall(G) :- cache(G).
c...
Rigney asked 7/8, 2011 at 2:46
3
Solved
I would like to represent a mutable graph in Prolog in an efficient manner. I will searching for subsets in the graph and replacing them with other subsets.
I've managed to get something working u...
Badalona asked 29/7, 2011 at 14:14
1
Solved
If I want to make a rule dynamic so i can use assert after the database file has been loaded, how do i do it? I'm using XSB Prolog at the moment, the file is something like this:
:- dynamic likes/...
Lifesaver asked 11/3, 2010 at 16:23
1
Solved
I have this code in Prolog:
dynamic(player_at/1).
player_at(house).
goto(X) :- retract(player_at(house)), assert(player_at(X)).
But I still get this error:
uncaught exception: error(permission_...
Fabien asked 9/5, 2009 at 20:52
1
© 2022 - 2024 — McMap. All rights reserved.