Excluding unsupported domains and instances from acceptance tests.
This commit is contained in:
parent
909949ff22
commit
2b0b6570ea
@ -1,6 +1,7 @@
|
||||
#include <catch.hpp>
|
||||
|
||||
#include <experimental/filesystem>
|
||||
#include <set>
|
||||
|
||||
#include <pddlparse/AST.h>
|
||||
#include <pddlparse/Parse.h>
|
||||
@ -10,6 +11,103 @@ namespace fs = std::experimental::filesystem;
|
||||
const pddl::Context::WarningCallback ignoreWarnings = [](const auto &, const auto &){};
|
||||
const auto pddlInstanceBasePath = fs::path("data") / "pddl-instances";
|
||||
|
||||
const std::set<std::experimental::filesystem::path> unsupportedDomains =
|
||||
{
|
||||
// “=” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-1998" / "domains" / "assembly-round-1-adl" / "domain.pddl",
|
||||
// “=” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-1998" / "domains" / "mystery-prime-round-1-strips" / "domain.pddl",
|
||||
// “=” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-1998" / "domains" / "mystery-prime-round-2-strips" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-numeric-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-time-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-time-hand-coded" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-time-simple-automatic" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "depots-time-simple-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-numeric-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-numeric-hard-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-numeric-hard-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-time-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-time-hand-coded" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-time-simple-automatic" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "driverlog-time-simple-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-numeric-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-time-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-time-hand-coded" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-time-simple-automatic" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "rovers-time-simple-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-complex-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-complex-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-numeric-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-numeric-hard-automatic" / "domain.pddl",
|
||||
// “=” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-strips-automatic" / "domain.pddl",
|
||||
// “=” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-strips-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-time-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-time-hand-coded" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-time-simple-automatic" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "satellite-time-simple-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "settlers-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "umtranslog-2-numeric-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-numeric-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-numeric-hand-coded" / "domain.pddl",
|
||||
// “either” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-strips-automatic" / "domain.pddl",
|
||||
// “either” expressions unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-strips-hand-coded" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-time-automatic" / "domain.pddl",
|
||||
// “:functions” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-time-hand-coded" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-time-simple-automatic" / "domain.pddl",
|
||||
// “:durative-action” sections unsupported
|
||||
pddlInstanceBasePath / "ipc-2002" / "domains" / "zenotravel-time-simple-hand-coded" / "domain.pddl",
|
||||
|
||||
};
|
||||
|
||||
const std::set<std::experimental::filesystem::path> unsupportedInstances =
|
||||
{
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_CASE("[PDDL acceptance] All official PDDL domains are parsed without errors", "[PDDL acceptance]")
|
||||
@ -26,6 +124,9 @@ TEST_CASE("[PDDL acceptance] All official PDDL domains are parsed without errors
|
||||
|
||||
const auto domainFile = domainDirectory / "domain.pddl";
|
||||
|
||||
if (unsupportedDomains.find(domainFile) != unsupportedDomains.cend())
|
||||
continue;
|
||||
|
||||
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
|
||||
+ domainDirectory.path().stem().string();
|
||||
|
||||
@ -58,6 +159,12 @@ TEST_CASE("[PDDL acceptance] The first instance for all official PDDL domains is
|
||||
const auto domainFile = domainDirectory / "domain.pddl";
|
||||
const auto instanceFile = domainDirectory / "instances" / "instance-1.pddl";
|
||||
|
||||
if (unsupportedDomains.find(domainFile) != unsupportedDomains.cend()
|
||||
|| unsupportedInstances.find(instanceFile) != unsupportedInstances.cend())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
|
||||
+ domainDirectory.path().stem().string() + ", "
|
||||
+ instanceFile.stem().string();
|
||||
|
@ -77,11 +77,7 @@ TEST_CASE("[PDDL parser issues] Check past issues", "[PDDL parser issues]")
|
||||
const auto invalidFact = std::find_if(facts.cbegin(), facts.cend(),
|
||||
[](const auto &fact)
|
||||
{
|
||||
return
|
||||
fact.template is<pddl::ast::AtPointer<pddl::ast::Literal>>()
|
||||
|| (fact.template is<pddl::ast::Literal>()
|
||||
&& fact.template get<pddl::ast::Literal>().template is<pddl::ast::AtomicFormula>()
|
||||
&& fact.template get<pddl::ast::Literal>().template get<pddl::ast::AtomicFormula>().template is<pddl::ast::UnsupportedPointer>());
|
||||
return fact.template is<pddl::ast::AtPointer<pddl::ast::Literal>>();
|
||||
});
|
||||
|
||||
const auto containsInvalidFact = (invalidFact != facts.cend());
|
||||
|
Reference in New Issue
Block a user