Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


continuous reasoning for managing next-gen distributed applications

FogBrain methodology is fully described in the following article:

Stefano Forti, Antonio Brogi
Continuous Reasoning for Managing Next-Gen Distributed Applications,
ICLP 2020 (Technical Communications), EPTCS, vol. 325, pp. 164–177, 2020.

If you wish to reuse source code in this repo, please consider citing it.

Background & Prerequisites

FogBrain is written in Prolog. Prolog programs are finite sets of clauses of the form:

a :- b1, ... , bn.

stating that a holds when b1 and ... and bn holds, where n >= 0 and a, b1 ..., bn are atomic literals. Clauses with empty condition are also called facts. Prolog variables begin with upper-case letters, lists are denoted by square brackets, and negation by \+.

Before using FogBrain you need to install the latest stable release of SWI-Prolog.

QuickStart & Interactive Docs

All information on FogBrain can be found here, along with a quickstart example and interactive documentation on the current release.


To try FogBrain:

  1. Download or clone this repository.

  2. Open a terminal in the project folder and run swipl

  3. Inside the running program either run the query

    :- fogBrain(vrApp, P).

    The output will be a first placement for the application described in onto the infrastructure described in E.g.

    %7,955 inferences, 0.000 CPU in 0.006 seconds (0% CPU, Infinite Lips)
    P = [on(vrDriver, accesspoint9), on(sceneSelector, cabinetserver0), on(videoStorage, cloud0)]
  4. Open the file and change some of the links or nodes involved in the placement output at step 3. E.g.

     node(cloud0,[ubuntu, mySQL, gcc, make], inf, []). --> node(cloud0,[], inf, []).
  5. Repeat step 3. The output will only compute a new placement for suffering services (i.e. mapped onto overloaded nodes, or relying upon saturated end-to-end links for interacting with other services) and require many less inferences with respect to computing the initial placement. E.g.

    2 ?- fogBrain(vrApp,P).
    % 387 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)  
    P = [on(videoStorage, cloud1), on(vrDriver, accesspoint9), on(sceneSelector, cabinetserver0)] 

In this example the new placement is computed by saving around 95% of inferences with respect to the first deployment.