A notebook is a list of cells. Notebooks are different from a program with examples because they can tell a story, mixing properly formatted text with knowledge bases and queries. The story is interactive. The reader can edit program fragments and/or queries and see the result. This makes notebooks particularly interesting for writing tutorials as well as writing cookbooks that document data analysis and transformation steps. A Prolog notebook supports three types of cells:

Creating a notebook

Creating and managing a notebook is supposed to be intuitive. Below we describe the first starting point as well as some less obvious operations.

Notebook queries and programs

A notebook query cell is executed against the program cell above it and all program cells marked as background using the button.

Longer fragments of code that are required throughout a notebook and possibly on multiple notebooks are defined in a program tab, saved and included using, e.g., :- include(mybasics). in a background program kept at the bottom of the notebook.