Guide to Prolog Programming |
© Roman Barták, 1998 |
Home | |
Test Zone
|
Thanks to Michael Winikoff's W-Prolog you can now test small Prolog programs within your Web browser. Just click the following start button to run Prolog (you need Java-capable web browser).
You write your query (without dot at the end) in this area and run it by pressing "Run Query" button. If you need alternative answers, just press "More?" button. | |
Write your Prolog program to this area (no consult or reconsult needed). You can use copy&paste function to move program code from the web page to this area. | |
In this area, the answers to your query are presented. If you want, you can also see the trace of the computation (just tick the Trace switch). By pressing "Clear" button, you clear the area with results. | |
You quit the program by closing the respective window or by selecting Quit from File menu. |
Limitation |
How to overcome? |
---|---|
query consists of one term only | ?-a,b. change to ?-ab. & ab:-a,b. |
=, \= not allowed | ?-a=b. change to ?-eq(a,b). ?-a\=b. change to ?-not(eq(a,b)). |
IF -> THEN ; ELSE not allowed | instead, use if(IF,THEN,ELSE) |
anonymous variable _ not allowed | instead, use new variable |
no cut ! | instead, use once(C) |
arithmetics (evaluation, comparison, ...) | N/A |
no operators and term access functions | N/A |
no database access (clause, assert, retract) | N/A |
Note, that you can get to this page by clicking the Test Zone sign
|
|
Designed and maintained by Roman Barták |