Welcome! Log In Create A New Profile

Advanced

Assignment 4 query on the not/2 relation

Posted by chrisbrat 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 4 query on the not/2 relation
September 30, 2008 09:40PM
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
Anonymous User
Re: Assignment 4 query on the not/2 relation
October 01, 2008 08:34AM
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).
avatar Re: Assignment 4 query on the not/2 relation
October 01, 2008 08:26PM
I used gprolog that uses /+ as not.

 
  ,= ,-_-. =.
 ((_/)o o(\_))
  `-'(. .)`-'
      \_/
http://ilanpillemer.com
Entia non sunt multiplicanda praeter necessitatem
Sorry, only registered users may post in this forum.

Click here to login