Previous Up Next

5.2  Running the Program

To start the program, the query `colour' is run: type colour into TkECLiPSe's query entry window, followed by the return key. The program should run, colouring the map, arriving at the incorrect solution as shown previously. The program uses the standard `generate-and-test' method, so you will see colour flashing in the countries as the program tries different colours for them.

The map display has two buttons: pressing More
will cause the program to find an alternate way of colouring the map. Pressing Done will end the program and return control to ECLiPSe. You can press More to get more solutions and see that the program returns more solutions that colour countries 3 and 4 to the same colour (along with some that are correct).

Press Done
to finish the execution. We will now debug this program.


Previous Up Next