7864b846ca2f242252f902d3567afed313a872c8
[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         bool getBooleanValue(Boolean *element);
18         ~AlloyEnc();
19 private:
20         void dumpAlloyIntScope();
21         string encodeConstraint(BooleanEdge constraint);
22         int getResult();
23         string encodeBooleanLogic( BooleanLogic *bl);
24         string encodeBooleanVar( BooleanVar *bv);
25         string encodePredicate( BooleanPredicate *bp);
26         string encodeOperatorPredicate(BooleanPredicate *constraint);
27         CSolver *csolver;
28         SignatureEnc sigEnc;
29         ofstream output;
30         static const char * alloyFileName;
31         static const char * solutionFile;
32 };
33
34 #endif