Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean header includes #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions include/datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

#pragma once

#include "smt_defs.h"
#include <string>

#include "smt_defs.h"

namespace smt {

Expand All @@ -26,7 +27,6 @@ class AbsDatatypeDecl {
public:
AbsDatatypeDecl(){};
virtual ~AbsDatatypeDecl(){};

};


Expand All @@ -38,19 +38,17 @@ class AbsDatatypeConstructorDecl {
virtual bool compare(const DatatypeConstructorDecl & d) const = 0;
};


class AbsDatatype {

public:
AbsDatatype(){};
virtual ~AbsDatatype(){};
virtual std::string get_name() const=0;
virtual int get_num_selectors(std::string cons) const=0;
virtual int get_num_constructors() const=0;
virtual std::string get_name() const = 0;
virtual int get_num_selectors(std::string cons) const = 0;
virtual int get_num_constructors() const = 0;
};
// Overloaded equivalence operators for two datatype constructor declarations
bool operator==(const DatatypeConstructorDecl & d1,
const DatatypeConstructorDecl & d2);
bool operator!=(const DatatypeConstructorDecl & d1,
const DatatypeConstructorDecl & d2);
}
} // namespace smt
1 change: 0 additions & 1 deletion include/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ class InternalSolverException : public SmtException
explicit InternalSolverException(const char * msg) : SmtException(msg){};
explicit InternalSolverException(const std::string& msg) : SmtException(msg){};
};

5 changes: 3 additions & 2 deletions include/generic_datatype.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#pragma once
#include <unordered_map>

#include <functional>
#include <string>
#include <vector>

#include "datatype.h"
#include "exceptions.h"
#include "generic_sort.h"
#include "smt_defs.h"

Expand Down
11 changes: 8 additions & 3 deletions include/generic_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@

#pragma once

#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include "generic_sort.h"
#include "generic_term.h"
#include "generic_datatype.h"
#include "result.h"
#include "smt_defs.h"
#include "solver.h"
#include "sort.h"
#include "term.h"

