View on GitHub

THE GAME

THeory of Evidence in a lanGuage Adapted for Many Embedded systems

Download this project as a .zip file Download this project as a tar.gz file

Introduction

This little library implements the basics of the belief functions theory. There are also a few application modules in order to build belief functions from sensor measures, from other belief functions and from randomness. To run tests and a bench for speed of execution, please use the Tests module.

If some errors occur anywhere when running the tests, please check the format of the files in data/beliefs/. If you're stuck anywhere, feel free to send me an email. Different combination rules are implemented to enable the use in the case of different theories. The source code is documented AND commented (most of the time) to facilitate its reading. It is also under the Apache License v2 (http://www.apache.org/licenses/LICENSE-2.0), thus, if any error/weird behaviour/bad coding is detected, please feel free to correct the source code and to notify me at one of the given email addresses given below. If something you need is missing and you do not want/cannot contribute to the development, send me an email with your request and I will see what I can do for you! This library is meant to be as useful as possible! Anyway, please read the doc and specifically the description of modules, it should explain what it does.

This implementation of the basics of the belief functions theory has been created in order to test the applicability of this theory in specific cases. Thus, every part has not been developped yet! Anyway, a huge part of the work consisted in the optimization of the computations. Even if that's not perfert at all, a real effort has been done.

What it does:

The building of belief functions has been implemented in three cases:


Compiling

The Project needs cmake to be built.

Before building, you can change the config of the library in order to add or remove some model checking for instance (but the current configuration should work fine most of the time).

I advise to build it out of source directory as follow:

#create an out of source build dir
mkdir build && cd build
#to enable debug use -DCMAKE_BUILD_TYPE=Debug
cmake -DCMAKE_BUILD_TYPE=Release ..
make

This will build the libraries (static and shared) in build/lib/Release.

The given main in Tests.c launches a ton of tests to check if everything is okay. If you built as told before, you can launch the test program with "make test".

If this is the first time you use this library, please have a look at the documentation or refer to the raw code given in Tests.c to see how the functions are used and called (a tutorial page is coming!).


Building the documentation

Building the documentation requires doxygen and cmake. In your build directory, just call `make doc` after doing the steps described in the compiling part, this will build your documentation in generatedDoc/html. There are images in the directory doc, just copy the directory "images" to the "generatedDoc" directory. To get to the homepage of the doc, open index.html. The config.h file is used to customize what you need. Look for it!


Philosophy of the implementation

It seems important to me to give more precision on how to use this little library and how it has been implemented.

The main idea in this library is that I don't want to lose any information at any time. Thus, all the functions that could modify mass functions create new ones instead! You have to free every new mass function that has been created. To create copies of mass function, there is a function called BF_copyBeliefFunction() which creates a hard copy of the given mass function. That is why most functions work with structures instead of pointers on structures.


Main References


Contact

Bastien Pietropaoli

Email: bastien.pietropaoli@inria.fr or bastien.pietropaoli@gmail.com

Copyright 2011-2013, EDF. This software was developed with the collaboration of INRIA (Bastien Pietropaoli)