Prolog Primer


The student should be good at Computer Science, in particular the student should be good at the simple Prolog programming language from Computer Science.
e.g. Use the following program when searching with Prolog:
   ancestor( X, Y ) :-
       parent( X, Y ).
   ancestor( X, Y ) :-
       parent( X, Z ),
       ancestor( Z, Y ).
So, given a string of parent facts, the program returns true if there is an ancestral link given as input.
The main goal when using Prolog is to narrow down methodologies to objects cycling through objects, for example, a flute player ‘recursively’ blows air into a flute, for example, he or she repeatedly blows until he or she has counted up to a certain number, in the same way that the ancestor program recursively calls itself. This is how the student will approach the next task.

Note please Google "prolog tutorial" for more information.  Ideally, download SWI Prolog (see Google) and write a short program with one of the syntactic elements of Prolog.  This will help immensely when both understanding the code on the site and writing your own codelets for 100%.

1 comment:

  1. final year project help

    Final year projects are crucial and can make a lot of difference to your grades. In fact, they account for more than 25% of your final year marks

    to get more - https://qualityassignmenthelp.com/final-year-project

    ReplyDelete