Welcome!
Log In
Create A New Profile
Home
>
2009
>
COS451G
> Topic
Advanced
Assignment 4 query on the not/2 relation
Posted by
chrisbrat
Announcements
Last Post
SoC Curricula
09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment
02/13/2017 07:59AM
School of Computing Short Learning Programmes
11/24/2014 08:37AM
Unisa contact information
07/28/2011 01:28PM
Forums
Messages
New
chrisbrat
Assignment 4 query on the not/2 relation
September 30, 2008 09:40PM
Registered: 17 years ago
Posts: 2
Rating: 0
Hi,
I am trying to complete assignment 4 and questions 3 and 4 both require a not/2 method but Amzi prolog doesn't seem to support it.
Does anyone know how to implement this ? Or are you using a different prolog implementation ?
Thanks.
Chris
Reply
Quote
Anonymous User
Re: Assignment 4 query on the not/2 relation
October 01, 2008 08:34AM
Rating: 0
from what I recall you need to write your own not method
here you go - I have no idea if it works - just took it off google
The negation-as-failure 'not' predicate could be defined in prolog as follows:
not(P) :- call(P), !, fail.
not(P).
Reply
Quote
ilanpillemer
Re: Assignment 4 query on the not/2 relation
October 01, 2008 08:26PM
Registered: 18 years ago
Posts: 1,682
Rating: 0
I used gprolog that uses /+ as not.
,= ,-_-. =. ((_/)o o(\_)) `-'(. .)`-' \_/
http://ilanpillemer.com
Entia non sunt multiplicanda praeter necessitatem
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login