dd93eb039f7d65e22f3359bfe5a90403687bce7b
[satune.git] / src / AlloyEnc / alloyenc.h
1 #ifndef ALLOYENC_H
2 #define ALLOYENC_H
3
4 #include "classlist.h"
5 #include "signatureenc.h"
6 #include <iostream>
7 #include <fstream>
8 using namespace std;
9
10 class AlloyEnc{
11 public:
12         AlloyEnc(CSolver *solver);
13         void encode();
14         int solve();
15         void writeToFile(string str);
16         uint64_t getValue(Element * element);
17         ~AlloyEnc();
18 private:
19         void dumpAlloyIntScope();
20         string encodeConstraint(BooleanEdge constraint);
21         int getResult();
22         string encodeBooleanLogic( BooleanLogic *bl);
23         string encodePredicate( BooleanPredicate *bp);
24         string encodeOperatorPredicate(BooleanPredicate *constraint);
25         CSolver *csolver;
26         SignatureEnc sigEnc;
27         ofstream output;
28         static const char * alloyFileName;
29         static const char * solutionFile;
30 };
31
32 #endif