Implemented #show statements for completed output.

This commit is contained in:
2017-06-05 02:50:30 +02:00
parent 4fd143ef64
commit 14abc37116
8 changed files with 346 additions and 30 deletions

View File

@@ -241,8 +241,10 @@ struct PredicateSignature
PredicateSignature(const PredicateSignature &other) = delete;
PredicateSignature &operator=(const PredicateSignature &other) = delete;
PredicateSignature(PredicateSignature &&other) noexcept = default;
PredicateSignature &operator=(PredicateSignature &&other) noexcept = default;
// TODO: make noexcept again
// GCC versions before 7 dont declare moving std::string noexcept and would complain here
PredicateSignature(PredicateSignature &&other) = default;
PredicateSignature &operator=(PredicateSignature &&other) = default;
std::string name;
size_t arity;

View File

@@ -38,7 +38,9 @@ class VariableStack
////////////////////////////////////////////////////////////////////////////////////////////////////
bool matches(const Predicate &lhs, const Predicate &rhs);
void collectPredicates(const Formula &formula, std::vector<const Predicate *> &predicates);
bool matches(const Predicate &predicate, const PredicateSignature &signature);
bool matches(const PredicateSignature &lhs, const PredicateSignature &rhs);
void collectPredicateSignatures(const Formula &formula, std::vector<PredicateSignature> &predicateSignatures);
////////////////////////////////////////////////////////////////////////////////////////////////////
// Replacing Variables

View File

@@ -2,6 +2,7 @@
#define __ANTHEM__COMPLETION_H
#include <anthem/AST.h>
#include <anthem/Context.h>
namespace anthem
{
@@ -12,7 +13,7 @@ namespace anthem
//
////////////////////////////////////////////////////////////////////////////////////////////////////
std::vector<ast::Formula> complete(std::vector<ast::ScopedFormula> &&scopedFormulas);
std::vector<ast::Formula> complete(std::vector<ast::ScopedFormula> &&scopedFormulas, Context &context);
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,22 @@
#ifndef __ANTHEM__HIDDEN_PREDICATE_ELIMINATION_H
#define __ANTHEM__HIDDEN_PREDICATE_ELIMINATION_H
#include <anthem/AST.h>
#include <anthem/Context.h>
namespace anthem
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// HiddenPredicateElimination
//
////////////////////////////////////////////////////////////////////////////////////////////////////
void eliminateHiddenPredicates(const std::vector<ast::PredicateSignature> &predicateSignatures, std::vector<ast::Formula> &completedFormulas, Context &context);
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif