First Steps with Kahina for SWI-Prolog

After completing the installation, why not get started with Kahina for SWI-Prolog by tracing a little example program, provided as kahina/kahinaswi/examples/

After starting SWI-Prolog, first load the example program, like this (adapt the path):


Then, enable Kahina for SWI-Prolog by issuing the following query (again, adapt the path):


This module hooks into SWI-Prolog's own tracer, so to actually use it, you need to activate the tracer:


The query entered after that will be debugged graphically. On the next query after that, or when the first query has multiple solutions, or under any circumstances for that matter, the system is likely to crash or to exhibit erratic behavior, what with this being experimental software and all. Have fun anyway! :-)

For understanding the use of Kahina's graphical tracing GUI, the tutorial for Kahina for SICStus Prolog may be useful.

Tracing the query main. should result in the following ControlFlowTree?:

Last modified 7 years ago Last modified on Dec 12, 2011, 10:02:08 PM

Attachments (1)

Download all attachments as: .zip