SAT Solver Template
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1/**
2* @author Tim Luchterhand
3* @date 28.11.24
4* @file exception.hpp
5* @brief Not implemented exception and BadHeuristicCall exception
6*/
7
8#ifndef EXCEPTION_HPP
9#define EXCEPTION_HPP
10
11#include <stdexcept>
12#include <string>
13#include <functional>
14
15struct NotImplementedException : std::logic_error {
16 NotImplementedException(const std::string &methodName = {});
17};
18
19class BadHeuristicCall : public std::bad_function_call {
20 std::string message;
21public:
22 BadHeuristicCall(std::string message = {});
23 const char *what() const noexcept override;
24};
25
26#define NOT_IMPLEMENTED NotImplementedException(__PRETTY_FUNCTION__)
27
28
29#endif //EXCEPTION_HPP
Definition exception.hpp:19
Structure representing a literal in a CNF-SAT problem.
Definition basic_structures.hpp:56
unsigned get() const
Definition basic_structures.cpp:30
short sign() const
Definition basic_structures.cpp:38
bool operator==(Literal) const
Definition basic_structures.cpp:42
Literal negate() const
Definition basic_structures.cpp:34
Literal(unsigned val)
Definition basic_structures.cpp:26
Structure representing a binary variable in a CNF-SAT problem.
Definition basic_structures.hpp:29
bool operator==(Variable other) const
Definition basic_structures.cpp:22
unsigned get() const
Definition basic_structures.cpp:18
Variable(unsigned val)
Definition basic_structures.cpp:14
#define NOT_IMPLEMENTED
Definition exception.hpp:26
Definition basic_structures.cpp:10
Literal neg(Variable x)
Definition basic_structures.cpp:50
Literal pos(Variable x)
Definition basic_structures.cpp:46
TruthValue
Represents a truth value.
Definition basic_structures.hpp:20
@ Undefined
variable is unassigned
@ True
variable is true
@ False
variable is true
Variable var(Literal l)
Definition basic_structures.cpp:54
Definition exception.hpp:15