Skip to content

Commit

Permalink
removed serialization since it is not maintainable and can be a sourc…
Browse files Browse the repository at this point in the history
…e or errors
  • Loading branch information
drexlerd committed Nov 21, 2023
1 parent 43a1d34 commit c13cd02
Show file tree
Hide file tree
Showing 136 changed files with 51 additions and 6,020 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ configure_ccache()

# Boost
configure_boost()
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS serialization)
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})

##############################################################
Expand Down
2 changes: 1 addition & 1 deletion Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/cmake/configure_boost.cmake")
include(CMakeFindDependencyMacro)

configure_boost()
find_dependency(Boost ${BOOST_MIN_VERSION} COMPONENTS serialization)
find_dependency(Boost ${BOOST_MIN_VERSION} REQUIRED)


############
Expand Down
2 changes: 0 additions & 2 deletions api/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ target_sources(_dlplan
src/generator.cpp
src/novelty.cpp
src/policy.cpp
src/serialization.cpp
src/state_space.cpp)
target_link_libraries(_dlplan
PRIVATE
Expand All @@ -16,6 +15,5 @@ target_link_libraries(_dlplan
dlplangenerator
dlplannovelty
dlplanpolicy
dlplanserialization
dlplanstatespace)
target_compile_definitions(_dlplan PUBLIC DLPLAN_VERSION_INFO="${DLPLAN_VERSION_INFO}")
2 changes: 0 additions & 2 deletions api/python/src/dlplan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
# For backward compatibility
# from _dlplan import *
2 changes: 1 addition & 1 deletion api/python/src/dlplan/policy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from _dlplan import NamedBaseElement, NamedBoolean, NamedNumerical, NamedConcept, NamedRole, \
from _dlplan import NamedBoolean, NamedNumerical, NamedConcept, NamedRole, \
BaseCondition, BaseEffect, Rule, Policy, PolicyFactory, \
PolicyMinimizer
21 changes: 14 additions & 7 deletions api/python/src/dlplan/policy/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,32 @@ from typing import List, Overload, Union, MutableSet, Tuple
from ..core import State, DenotationsCaches, Boolean, Numerical, Concept, Role, SyntacticElementFactory


class NamedBaseElement:

class NamedBoolean():
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def get_key(self) -> str: ...


class NamedBoolean(NamedBaseElement):
def get_boolean(self) -> Boolean: ...


class NamedNumerical(NamedBaseElement):
class NamedNumerical():
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def get_key(self) -> str: ...
def get_numerical(self) -> Numerical: ...


class NamedConcept(NamedBaseElement):
class NamedConcept():
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def get_key(self) -> str: ...
def get_concept(self) -> Concept: ...


class NamedRole(NamedBaseElement):
class NamedRole():
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def get_key(self) -> str: ...
def get_role(self) -> Role: ...


Expand Down
1 change: 0 additions & 1 deletion api/python/src/dlplan/serialization/__init__.py

This file was deleted.

24 changes: 0 additions & 24 deletions api/python/src/dlplan/serialization/__init__.pyi

This file was deleted.

3 changes: 0 additions & 3 deletions api/python/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ void init_core(py::module_ &);
void init_generator(py::module_ &);
void init_novelty(py::module_ &);
void init_policy(py::module_ &);
void init_serialization(py::module_ &);
void init_state_space(py::module_ &);

PYBIND11_MODULE(_dlplan, m) {
Expand All @@ -20,14 +19,12 @@ PYBIND11_MODULE(_dlplan, m) {
py::module_ m_generator = m.def_submodule("generator", "The generator submodule.");
py::module_ m_novelty = m.def_submodule("novelty", "The novelty submodule.");
py::module_ m_policy = m.def_submodule("policy", "The policy submodule.");
py::module_ m_serialization = m.def_submodule("serialization", "The serialization submodule.");
py::module_ m_state_space = m.def_submodule("state_space", "The state_space submodule.");

init_core(m);
init_generator(m);
init_novelty(m);
init_policy(m);
init_serialization(m);
init_state_space(m);

#ifdef VERSION_INFO
Expand Down
26 changes: 16 additions & 10 deletions api/python/src/policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,31 @@ using namespace dlplan;


void init_policy(py::module_ &m_policy) {
py::class_<policy::NamedBaseElement, std::shared_ptr<policy::NamedBaseElement>>(m_policy, "NamedBaseElement")
.def("__repr__", &policy::NamedBaseElement::compute_repr)
.def("__str__", &policy::NamedBaseElement::str)
.def("get_key", &policy::NamedBaseElement::get_key)
;

py::class_<policy::NamedBoolean, policy::NamedBaseElement, std::shared_ptr<policy::NamedBoolean>>(m_policy, "NamedBoolean")
py::class_<policy::NamedBoolean, std::shared_ptr<policy::NamedBoolean>>(m_policy, "NamedBoolean")
.def("__repr__", &policy::NamedBoolean::compute_repr)
.def("__str__", &policy::NamedBoolean::str)
.def("get_key", &policy::NamedBoolean::get_key)
.def("get_boolean", &policy::NamedBoolean::get_boolean)
;

py::class_<policy::NamedNumerical, policy::NamedBaseElement, std::shared_ptr<policy::NamedNumerical>>(m_policy, "NamedNumerical")
py::class_<policy::NamedNumerical, std::shared_ptr<policy::NamedNumerical>>(m_policy, "NamedNumerical")
.def("__repr__", &policy::NamedNumerical::compute_repr)
.def("__str__", &policy::NamedNumerical::str)
.def("get_key", &policy::NamedNumerical::get_key)
.def("get_numerical", &policy::NamedNumerical::get_numerical)
;

py::class_<policy::NamedConcept, policy::NamedBaseElement, std::shared_ptr<policy::NamedConcept>>(m_policy, "NamedConcept")
py::class_<policy::NamedConcept, std::shared_ptr<policy::NamedConcept>>(m_policy, "NamedConcept")
.def("__repr__", &policy::NamedConcept::compute_repr)
.def("__str__", &policy::NamedConcept::str)
.def("get_key", &policy::NamedConcept::get_key)
.def("get_concept", &policy::NamedConcept::get_concept)
;

py::class_<policy::NamedRole, policy::NamedBaseElement, std::shared_ptr<policy::NamedRole>>(m_policy, "NamedRole")
py::class_<policy::NamedRole, std::shared_ptr<policy::NamedRole>>(m_policy, "NamedRole")
.def("__repr__", &policy::NamedRole::compute_repr)
.def("__str__", &policy::NamedRole::str)
.def("get_key", &policy::NamedRole::get_key)
.def("get_role", &policy::NamedRole::get_role)
;

Expand Down
43 changes: 0 additions & 43 deletions api/python/src/serialization.cpp

This file was deleted.

Empty file.
35 changes: 0 additions & 35 deletions api/python/tests/serialization/gripper/domain.pddl

This file was deleted.

25 changes: 0 additions & 25 deletions api/python/tests/serialization/gripper/p-1-0.pddl

This file was deleted.

28 changes: 0 additions & 28 deletions api/python/tests/serialization/gripper/p-2-0.pddl

This file was deleted.

Loading

0 comments on commit c13cd02

Please sign in to comment.