What is Atom?

Atom is an Inductive Logic Programming (ILP) system written by me (John Ahlgren) to explore various ILP algorithms.

Atom features:

  1. An interactive Prolog environment.

  2. An optimizing Prolog compiler and WAM, supporting last call optimization, environment trimming, and various peephole optimizations. Features useful for ILP, such as depth and time limits, are also supported.

    1. Ability to produce graphs (in DOT format, Graphviz can then produce images) of search space lattices.

    2. Built-in ILP algorithms: Progol A*, enumerative search, NrSample, with a wide range of adjustable parameters.

    3. A Chaff like SAT solver using two literal watch and clause learning, with support for ILP clause lengths limits (used by NrSample).

What is Constrained Inverse Entailment / NrSample?

NrSample is an ILP algorithm implemented in Atom and described in J. Ahlgren and S.Y. Yuen, “Efficient program synthesis using constraint satisfaction in inductive logic programming”, Journal of Machine Learning Research, vol. 14, pp. 3649-3681, 2013.

For an easy and short introduction, see this page.

Noisy Data

Constrained Inverse Entailment / NrSample has recently been extended to support noise in data (the noisy ILP setting).

A paper is currently under review, references will be put here when it has been accepted.

Atom 5.3 supports noisy data (source code includes noisy datasets).

How is Atom Licensed?

Under the "Attribution-NonCommercial-ShareAlike 3.0 Unported".

In short:

    1. You can share and modify it, provided the license stays the same.

    2. When sharing, attribution must be given to me for the original code (simply link to

    3. You cannot use it for any commercial purposes whatsoever (contact me).

Where do I download Atom?

Download the latest version of Atom (5.3) here. It supports noise.

Atom 3.9 is the version used for the benchmarks in the original publication.

How do I compile Atom?

Easy way, using Microsoft Visual Studio 2013:

  1. Make sure you have C++ Boost installed

  2. Download and extract Atom

  3. Click on solution file "Atom PR.sln"

  4. Include path to your Boost library in the solution.

  5. Click Build -> build solution (Make sure you're building in Release Mode)

You will need Visual Studio 2013 for Atom 5.3. For Atom 3.9, Visual Studio 2012 also works.

More generally (using other compilers), you'll need:

    1. Boost libraries (I used 1.53), specifically filesystem and iterator.

    2. A fairly C++11 compliant compiler (I used Microsoft Visual Studio 2013).

    3. Define NDEBUG across all files during compilation (this is crucial, as lots of expensive checks will be injected otherwise).

If you're compiling with Visual C++ without using the solution file above, you'll need to turn off "security checks" as the compiler won't be standards compliant otherwise. Also turn on optimization for fast code.

Where do I find the benchmarks used for NrSample?

They are included in the source code distribution of Atom 3.9.

How do I run the NrSample benchmarks (Atom 3.9, original)?

Use a console ("command line"). In Windows, that's "cmd.exe".

First, check that you have the right version: "Atom PR.exe" /V

For NrSample, we used version 3.9: "Atom 3.9".

To run the member/2 benchmarks on windows:

"Atom PR.exe" /N /v 0 /X nrsample "ILP benchmarks\Individual\member"

The result is printed to standard output (the console).


    1. /N makes Atom terminate after experiment (Non-interactive).

    2. /v 0 sets verbosity to 0 (quiet mode). Printing of stuff will slow down the algorithms.

    3. /X performs cross validation: nrsample specifies the algorithm, and then comes the path to folder containing datasets.

    4. Cross validation algorithm options are: nrsample, emulate_nrsample, heuristic (Progol A*), and enumerate.

    5. The folder "Individual" contains the small datasets, "Primitive" contains the large ones.

    6. On non Windows systems: replace '/' with '-' when specifying options.

By default, functional constraints are used. To turn them on/off, use //functional 1 and //functional 0, respectively.


"Atom PR.exe" /N /v 0 //functional 0 /X nrsample "ILP benchmarks\Primitive\member"

"Atom PR.exe" /N /v 0 //functional 1 /X nrsample "ILP benchmarks\Primitive\member"

The first line turns off functional constraints ("NrS"), and the second uses them ("NrSFun").

How do I run the NrSample benchmarks (Atom 5.3, noisy datasets)?

To run the member/2 benchmarks on windows:

"Atom.exe" /N /v 0 "..\datasets\noisy\" /A 1111 2