namespace smt {

Expand Down
6 changes: 4 additions & 2 deletions include/generic_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <functional>
#include <string>
#include <vector>

#include "exceptions.h"
#include "generic_datatype.h"
#include "smt_defs.h"
#include "sort.h"

namespace smt {

class GenericDatatye;
/* Helper functions for creating generic sorts */
Sort make_uninterpreted_generic_sort(std::string name, uint64_t arity);
Sort make_uninterpreted_generic_sort(Sort sort_cons, const SortVec& sorts);
Expand Down
3 changes: 3 additions & 0 deletions include/generic_term.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <functional>
#include <string>

#include "ops.h"
#include "smt_defs.h"
Expand Down
6 changes: 2 additions & 4 deletions include/identity_walker.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

#pragma once

#include <utility>

#include "exceptions.h"
#include "smt.h"
#include "smt_defs.h"
#include "term.h"


namespace smt
Expand Down
12 changes: 10 additions & 2 deletions include/logging_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>

#include "result.h"
#include "smt_defs.h"
#include "solver.h"
#include "sort.h"
#include "term.h"
#include "term_hashtable.h"

#include <string>

namespace smt {

class LoggingSolver : public AbsSmtSolver
Expand Down
4 changes: 4 additions & 0 deletions include/logging_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <string>

#include "exceptions.h"
#include "smt_defs.h"
#include "sort.h"
Expand Down
4 changes: 4 additions & 0 deletions include/logging_term.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <string>

#include "ops.h"
#include "smt_defs.h"
#include "term.h"
Expand Down
5 changes: 3 additions & 2 deletions include/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <functional>
#include <iostream>
#include <string>
#include <utility>
#include <unordered_set>
#include <functional>
#include <utility>

namespace smt {

Expand Down
5 changes: 3 additions & 2 deletions include/portfolio_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

#include <condition_variable>
#include <mutex>
#include <thread>
#include <vector>

#include "smt.h"
#include "result.h"
#include "smt_defs.h"

namespace smt {

Expand Down
7 changes: 6 additions & 1 deletion include/printing_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@

#pragma once

#include <cstdint>
#include <iostream>
#include <string>

#include "smt_defs.h"
#include "solver.h"
#include "term_hashtable.h"
#include "term.h"

namespace smt {

Expand Down
2 changes: 2 additions & 0 deletions include/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <iostream>
#include <string>
namespace smt
{
enum ResultType
Expand Down
13 changes: 11 additions & 2 deletions include/smtlib_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@

#pragma once

#include "assert.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include "smt.h"
#include "exceptions.h"
#include "ops.h"
#include "result.h"
#include "smt_defs.h"
#include "smtlibparser.h"
#include "sort.h"
#include "term.h"

#define YY_DECL smtlib::parser::symbol_type yylex(smt::SmtLibReader & drv)
YY_DECL;
Expand Down
2 changes: 2 additions & 0 deletions include/smtlib_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <string>

/* string constants for the SMT-LIB commands */
const std::string SET_OPTION_STR = "set-option";
const std::string SET_LOGIC_STR = "set-logic";
Expand Down
1 change: 1 addition & 0 deletions include/smtlibparser_maps.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <string>
#include <unordered_map>

#include "ops.h"

Expand Down
1 change: 1 addition & 0 deletions include/solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma once

#include <cstdint>
#include <string>
#include <vector>

Expand Down
4 changes: 4 additions & 0 deletions include/solver_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#pragma once

#include <cstddef>
#include <functional>
#include <iostream>
#include <string>
#include <unordered_set>

namespace smt {
Expand Down
3 changes: 2 additions & 1 deletion include/solver_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
**/
#pragma once

#include "smt.h"
#include "smt_defs.h"
#include "term.h"

namespace smt {

Expand Down
2 changes: 2 additions & 0 deletions include/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <string>
#include <unordered_set>
#include <vector>
Expand Down
7 changes: 2 additions & 5 deletions include/sort_inference.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@

#include <unordered_set>

#include "assert.h"
#include "generic_sort.h"
#include "ops.h"
#include "solver.h"
#include "smt_defs.h"
#include "sort.h"
#include "term.h"

namespace smt {
Expand Down Expand Up @@ -240,4 +238,3 @@ Sort constructor_sort(Op op,
const SortVec & sorts);

} // namespace smt

3 changes: 2 additions & 1 deletion include/sorting_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

#pragma once

#include "smt.h"
#include "smt_defs.h"
#include "term.h"

namespace smt {

Expand Down
2 changes: 2 additions & 0 deletions include/substitution_walker.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#pragma once

#include "identity_walker.h"
#include "smt_defs.h"
#include "term.h"

namespace smt {
// class for doing substitutions
Expand Down
2 changes: 2 additions & 0 deletions include/term.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <list>
Expand Down
1 change: 1 addition & 0 deletions include/term_hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#pragma once

#include <cstddef>
#include <unordered_map>

#include "smt_defs.h"
Expand Down
1 change: 1 addition & 0 deletions include/term_translator.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma once

#include <string>
#include <unordered_map>

#include "smt_defs.h"
Expand Down
5 changes: 3 additions & 2 deletions include/tree_walker.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

#pragma once

#include <unordered_map>
#include <utility>
#include <vector>

#include "exceptions.h"
#include "smt.h"
#include "smt_defs.h"

namespace smt {
/* vector of pairs holding terms and ints that gets used within visit in the
Expand Down
9 changes: 7 additions & 2 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@

#pragma once

#include <cassert>
#include <cstddef>
#include <iostream>
#include <sstream>
#include <string>
#include <unordered_map>

#include "assert.h"
#include "smt.h"
#include "ops.h"
#include "smt_defs.h"
#include "term.h"
#include "term_translator.h"

#ifndef NDEBUG
#define _ASSERTIONS
Expand Down
Loading