#include "function.h"
#include "table.h"
#include "csolver.h"
-#include "boolean.h"
Element::Element(ASTNodeType _type) :
ASTNode(_type),
#include "mymemory.h"
#include "structs.h"
#include "astnode.h"
-#include "corestructs.h"
#include "functionencoding.h"
#include "elementencoding.h"
+#include "boolean.h"
class Element : public ASTNode {
public:
#include "qsort.h"
#include "subgraph.h"
#include "elementencoding.h"
-#include "boolean.h"
EncodingGraph::EncodingGraph(CSolver * _solver) :
solver(_solver) {
typedef int Literal;
+struct Edge;
+typedef struct Edge Edge;
+
struct Node;
typedef struct Node Node;
type getVector ## name(Vector ## name * vector, uint index); \
void setExpandVector ## name(Vector ## name * vector, uint index, type item); \
void setVector ## name(Vector ## name * vector, uint index, type item); \
- uint getSizeVector ## name(Vector ## name * vector); \
+ uint getSizeVector ## name(const Vector ## name * vector); \
void setSizeVector ## name(Vector ## name * vector, uint size); \
void deleteVector ## name(Vector ## name * vector); \
void clearVector ## name(Vector ## name * vector); \
#ifndef ELEMENTENCODING_H
#define ELEMENTENCODING_H
#include "classlist.h"
-#include "common.h"
+#include "naiveencoder.h"
+#include "constraint.h"
class ElementEncoding {
public:
#ifndef CLASSLIST_H
#define CLASSLIST_H
+#include "mymemory.h"
#include <inttypes.h>
#include "classes.h"
#include "astnode.h"
class EncodingNode;
class EncodingEdge;
-class ElementEncoding;
-class FunctionEncoding;
-
struct IncrementalSolver;
typedef struct IncrementalSolver IncrementalSolver;
struct TableEntry;
typedef struct TableEntry TableEntry;
typedef int TunableParam;
-struct Edge;
-typedef struct Edge Edge;
#endif
#include "preprocess.h"
#include "serializer.h"
#include "deserializer.h"
-#include "naiveencoder.h"
+#include "encodinggraph.h"
CSolver::CSolver() :
boolTrue(BooleanEdge(new BooleanConst(true))),
IntegerEncodingTransform iet(this);
iet.doTransform();
+ EncodingGraph eg(this);
+ eg.buildGraph();
+ eg.encode();
+
naiveEncodingDecision(this);
satEncoder->encodeAllSATEncoder(this);
int result = unsat ? IS_UNSAT : satEncoder->solve();
void * ourrealloc(void *ptr, size_t size);
*/
-#if 1
+#if 0
void * model_malloc(size_t size);
void model_free(void *ptr);
void * model_calloc(size_t count, size_t size);