2016-11-22 03:15:52 +01:00
|
|
|
#ifndef __ANTHEM__UTILS_H
|
|
|
|
#define __ANTHEM__UTILS_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <clingo.hh>
|
|
|
|
|
|
|
|
namespace anthem
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Utils
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
inline void throwErrorAtLocation(const Clingo::Location &location, const char *errorMessage)
|
|
|
|
{
|
|
|
|
std::cerr
|
|
|
|
<< location.begin_file() << ":"
|
|
|
|
<< location.begin_line() << ":" << location.begin_column()
|
|
|
|
<< ": error: "
|
|
|
|
<< errorMessage << std::endl;
|
2016-11-23 03:29:26 +01:00
|
|
|
|
|
|
|
throw std::runtime_error(errorMessage);
|
2016-11-22 03:15:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-11-23 04:41:38 +01:00
|
|
|
constexpr const auto AuxiliaryHeadVariablePrefix = "AUX_H";
|
|
|
|
constexpr const auto AuxiliaryBodyVariablePrefix = "AUX_B";
|
2016-11-23 03:29:26 +01:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-11-22 03:15:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|