#include <stdio.h>
#include <iostream>
#include "flame/config.h"
#include "flame/base.h"
int main(int argc, char *argv[])
{
    try {
        if(argc<2) return 2;
        registerLinear();
        std::auto_ptr<Config> conf;
        {
        }
        Machine mymachine(*conf);
        mymachine.set_trace(&std::cout); 
        std::auto_ptr<StateBase> thestate(mymachine.allocState());
        std::cout<<"Initial state "<<*thestate<<"\n";
        mymachine.propagate(thestate.get());
        std::cout<<"Final state "<<*thestate<<"\n";
        return 0;
    } catch(std::exception& e) {
        std::cerr<<"Error: "<<e.what()<<"\n";
        return 1;
    }
}