Nicolas BENOIT - Maniac

Overview(Edit)

Maniac is a tool designed to automate the comparison and the validation of multiple variants of a same program.
This is achieved by compiling each variant in a distinct shared object and generating a loader program that will successively load and execute them.
The loader also takes charge of initializing input data and checking output data against the reference variant.

The sources tarball comes with a set of demos :

  • compiler options : a same variant is compiled with different options affecting execution time
  • data check : a buggy variant is screened by Maniac as it generates invalid output data
  • generator : a code is sent to PoCC, the resulting variant is timed against the original version
  • implementation : two different implementations of the Syracuse function are compared to each other

A detailed description of the file format used to describe input programs and actions can be found in the manual, an example is given below.

Maniac is written in Python (version 2.6 or above required).

Last update: 20-Feb-2011

Maniac 1.0.1
 - Fixed a bug with the building of generator's relative path.
 - Fixed a few issues with the documentation.
 - Added licensing and copyright infos where it was missing.


Download(Edit)


Screenshots(Edit)

Data Check demo(Edit)

A buggy variant of the Syracuse function is screened by Maniac.
The program syracuse-loader is generated in order to load and execute each variant's shared objet.
The workspace can be cleaned by invoking $ maniac clean.
 

Implementation Timing demo(Edit)

Two different implementations of the Syracuse function are compared to each other.
Maniac outputs a summary that can be pasted into a spreadsheet editor (CSV format).


Mania Description Files(Edit)

Maniac's input files are named mania, they follow an XML-like syntax.

<mania>
  <variants>
    <variant name="buggy" gen="none" />
  </variants>
  <plans>
    <plan name="time" default="true">
      <variants>
        <variant name="ref" compflags="-O2" />
        <variant name="buggy" compflags="-O2" />
      </variants>
    </plan>
  </plans>
  <program name="syracuse" ext="c">
    <entry name="mania_entry" />
    <data>
      <array type="unsigned int" name="array" dims="[111]" ini="true" value="rand" chk="true" />
    </data>
  </program>
</mania>

Above is the mania file of the data check demo.