Deleted unneeded files.

This commit is contained in:
Patrick Lühne 2016-11-23 04:41:53 +01:00
parent 29d1c15137
commit abd61095e2
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
4 changed files with 0 additions and 242 deletions

View File

@ -1,63 +0,0 @@
#ifndef __ANTHEM__BODY_LITERAL_VISITOR_H
#define __ANTHEM__BODY_LITERAL_VISITOR_H
#include <anthem/Utils.h>
namespace anthem
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// BodyLiteralVisitor
//
////////////////////////////////////////////////////////////////////////////////////////////////////
void throwErrorUnsupportedBodyLiteral(const char *statementType, const Clingo::AST::BodyLiteral &bodyLiteral)
{
const auto errorMessage = std::string("") + statementType + "” body literals currently not supported";
throwErrorAtLocation(bodyLiteral.location, errorMessage.c_str());
throw std::runtime_error(errorMessage);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct BodyLiteralVisitor
{
void visit(const Clingo::AST::Literal &, const Clingo::AST::BodyLiteral &)
{
std::cout << "[literal]" << std::endl;
}
void visit(const Clingo::AST::ConditionalLiteral &, const Clingo::AST::BodyLiteral &bodyLiteral)
{
throwErrorUnsupportedBodyLiteral("conditional literal", bodyLiteral);
}
void visit(const Clingo::AST::Aggregate &, const Clingo::AST::BodyLiteral &bodyLiteral)
{
throwErrorUnsupportedBodyLiteral("aggregate", bodyLiteral);
}
void visit(const Clingo::AST::BodyAggregate &, const Clingo::AST::BodyLiteral &bodyLiteral)
{
throwErrorUnsupportedBodyLiteral("body aggregate", bodyLiteral);
}
void visit(const Clingo::AST::TheoryAtom &, const Clingo::AST::BodyLiteral &bodyLiteral)
{
throwErrorUnsupportedBodyLiteral("theory atom", bodyLiteral);
}
void visit(const Clingo::AST::Disjoint &, const Clingo::AST::BodyLiteral &bodyLiteral)
{
throwErrorUnsupportedBodyLiteral("disjoint", bodyLiteral);
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif

View File

@ -1,63 +0,0 @@
#ifndef __ANTHEM__HEAD_LITERAL_VISITOR_H
#define __ANTHEM__HEAD_LITERAL_VISITOR_H
#include <anthem/LiteralVisitor.h>
#include <anthem/Utils.h>
namespace anthem
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// HeadLiteralVisitor
//
////////////////////////////////////////////////////////////////////////////////////////////////////
void throwErrorUnsupportedHeadLiteral(const char *statementType, const Clingo::AST::HeadLiteral &headLiteral)
{
const auto errorMessage = std::string("") + statementType + "” head literals currently unsupported";
throwErrorAtLocation(headLiteral.location, errorMessage.c_str());
throw std::runtime_error(errorMessage);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct HeadLiteralVisitor
{
void visit(const Clingo::AST::Literal &literal, const Clingo::AST::HeadLiteral &)
{
if (literal.sign != Clingo::AST::Sign::None)
throwErrorAtLocation(literal.location, "only positive literals currently supported");
literal.data.accept(LiteralVisitor(), literal);
}
void visit(const Clingo::AST::Disjunction &, const Clingo::AST::HeadLiteral &headLiteral)
{
// TODO: implement
throwErrorUnsupportedHeadLiteral("disjunction", headLiteral);
}
void visit(const Clingo::AST::Aggregate &, const Clingo::AST::HeadLiteral &headLiteral)
{
throwErrorUnsupportedHeadLiteral("aggregate", headLiteral);
}
void visit(const Clingo::AST::HeadAggregate &, const Clingo::AST::HeadLiteral &headLiteral)
{
throwErrorUnsupportedHeadLiteral("head aggregate", headLiteral);
}
void visit(const Clingo::AST::TheoryAtom &, const Clingo::AST::HeadLiteral &headLiteral)
{
throwErrorUnsupportedHeadLiteral("theory", headLiteral);
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif

View File

@ -1,57 +0,0 @@
#ifndef __ANTHEM__LITERAL_VISITOR_H
#define __ANTHEM__LITERAL_VISITOR_H
#include <anthem/TermVisitor.h>
#include <anthem/Utils.h>
namespace anthem
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// LiteralVisitor
//
////////////////////////////////////////////////////////////////////////////////////////////////////
void throwErrorUnsupportedLiteral(const char *statementType, const Clingo::AST::Literal &literal)
{
const auto errorMessage = std::string("") + statementType + "” literals currently unsupported";
throwErrorAtLocation(literal.location, errorMessage.c_str());
throw std::runtime_error(errorMessage);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct LiteralVisitor
{
void visit(const Clingo::AST::Boolean &boolean, const Clingo::AST::Literal &)
{
if (boolean.value == true)
std::cout << "#true";
else
std::cout << "#false";
}
void visit(const Clingo::AST::Term &term, const Clingo::AST::Literal &)
{
term.data.accept(TermVisitor(), term);
}
void visit(const Clingo::AST::Comparison &, const Clingo::AST::Literal &literal)
{
throwErrorUnsupportedLiteral("comparison", literal);
}
void visit(const Clingo::AST::CSPLiteral &, const Clingo::AST::Literal &literal)
{
throwErrorUnsupportedLiteral("CSP literal", literal);
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif

View File

@ -1,59 +0,0 @@
#ifndef __ANTHEM__TERM_VISITOR_H
#define __ANTHEM__TERM_VISITOR_H
#include <anthem/Utils.h>
namespace anthem
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TermVisitor
//
////////////////////////////////////////////////////////////////////////////////////////////////////
struct TermVisitor
{
void visit(const Clingo::Symbol &symbol, const Clingo::AST::Term &)
{
std::cout << symbol;
}
void visit(const Clingo::AST::Variable &, const Clingo::AST::Term &term)
{
throwErrorAtLocation(term.location, "“variable” terms currently unsupported");
}
void visit(const Clingo::AST::UnaryOperation &, const Clingo::AST::Term &term)
{
throwErrorAtLocation(term.location, "“unary operation” terms currently unsupported");
}
void visit(const Clingo::AST::BinaryOperation &, const Clingo::AST::Term &term)
{
throwErrorAtLocation(term.location, "“binary operation” terms currently unsupported");
}
void visit(const Clingo::AST::Interval &, const Clingo::AST::Term &term)
{
throwErrorAtLocation(term.location, "“interval” terms currently unsupported");
}
void visit(const Clingo::AST::Function &function, const Clingo::AST::Term &term)
{
std::cout << "[" << function.name << "]";
throwErrorAtLocation(term.location, "“function” terms currently unsupported");
}
void visit(const Clingo::AST::Pool &, const Clingo::AST::Term &term)
{
throwErrorAtLocation(term.location, "“pool” terms currently unsupported");
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif