Implemented predicate signature checks.

This commit is contained in:
2017-06-18 04:19:42 +02:00
parent e364d01cf4
commit 6ce4eecb18
3 changed files with 194 additions and 22 deletions

View File

@@ -0,0 +1,34 @@
#ifndef __PDDL_PARSE__DETAIL__SIGNATURE_MATCHING_H
#define __PDDL_PARSE__DETAIL__SIGNATURE_MATCHING_H
#include <string>
#include <pddlparse/AST.h>
namespace pddl
{
namespace detail
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// SignatureMatching
//
////////////////////////////////////////////////////////////////////////////////////////////////////
bool matches(const ast::PrimitiveTypeDeclaration &lhs, const ast::PrimitiveTypeDeclaration &rhs);
bool matches(const ast::Either<ast::PrimitiveTypePointer> &lhs, const ast::PrimitiveTypeDeclaration &rhs);
bool matches(const ast::PrimitiveTypeDeclaration &lhs, const ast::Either<ast::PrimitiveTypePointer> &rhs);
bool matches(const ast::Either<ast::PrimitiveTypePointer> &lhs, const ast::Either<ast::PrimitiveTypePointer> &rhs);
bool matches(const ast::VariableDeclaration &lhs, const std::experimental::optional<ast::Type> &rhs);
bool matches(const ast::ConstantDeclaration &lhs, const std::experimental::optional<ast::Type> &rhs);
bool matches(const ast::Term &lhs, const std::experimental::optional<ast::Type> &rhs);
bool matches(const std::string &predicateName, const ast::Predicate::Arguments &predicateArguments, const ast::PredicateDeclaration &predicateDeclaration);
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif