94d991e726548bf96f2988f66ecfae57731c8beb
[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         string encodeConstraint(BooleanEdge constraint);
20         int getResult();
21         string encodeBooleanLogic( BooleanLogic *bl);
22         string encodePredicate( BooleanPredicate *bp);
23         string encodeOperatorPredicate(BooleanPredicate *constraint);
24         CSolver *csolver;
25         SignatureEnc sigEnc;
26         ofstream output;
27         static const char * alloyFileName;
28         static const char * solutionFile;
29 };
30
31 #endif