source: vis_dev/dev/utilities.h @ 19

Last change on this file since 19 was 15, checked in by cecile, 13 years ago

Vis main file for expermeriments

File size: 2.4 KB
RevLine 
[15]1#ifndef UTILITIES_H_
2#define UTILITIES_H_
3#include "ntk.h"
4#include "ord.h"
5#include "part.h"
6#include "maig.h"
7#include "ntmaig.h"
8#include "fsm.h"
9#include "ctlp.h"
10#include "ctlsp.h"
11#include "mcInt.h"
12#include "grabInt.h"
13#include "bmc.h"
14#include "bmcInt.h"
15#include "satInt.h"
16#include <stdio.h>
17#include <stdlib.h>
18
19
20static int
21nodenameCompare(
22  const void * node1,
23  const void * node2)
24{
25Ntk_Node_t *v1, *v2;
26char *name1, *name2;
27
28  v1 = *(Ntk_Node_t **)(node1);
29  v2 = *(Ntk_Node_t **)(node2);
30  name1 = Ntk_NodeReadName(v1);
31  name2 = Ntk_NodeReadName(v2);
32 
33  return (strcmp(name1, name2));
34} 
35
36// Read blifmv file
37Hrc_Manager_t * rlmv(FILE * file);
38//flatten_hier
39// @ return the network
40Ntk_Network_t * flatten_hier(Hrc_Manager_t * hmgr);
41// Build_partition_maigs 
42// @ return table node_ntk to aigTable
43st_table * build_partition_maigs(Ntk_Network_t * ntk);
44void printNodeToMvFaigTable(st_table* nodeToMvfAigTable);
45// print name of table containing Ntk_Node_t
46void printLatch(st_table* CoiTable);
47// generate all node of a network
48// @return a table with all node of a given network
49st_table * generateAllLatches(Ntk_Network_t * ntk);
50// Create unroll circuit k steps 
51// Build SAT instance
52//   Create clauses database
53//       BmcOption_t *options =  BmcOptionAlloc();
54//   BmcCnfClauses_t   *cnfClauses = NIL(BmcCnfClauses_t);
55//       cnfClauses = BmcCnfClausesAlloc();
56void build_unroll_circuit(Ntk_Network_t * ntk, int bound,BmcOption_t * options,BmcCnfClauses_t* cnfClauses);
57void printSATAssig( array_t* result);
58void printCNFIndex(BmcCnfClauses_t* cnfClauses);
59void printCNFClauses(BmcCnfClauses_t* cnfClauses);
60void printClauseLits(satManager_t *cm,long concl,FILE * file);
61int getClsIndex(long concl,int numVarInCnf);
62void printSatArrayCore(satManager_t *cm,satArray_t *clauseIndexInCore);
63void printSatArrayCoreToCnf(satManager_t *cm,satArray_t *clauseIndexInCore, char *filename);
64// Check Sat
65// @return array_t empty if unsat
66// else print cex with :
67//      BmcPrintCounterExample(ntk1,nodeToMvfAigTable,cnfClauses,result,steps,CoiTable,options, NIL(array_t));
68
69array_t * checkSATCircus( satManager_t *cm,BmcOption_t * options, boolean unsatcore,    satArray_t *clauseIndexInCore);
70int findIndex(BmcCnfClauses_t* cnfClauses , char * nodeName);
71// Add val to state register
72mdd_t * buildBdd4StateVal(array_t* stateName, int max, array_t * val, mdd_manager * mddManager);
73void addObjState(array_t* stateName, int max, array_t * val, int steps,BmcCnfClauses_t *cnfClauses);
74
75#endif
Note: See TracBrowser for help on using the repository browser.