1. the first step, open the SWI-Prolog program
2. the second step, creating new file

3. give name the file of program "tutorial"
4. Declaring the facts that consists of predicate and fact as below :

5. and than save it
6. open the click the SWIT-prolog and than click file > consult > choose tutorial file

7. Write rule code firstsets(X),secondsets(Y) as below :

8. press enter on your keyboard, and then it will show you combination of two set, type ";" after a combination. It will continue until the word "No" appear.

Tidak ada komentar:
Posting Komentar