-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCLSolver.h
70 lines (60 loc) · 2.65 KB
/
CLSolver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
* Copyright (C) 2014 by Mushthofa *
* Mushthofa.Mushthofa@Ugent.be *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/**
* @file CLSolver.h
* @author Mushthofa
*
* @brief ASP solver class implemented using clingo.
*
*/
#ifndef _CLSOLVER_H
#define _CLSOLVER_H
#include "ASPSolver.h"
#include "ProcessBuff.h"
//#include "FAnswerSet.h"
#include <sstream>
#include <set>
class CLSolver : public ASPSolver
{
public:
CLSolver(std::set<std::string> filter, bool checkOnly);
//DLVASPSolver(ASPResultParser*);
~CLSolver();
void callSolver(std::string program, int k, int time);
//AtomSet getNextAnswerSet();
void getNextAnswerSet();
//unsigned numAnswerSets();
bool answerSetsLeft() const;
private:
ProcessBuf* pb;
bool checkOnly;
bool checkSatisfy;
//void processAS(std::string, int k);
//std::vector<std::string> aslines;
};
class CLSolverEngine : public ASPSolverEngine
{
public:
CLSolverEngine();
virtual ASPSolver* createSolverFilter(bool checkOnly, std::set<std::string>);
virtual ASPSolver* createSolver(bool checkOnly);
};
#endif
//End