// BuddPlaLoadTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "bdd.h"
#include "BuddyPlaLoad.h"
#include "time.h"
#include "string.h"

int main(int argc, char* argv[])
{	
	bdd_cpp_init(1000,100);
	bdd_setvarnum(5);
	BddArray result;	
	time_t start, end;
	FILE *f;
	char path[100] = "C:\\Testy\\Vystupy\\i50o250t1000dc50";
	char fullPath[100];
	
	strcpy(fullPath, path);
	strcat(fullPath , ".pla");
	
	start = clock();
	BuddyPlaLoad(fullPath, &result);
	end = clock(); 
	s_bddStat info;
	bdd_stats(&info);		
	strcpy(fullPath, path);
	strcat(fullPath , "-buddy.txt");
	f = fopen(fullPath, "w");	
	fprintf(f, "cas vztvoreni BDD: %d \n", (end-start));
	fprintf(f, "pocet uzlu v buddy je roven: %d \n", info.nodenum-info.freenodes);
	fclose(f);
	bdd_done();
	return 0;
}

