[Fawkes Git] branch/bschaepers/asp-aspect: 70 revs updated. (0.5.0-3437-g3692046)

Bjoern Schaepers bjoern.schaepers at rwth-aachen.de
Tue Nov 1 14:03:27 CET 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, bschaepers/asp-aspect has been updated
  discards  14251eb0b2849c52128d21c0abaeea632d8f035c (commit)
  discards  050cadb8d8438039009e4606ffcb993d1c977f9d (commit)
  discards  56eb16f2a00b20fc1ebfa9dfdf6cad041422b741 (commit)
  discards  04a5ca3f12b5d110402b6cbd331a47b3b7b29069 (commit)
  discards  e6df00eb58b7a64ae286dc20b6a867c5c28c6273 (commit)
  discards  fb56ce34f7a4c8c6fdba5f3752d69bb7d4c59ebc (commit)
  discards  70b60407fb70c9e6fbbb5b0a7ba2a679e590be4f (commit)
  discards  10dd8ee45c19379b016a50499e7683cdb0590fde (commit)
  discards  0e73c34d51d17f9d12d04168bba2100f9057c1ef (commit)
        to  36920462f64b4f5aae158ce8f0b2fa9ccac69944 (commit)
       via  83afebd42bbb6fcc0d6bc78e976d771a6f9692f9 (commit)
       via  026a3c991b6b3c03c3f52323b1e4806eef871c73 (commit)
       via  93e1ab2233d2d363a1b7de79f5e27fad62c0cb7f (commit)
       via  f8396e93cd29dcf422fdffa110a2b236d3e036c2 (commit)
       via  33b4a657a8a63e7fd2884731b3625913db46a827 (commit)
       via  cdaf98b71ffaa206a5970a296311409ed8ef1c83 (commit)
       via  08631464ada4b381dcebfd87577bf85f9bb5fee5 (commit)
       via  c2529c2064beb684760087762afae975af1cfa57 (commit)
       via  60b435c6524e8d4411feca88d83007991ec2784e (commit)
       via  be4214aee6d19210d3449972c9b04f4f2f94d465 (commit)
       via  5c9f7492f882f64585825845aecd4adef3ec0f15 (commit)
       via  158cbdefb42524f5a575b1797f96e5478fb345fd (commit)
       via  d08ddcdd5271f7ea692462522711841cf6ca256f (commit)
       via  55bcabed2dec2c073f34f7eb445e05a2c00d1742 (commit)
       via  c7528c3032adb961f2714b0df4298a5bc3258189 (commit)
       via  8d18688c45ea10aa3338cafa6d4227c11b5b9d0d (commit)
       via  6eafa9c64e30efac5b8cfdf40f2ddc8bb583c548 (commit)
       via  9f9428d0400c6adfb685415af6ac8e0bf6bd26be (commit)
       via  4c3a6a6b87d41755bb9d383afae20b24dac70224 (commit)
       via  5387a75bae1e0ce106f8c9e21a6226411d845621 (commit)
       via  7c6cda7df994d2355c46debc88d29b906cf3f99d (commit)
       via  e1e2264aa7bfe8ac10bf83dfc7e6eacd9bdd3431 (commit)
       via  d3cafa435a8a919c85c087a0eed1dd79228d0146 (commit)
       via  22e48fb6e702b0210210ed6032be870178eb64fe (commit)
       via  ebb35b54b721f0e6479a2e600e8a89cb7d269560 (commit)
       via  53d178b07bfcf2d3ebbfe7032c12cddb92c05439 (commit)
       via  325821df6a31cb7702cf5a330e4910b1748921e0 (commit)
       via  ef3d9a20b40ecd024a8143b6f603ac620ec70e43 (commit)
       via  4270c488e8edeb250df1258dfd6a915e836174b3 (commit)
       via  386a339d826b1bf9d0947d5f0879f8e53438c95c (commit)
       via  5729d6f402028c886397bce50000dd9d44fd9d18 (commit)
       via  5173577ed6812e699e22143881e221a09629e707 (commit)
       via  19d0fbfafa5901603ac07a8dd13cc6021f0350a0 (commit)
       via  d5cc3a8454a34cb3661f409dcfd67262fb5f5b0d (commit)
       via  365c95966cad4aac69ea73323cec4f2098ab1531 (commit)
       via  0ba989a955956994feb728db46859943183c089f (commit)
       via  291d8475b466d01f1be661bcc8a5b1a96f923ef4 (commit)
       via  a03d31e17ffb0d8a1d5ddb1a791c5d5f4dddab8b (commit)
       via  67666871ebc5ba66f3b874a6448dfdac84d52435 (commit)
       via  ae75a1bf012916533f7c608c5d61ed8b53e706c0 (commit)
       via  553e17b178e18bd0dc814b99ed22a28331e248cd (commit)
       via  04a3c63656cd488bbd7b3f06f976333f9db6e5d2 (commit)
       via  69195c38a75ac601772b9cabd4dad09040d421eb (commit)
       via  54478d8068bd92d09e339929974a5ce260b54089 (commit)
       via  c0357cb0cb7d0e11834b83ccdd3edfb6f1f3ac5a (commit)
       via  de73a7db12983440d1d4de7f5103f13660f4b24f (commit)
       via  3af7d94677205381ecd336b048dc8c33c7dcf9a5 (commit)
       via  b9f7287e9839760b67c07f4365d0034c34276a5c (commit)
       via  9cf08148999af9ae0f74eb3a719fa56d1e4c7864 (commit)
       via  cdecfb075141a21d62f4ef1ac0590403fd5c34fc (commit)
       via  e47565a0598910e69d3e397856afd2c91d0270bc (commit)
       via  5bf7f961a90888869504f86b926602ad9ac2e766 (commit)
       via  d8a0684480e717cd1b12178067cbe4a1e1b10806 (commit)
       via  6b6a1772bf007d4b0be9e9d75f8870c16bd4fa04 (commit)
       via  a184dc8ad586101023be35bca4c8cb577ba45e42 (commit)
       via  aedae1b4e6c33806c65789fe094d22c5c5e528ea (commit)
       via  0121b82476f370d33e5cd1c58cc5a55d2aa083a1 (commit)
       via  fd1d110a8cb83eb931efce4056f47e1ca531cc26 (commit)
       via  43c0ff74262a4175f7ef4311440e09b2d3fb979f (commit)
       via  24573f491e916ea4fe2dd1948c4f091566401c6a (commit)
       via  7d86c6fc167acc2d6ff0f95fc7692dee31d2c463 (commit)
       via  b2a5231a1ba736c9114a903556300e3c61da6fcb (commit)
       via  4bb5f4709e414612659dbedeb42384d5661b6530 (commit)
       via  63d7186f6cdd37d715aeb7b57c953049f2e33673 (commit)
       via  15fad015e6794700d1da6ebd09cbb1ddee61efb4 (commit)
       via  6bbf4ea6838a733dcf3f8e8c9603f0a9bbf265d6 (commit)
       via  caec699dd3e4fdc46781bc6104c4ca052f688009 (commit)
       via  7138569cfccbbf9efc8ee18131cdf03c21f410da (commit)
       via  8806eb005879a2e879217f00cad88fb8f7cdaa15 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (14251eb0b2849c52128d21c0abaeea632d8f035c)
            \
             N -- N -- N (36920462f64b4f5aae158ce8f0b2fa9ccac69944)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

http://git.fawkesrobotics.org/fawkes.git/bschaepers/asp-aspect

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit c2529c2064beb684760087762afae975af1cfa57
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Thu Oct 20 16:33:40 2016 +0200
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    Added ASP aspect.

http://git.fawkesrobotics.org/fawkes.git/commit/c2529c2
http://trac.fawkesrobotics.org/changeset/c2529c2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 08631464ada4b381dcebfd87577bf85f9bb5fee5
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Thu Oct 20 23:19:33 2016 +0200
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP Aspect: Use Fawkes logging for Clingo.

http://git.fawkesrobotics.org/fawkes.git/commit/0863146
http://trac.fawkesrobotics.org/changeset/0863146

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit cdaf98b71ffaa206a5970a296311409ed8ef1c83
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Thu Oct 27 16:57:30 2016 +0200
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Added ClingoControlManager
    
    Similar to CLIPSEnvManager.
    Not yet used by the aspects.

http://git.fawkesrobotics.org/fawkes.git/commit/cdaf98b
http://trac.fawkesrobotics.org/changeset/cdaf98b

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 33b4a657a8a63e7fd2884731b3625913db46a827
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Sat Oct 29 11:50:46 2016 +0200
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Added ClingoManagerAspect.
    
    Still not in use.

http://git.fawkesrobotics.org/fawkes.git/commit/33b4a65
http://trac.fawkesrobotics.org/changeset/33b4a65

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit f8396e93cd29dcf422fdffa110a2b236d3e036c2
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Sun Oct 30 13:57:12 2016 +0100
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Prepared aspect and inifin for the control manager.

http://git.fawkesrobotics.org/fawkes.git/commit/f8396e9
http://trac.fawkesrobotics.org/changeset/f8396e9

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 93e1ab2233d2d363a1b7de79f5e27fad62c0cb7f
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Sun Oct 30 20:52:38 2016 +0100
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASPAspect: Use the clingo control manager for the aspects.

http://git.fawkesrobotics.org/fawkes.git/commit/93e1ab2
http://trac.fawkesrobotics.org/changeset/93e1ab2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 026a3c991b6b3c03c3f52323b1e4806eef871c73
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Mon Oct 31 16:26:27 2016 +0100
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Added access wrapper class.
    
    This way the model symbols are stored next to the clingo control and
    user of the control manager have access to the symbols and not only the
    solver.

http://git.fawkesrobotics.org/fawkes.git/commit/026a3c9
http://trac.fawkesrobotics.org/changeset/026a3c9

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 83afebd42bbb6fcc0d6bc78e976d771a6f9692f9
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Mon Oct 31 16:44:19 2016 +0100
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Use a different name for the member.
    
    Clingo is also the name of the namespace, this confuses syntax
    highlighting and may confuse humans too, so change it.

http://git.fawkesrobotics.org/fawkes.git/commit/83afebd
http://trac.fawkesrobotics.org/changeset/83afebd

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 36920462f64b4f5aae158ce8f0b2fa9ccac69944
Author:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
AuthorDate: Mon Oct 31 17:04:05 2016 +0100
Commit:     Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
CommitDate: Tue Nov 1 14:02:58 2016 +0100

    ASP-Aspect: Added external handling.

http://git.fawkesrobotics.org/fawkes.git/commit/3692046
http://trac.fawkesrobotics.org/changeset/3692046

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 cfg/conf.d/robot-memory.yaml                       |   13 +
 src/libs/utils/misc/string_conversions.cpp         |    1 +
 src/plugins/Makefile                               |    6 +-
 src/plugins/clips-robot-memory/Makefile            |   60 ++
 .../clips-robot-memory/clips_rm_trigger.cpp        |   84 +++
 src/plugins/clips-robot-memory/clips_rm_trigger.h  |   52 ++
 .../clips_robot_memory_plugin.cpp                  |   48 ++
 .../clips_robot_memory_thread.cpp                  |  718 ++++++++++++++++++++
 .../clips-robot-memory/clips_robot_memory_thread.h |  103 +++
 src/plugins/clips-robot-memory/robot-memory.clp    |   90 +++
 src/plugins/mongodb/mongodb_thread.cpp             |    2 +-
 src/plugins/pddl-robot-memory/Makefile             |   62 ++
 src/plugins/pddl-robot-memory/ctemplate.mk         |   33 +
 src/plugins/pddl-robot-memory/interfaces/Makefile  |   24 +
 .../interfaces/PddlGenInterface.xml                |   21 +
 .../pddl-robot-memory/pddl_robot_memory_plugin.cpp |   48 ++
 .../pddl-robot-memory/pddl_robot_memory_thread.cpp |  243 +++++++
 .../pddl-robot-memory/pddl_robot_memory_thread.h   |   76 ++
 src/plugins/robot-memory/Makefile                  |   65 ++
 src/plugins/robot-memory/aspect/Makefile           |   46 ++
 .../robot-memory/aspect/robot_memory_aspect.cpp    |   53 ++
 .../robot-memory/aspect/robot_memory_aspect.h      |   55 ++
 .../robot-memory/aspect/robot_memory_inifin.cpp    |   79 +++
 .../robot-memory/aspect/robot_memory_inifin.h      |   47 ++
 src/plugins/robot-memory/computable.cpp            |   84 +++
 src/plugins/robot-memory/computable.h              |   44 ++
 src/plugins/robot-memory/computables_manager.cpp   |  118 ++++
 src/plugins/robot-memory/computables_manager.h     |   73 ++
 src/plugins/robot-memory/event_trigger.cpp         |   33 +
 src/plugins/robot-memory/event_trigger.h           |   51 ++
 src/plugins/robot-memory/event_trigger_manager.cpp |  102 +++
 src/plugins/robot-memory/event_trigger_manager.h   |  110 +++
 src/plugins/robot-memory/interfaces/Makefile       |   24 +
 .../interfaces/RobotMemoryInterface.cpp            |  596 ++++++++++++++++
 .../interfaces/RobotMemoryInterface.h_ext          |  190 ++++++
 .../interfaces/RobotMemoryInterface.tolua          |  182 +++++
 .../interfaces/RobotMemoryInterface.xml            |   39 ++
 src/plugins/robot-memory/robot_memory.cpp          |  503 ++++++++++++++
 src/plugins/robot-memory/robot_memory.h            |  142 ++++
 src/plugins/robot-memory/robot_memory_plugin.cpp   |   66 ++
 src/plugins/robot-memory/robot_memory_setup.cpp    |  245 +++++++
 src/plugins/robot-memory/robot_memory_setup.h      |   61 ++
 src/plugins/robot-memory/robot_memory_thread.cpp   |   98 +++
 src/plugins/robot-memory/robot_memory_thread.h     |   71 ++
 src/plugins/robot-memory/test-plugin/Makefile      |   46 ++
 .../robot-memory/test-plugin/robot_memory_test.cpp |  282 ++++++++
 .../robot-memory/test-plugin/robot_memory_test.h   |  117 ++++
 .../test-plugin/robot_memory_test_plugin.cpp       |   48 ++
 .../test-plugin/robot_memory_test_thread.cpp       |   67 ++
 .../test-plugin/robot_memory_test_thread.h         |   65 ++
 src/tools/gtest/Makefile                           |   48 ++
 src/tools/gtest/gtest_fawkes.cpp                   |   74 ++
 52 files changed, 5605 insertions(+), 3 deletions(-)
 create mode 100644 cfg/conf.d/robot-memory.yaml
 create mode 100644 src/plugins/clips-robot-memory/Makefile
 create mode 100644 src/plugins/clips-robot-memory/clips_rm_trigger.cpp
 create mode 100644 src/plugins/clips-robot-memory/clips_rm_trigger.h
 create mode 100644 src/plugins/clips-robot-memory/clips_robot_memory_plugin.cpp
 create mode 100644 src/plugins/clips-robot-memory/clips_robot_memory_thread.cpp
 create mode 100644 src/plugins/clips-robot-memory/clips_robot_memory_thread.h
 create mode 100644 src/plugins/clips-robot-memory/robot-memory.clp
 create mode 100644 src/plugins/pddl-robot-memory/Makefile
 create mode 100644 src/plugins/pddl-robot-memory/ctemplate.mk
 create mode 100644 src/plugins/pddl-robot-memory/interfaces/Makefile
 create mode 100644 src/plugins/pddl-robot-memory/interfaces/PddlGenInterface.xml
 create mode 100644 src/plugins/pddl-robot-memory/pddl_robot_memory_plugin.cpp
 create mode 100644 src/plugins/pddl-robot-memory/pddl_robot_memory_thread.cpp
 create mode 100644 src/plugins/pddl-robot-memory/pddl_robot_memory_thread.h
 create mode 100644 src/plugins/robot-memory/Makefile
 create mode 100644 src/plugins/robot-memory/aspect/Makefile
 create mode 100644 src/plugins/robot-memory/aspect/robot_memory_aspect.cpp
 create mode 100644 src/plugins/robot-memory/aspect/robot_memory_aspect.h
 create mode 100644 src/plugins/robot-memory/aspect/robot_memory_inifin.cpp
 create mode 100644 src/plugins/robot-memory/aspect/robot_memory_inifin.h
 create mode 100644 src/plugins/robot-memory/computable.cpp
 create mode 100644 src/plugins/robot-memory/computable.h
 create mode 100644 src/plugins/robot-memory/computables_manager.cpp
 create mode 100644 src/plugins/robot-memory/computables_manager.h
 create mode 100644 src/plugins/robot-memory/event_trigger.cpp
 create mode 100644 src/plugins/robot-memory/event_trigger.h
 create mode 100644 src/plugins/robot-memory/event_trigger_manager.cpp
 create mode 100644 src/plugins/robot-memory/event_trigger_manager.h
 create mode 100644 src/plugins/robot-memory/interfaces/Makefile
 create mode 100644 src/plugins/robot-memory/interfaces/RobotMemoryInterface.cpp
 create mode 100644 src/plugins/robot-memory/interfaces/RobotMemoryInterface.h_ext
 create mode 100644 src/plugins/robot-memory/interfaces/RobotMemoryInterface.tolua
 create mode 100644 src/plugins/robot-memory/interfaces/RobotMemoryInterface.xml
 create mode 100644 src/plugins/robot-memory/robot_memory.cpp
 create mode 100644 src/plugins/robot-memory/robot_memory.h
 create mode 100644 src/plugins/robot-memory/robot_memory_plugin.cpp
 create mode 100644 src/plugins/robot-memory/robot_memory_setup.cpp
 create mode 100644 src/plugins/robot-memory/robot_memory_setup.h
 create mode 100644 src/plugins/robot-memory/robot_memory_thread.cpp
 create mode 100644 src/plugins/robot-memory/robot_memory_thread.h
 create mode 100644 src/plugins/robot-memory/test-plugin/Makefile
 create mode 100644 src/plugins/robot-memory/test-plugin/robot_memory_test.cpp
 create mode 100644 src/plugins/robot-memory/test-plugin/robot_memory_test.h
 create mode 100644 src/plugins/robot-memory/test-plugin/robot_memory_test_plugin.cpp
 create mode 100644 src/plugins/robot-memory/test-plugin/robot_memory_test_thread.cpp
 create mode 100644 src/plugins/robot-memory/test-plugin/robot_memory_test_thread.h
 create mode 100644 src/tools/gtest/Makefile
 create mode 100644 src/tools/gtest/gtest_fawkes.cpp


- *Diffs* -------------------------------------------------------------

- *commit* c2529c2064beb684760087762afae975af1cfa57 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Thu Oct 20 16:33:40 2016 +0200
Subject: Added ASP aspect.

 src/plugins/asp/.gitignore            |    1 +
 src/plugins/asp/Makefile              |   68 +++++++++++++++++++++++++++
 src/plugins/asp/asp.config            |    2 +
 src/plugins/asp/asp.creator           |    1 +
 src/plugins/asp/asp.files             |   11 +++++
 src/plugins/asp/asp.includes          |    8 +++
 src/plugins/asp/asp_plugin.cpp        |   47 +++++++++++++++++++
 src/plugins/asp/asp_thread.cpp        |   58 +++++++++++++++++++++++
 src/plugins/asp/asp_thread.h          |   54 ++++++++++++++++++++++
 src/plugins/asp/aspect/Makefile       |   61 +++++++++++++++++++++++++
 src/plugins/asp/aspect/asp.cpp        |   81 +++++++++++++++++++++++++++++++++
 src/plugins/asp/aspect/asp.h          |   59 ++++++++++++++++++++++++
 src/plugins/asp/aspect/asp_inifin.cpp |   74 ++++++++++++++++++++++++++++++
 src/plugins/asp/aspect/asp_inifin.h   |   46 +++++++++++++++++++
 14 files changed, 571 insertions(+), 0 deletions(-)


- *commit* 08631464ada4b381dcebfd87577bf85f9bb5fee5 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Thu Oct 20 23:19:33 2016 +0200
Subject: ASP Aspect: Use Fawkes logging for Clingo.

 src/plugins/asp/asp_thread.cpp        |    1 +
 src/plugins/asp/asp_thread.h          |    2 +
 src/plugins/asp/aspect/asp_inifin.cpp |   38 ++++++++++++++++++++++++++++++--
 src/plugins/asp/aspect/asp_inifin.h   |    7 ++++++
 4 files changed, 45 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/asp_thread.cpp b/src/plugins/asp/asp_thread.cpp
index 285ece6..99b5805 100644
--- a/src/plugins/asp/asp_thread.cpp
+++ b/src/plugins/asp/asp_thread.cpp
@@ -42,6 +42,7 @@ ASPThread::ASPThread(void)
 void
 ASPThread::init(void)
 {
+	ASPIniFin.setLogger(logger);
 	return;
 }
 
diff --git a/src/plugins/asp/asp_thread.h b/src/plugins/asp/asp_thread.h
index 590d390..92ac825 100644
--- a/src/plugins/asp/asp_thread.h
+++ b/src/plugins/asp/asp_thread.h
@@ -25,6 +25,7 @@
 
 #include <aspect/aspect_provider.h>
 #include "aspect/asp_inifin.h"
+#include <aspect/logging.h>
 #include <core/threading/thread.h>
 
 namespace fawkes {
@@ -33,6 +34,7 @@ namespace fawkes {
 
 class ASPThread
 : public fawkes::Thread,
+  public fawkes::LoggingAspect,
   public fawkes::AspectProviderAspect
 {
 	private:
diff --git a/src/plugins/asp/aspect/asp_inifin.cpp b/src/plugins/asp/aspect/asp_inifin.cpp
index 0dbeb8d..2a39bf7 100644
--- a/src/plugins/asp/aspect/asp_inifin.cpp
+++ b/src/plugins/asp/aspect/asp_inifin.cpp
@@ -25,6 +25,7 @@
 #include "asp_inifin.h"
 #include <clingo.hh>
 #include <core/threading/thread_finalizer.h>
+#include <logging/logger.h>
 
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
@@ -35,10 +36,14 @@ namespace fawkes {
  * ASPAspect initializer/finalizer.
  * This initializer/finalizer will provide the ASP node handle to threads with the ASPAspect.
  * @author Björn Schäpers
+ *
+ * @property ASPAspectIniFin::Log
+ * @brief The logger used for Clingo Output.
  */
 
-/** Constructor. */
-ASPAspectIniFin::ASPAspectIniFin(void) : AspectIniFin("ASPAspect")
+/** Constructor.
+ */
+ASPAspectIniFin::ASPAspectIniFin(void) : AspectIniFin("ASPAspect"), Log(nullptr)
 {
 	return;
 }
@@ -53,7 +58,23 @@ ASPAspectIniFin::init(Thread *thread)
 		thread->name());
 	} //if ( asp_thread == nullptr )
 
-	asp_thread->init_ASPAspect(LockPtr<Clingo::Control>(new Clingo::Control));
+	auto clingoLogger = [this](const Clingo::WarningCode code, char const *msg)
+		{
+			fawkes::Logger::LogLevel level = fawkes::Logger::LL_NONE;
+			switch ( code )
+			{
+				case Clingo::WarningCode::AtomUndefined      :
+				case Clingo::WarningCode::OperationUndefined :
+				case Clingo::WarningCode::RuntimeError       : level = fawkes::Logger::LL_ERROR; break;
+				case Clingo::WarningCode::Other              :
+				case Clingo::WarningCode::VariableUnbounded  : level = fawkes::Logger::LL_WARN;
+				case Clingo::WarningCode::FileIncluded       :
+				case Clingo::WarningCode::GlobalVariable     : level = fawkes::Logger::LL_INFO; break;
+			} //switch ( code )
+			Log->log(level, "Clingo", msg);
+			return;
+		};
+	asp_thread->init_ASPAspect(LockPtr<Clingo::Control>(new Clingo::Control({}, clingoLogger, 100)));
 	return;
 }
 
@@ -71,4 +92,15 @@ ASPAspectIniFin::finalize(Thread *thread)
 	return;
 }
 
+/**
+ * @brief Sets the logger to use for Clingo messages.
+ * @param[in] logger The new logger.
+ */
+void
+ASPAspectIniFin::setLogger(Logger *logger)
+{
+	Log = logger;
+	return;
+}
+
 } // end namespace fawkes
diff --git a/src/plugins/asp/aspect/asp_inifin.h b/src/plugins/asp/aspect/asp_inifin.h
index f62ef73..d112084 100644
--- a/src/plugins/asp/aspect/asp_inifin.h
+++ b/src/plugins/asp/aspect/asp_inifin.h
@@ -32,13 +32,20 @@ namespace fawkes {
 }
 #endif
 
+class Logger;
+
 class ASPAspectIniFin : public AspectIniFin
 {
+	private:
+	Logger *Log;
+
 	public:
 	ASPAspectIniFin(void);
 
 	void init(Thread *thread) override;
 	void finalize(Thread *thread) override;
+
+	void setLogger(Logger *logger);
 };
 
 } // end namespace fawkes

- *commit* cdaf98b71ffaa206a5970a296311409ed8ef1c83 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Thu Oct 27 16:57:30 2016 +0200
Subject: ASP-Aspect: Added ClingoControlManager

 src/plugins/asp/asp.files                          |    2 +
 src/plugins/asp/aspect/clingo_control_manager.cpp  |  116 ++++++++++++++++++++
 .../asp/aspect/{asp.h => clingo_control_manager.h} |   37 +++---
 3 files changed, 136 insertions(+), 19 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/asp.files b/src/plugins/asp/asp.files
index df59585..41a8afd 100644
--- a/src/plugins/asp/asp.files
+++ b/src/plugins/asp/asp.files
@@ -7,5 +7,7 @@ asp_thread.cpp
 aspect/Makefile
 aspect/asp.h
 aspect/asp.cpp
+aspect/clingo_control_manager.h
+aspect/clingo_control_manager.cpp
 aspect/asp_inifin.h
 aspect/asp_inifin.cpp

- *commit* 33b4a657a8a63e7fd2884731b3625913db46a827 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Sat Oct 29 11:50:46 2016 +0200
Subject: ASP-Aspect: Added ClingoManagerAspect.

 src/plugins/asp/asp.files                          |    8 ++-
 .../asp/aspect/clingo_manager.cpp}                 |   44 +++++-----
 src/plugins/asp/aspect/{asp.h => clingo_manager.h} |   29 ++----
 src/plugins/asp/aspect/clingo_manager_inifin.cpp   |   91 ++++++++++++++++++++
 .../{asp_inifin.h => clingo_manager_inifin.h}      |   22 +++---
 5 files changed, 138 insertions(+), 56 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/asp.files b/src/plugins/asp/asp.files
index 41a8afd..3c8dad7 100644
--- a/src/plugins/asp/asp.files
+++ b/src/plugins/asp/asp.files
@@ -7,7 +7,11 @@ asp_thread.cpp
 aspect/Makefile
 aspect/asp.h
 aspect/asp.cpp
-aspect/clingo_control_manager.h
-aspect/clingo_control_manager.cpp
 aspect/asp_inifin.h
 aspect/asp_inifin.cpp
+aspect/clingo_control_manager.h
+aspect/clingo_control_manager.cpp
+aspect/clingo_manager.h
+aspect/clingo_manager.cpp
+aspect/clingo_manager_inifin.h
+aspect/clingo_manager_inifin.cpp

- *commit* f8396e93cd29dcf422fdffa110a2b236d3e036c2 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Sun Oct 30 13:57:12 2016 +0100
Subject: ASP-Aspect: Prepared aspect and inifin for the control manager.

 src/plugins/asp/aspect/asp.cpp        |   13 ++++++++---
 src/plugins/asp/aspect/asp.h          |    4 ++-
 src/plugins/asp/aspect/asp_inifin.cpp |   34 +++++++++++++++++++++++++++++---
 src/plugins/asp/aspect/asp_inifin.h   |    6 +++++
 4 files changed, 48 insertions(+), 9 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/aspect/asp.cpp b/src/plugins/asp/aspect/asp.cpp
index 3163f22..7650e4a 100644
--- a/src/plugins/asp/aspect/asp.cpp
+++ b/src/plugins/asp/aspect/asp.cpp
@@ -36,14 +36,19 @@ namespace fawkes {
  * @ingroup Aspects
  * @author Björn Schäpers
  *
- * @property fawkes:LockPtr<Clingo::Control> ASPAspect::ClingoControl
- * Clingo Control for exclusive usage.
+ * @property ASPAspect::ControlName
+ * @brief The name for the control in the manager.
+ *
+ * @property ASPAspect::ClingoControl
+ * @brief Clingo Control for exclusive usage.
  */
 
 
-/** Constructor.
+/**
+ * Constructor.
+ * @param[in] controlName The desired control name.
  */
-ASPAspect::ASPAspect(void)
+ASPAspect::ASPAspect(const std::string&& controlName) : ControlName(std::move(controlName))
 {
 	add_aspect("ASPAspect");
 	return;
diff --git a/src/plugins/asp/aspect/asp.h b/src/plugins/asp/aspect/asp.h
index e356fa7..72782e0 100644
--- a/src/plugins/asp/aspect/asp.h
+++ b/src/plugins/asp/aspect/asp.h
@@ -41,6 +41,8 @@ namespace fawkes {
 class ASPAspect : public virtual Aspect
 {
 	private:
+	const std::string ControlName;
+
 	void init_ASPAspect(LockPtr<Clingo::Control> clingoControl);
 	void finalize_ASPAspect();
 
@@ -48,7 +50,7 @@ class ASPAspect : public virtual Aspect
 	LockPtr<Clingo::Control> ClingoControl;
 
 	public:
-	ASPAspect(void);
+	ASPAspect(const std::string&& controlName);
 	virtual ~ASPAspect(void);
 
 	friend class ASPAspectIniFin;
diff --git a/src/plugins/asp/aspect/asp_inifin.cpp b/src/plugins/asp/aspect/asp_inifin.cpp
index 2a39bf7..c6f1887 100644
--- a/src/plugins/asp/aspect/asp_inifin.cpp
+++ b/src/plugins/asp/aspect/asp_inifin.cpp
@@ -21,33 +21,48 @@
  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
  */
 
-#include "asp.h"
-#include "asp_inifin.h"
 #include <clingo.hh>
 #include <core/threading/thread_finalizer.h>
 #include <logging/logger.h>
 
+#include "asp.h"
+#include "asp_inifin.h"
+#include "clingo_control_manager.h"
+
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
 }
 #endif
 
-/** @class ASPAspectIniFin <plugins/asp/aspect/asp_inifin.h>
+/**
+ * @class ASPAspectIniFin <plugins/asp/aspect/asp_inifin.h>
  * ASPAspect initializer/finalizer.
  * This initializer/finalizer will provide the ASP node handle to threads with the ASPAspect.
  * @author Björn Schäpers
  *
  * @property ASPAspectIniFin::Log
  * @brief The logger used for Clingo Output.
+ *
+ * @property ASPAspectIniFin::CtrlMgr
+ * @brief The control manager.
  */
 
-/** Constructor.
+/**
+ * Constructor.
  */
 ASPAspectIniFin::ASPAspectIniFin(void) : AspectIniFin("ASPAspect"), Log(nullptr)
 {
 	return;
 }
 
+/**
+ * @brief Destructor.
+ */
+ASPAspectIniFin::~ASPAspectIniFin(void)
+{
+	return;
+}
+
 void
 ASPAspectIniFin::init(Thread *thread)
 {
@@ -103,4 +118,15 @@ ASPAspectIniFin::setLogger(Logger *logger)
 	return;
 }
 
+/**
+ * @brief Sets the control manager.
+ * @param[in] ctrlMgr The new control manager.
+ */
+void
+ASPAspectIniFin::setControlManager(const LockPtr<ClingoControlManager>& ctrlMgr)
+{
+	CtrlMgr = ctrlMgr;
+	return;
+}
+
 } // end namespace fawkes
diff --git a/src/plugins/asp/aspect/asp_inifin.h b/src/plugins/asp/aspect/asp_inifin.h
index d112084..1563622 100644
--- a/src/plugins/asp/aspect/asp_inifin.h
+++ b/src/plugins/asp/aspect/asp_inifin.h
@@ -25,6 +25,8 @@
 #define __PLUGINS_ASP_ASPECT_ASP_INIFIN_H_
 
 #include <aspect/inifins/inifin.h>
+#include <core/utils/lockptr.h>
+
 #include "asp.h"
 
 namespace fawkes {
@@ -32,20 +34,24 @@ namespace fawkes {
 }
 #endif
 
+class ClingoControlManager;
 class Logger;
 
 class ASPAspectIniFin : public AspectIniFin
 {
 	private:
 	Logger *Log;
+	LockPtr<ClingoControlManager> CtrlMgr;
 
 	public:
 	ASPAspectIniFin(void);
+	~ASPAspectIniFin(void);
 
 	void init(Thread *thread) override;
 	void finalize(Thread *thread) override;
 
 	void setLogger(Logger *logger);
+	void setControlManager(const LockPtr<ClingoControlManager>& ctrlMgr);
 };
 
 } // end namespace fawkes

- *commit* 93e1ab2233d2d363a1b7de79f5e27fad62c0cb7f - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Sun Oct 30 20:52:38 2016 +0100
Subject: ASPAspect: Use the clingo control manager for the aspects.

 src/plugins/asp/asp_thread.cpp                    |   21 +++++++++++-
 src/plugins/asp/asp_thread.h                      |    8 ++++-
 src/plugins/asp/aspect/asp.cpp                    |    7 ++++-
 src/plugins/asp/aspect/asp.h                      |    3 +-
 src/plugins/asp/aspect/asp_inifin.cpp             |   34 +-------------------
 src/plugins/asp/aspect/asp_inifin.h               |    2 -
 src/plugins/asp/aspect/clingo_control_manager.cpp |   13 +++++++-
 src/plugins/asp/aspect/clingo_control_manager.h   |    4 ++-
 src/plugins/asp/aspect/clingo_manager_inifin.cpp  |    2 +-
 src/plugins/asp/aspect/clingo_manager_inifin.h    |    2 +-
 10 files changed, 51 insertions(+), 45 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/asp_thread.cpp b/src/plugins/asp/asp_thread.cpp
index 99b5805..19da8c3 100644
--- a/src/plugins/asp/asp_thread.cpp
+++ b/src/plugins/asp/asp_thread.cpp
@@ -29,12 +29,27 @@ using namespace fawkes;
  * ASP environment thread.
  *
  * @author Björn Schäpers
+ *
+ * @property ASPThread::ASPIniFin
+ * @brief The initi-/finalizer for the ASPAspect.
+ *
+ * @property ASPThread::ClingoIniFin
+ * @brief The initi-/finalizer for the ClingoManagerAspect.
+ *
+ * @property ASPThread::CtrlMgr
+ * @brief The clingo control manager.
  */
 
 /** Constructor. */
 ASPThread::ASPThread(void)
   : Thread("ASPThread", Thread::OPMODE_WAITFORWAKEUP),
-	AspectProviderAspect(std::list<fawkes::AspectIniFin*>(1, &ASPIniFin))
+	AspectProviderAspect([this](void) {
+		std::list<fawkes::AspectIniFin*> ret;
+		ret.emplace_back(&ASPIniFin);
+		ret.emplace_back(&ClingoIniFin);
+		return ret;
+	}()),
+	CtrlMgr(new ClingoControlManager)
 {
 	return;
 }
@@ -42,7 +57,9 @@ ASPThread::ASPThread(void)
 void
 ASPThread::init(void)
 {
-	ASPIniFin.setLogger(logger);
+	CtrlMgr->setLogger(logger);
+	ASPIniFin.setControlManager(CtrlMgr);
+	ClingoIniFin.setControlManager(CtrlMgr);
 	return;
 }
 
diff --git a/src/plugins/asp/asp_thread.h b/src/plugins/asp/asp_thread.h
index 92ac825..68bee30 100644
--- a/src/plugins/asp/asp_thread.h
+++ b/src/plugins/asp/asp_thread.h
@@ -24,10 +24,13 @@
 #define __PLUGINS_ASP_ASP_THREAD_H_
 
 #include <aspect/aspect_provider.h>
-#include "aspect/asp_inifin.h"
 #include <aspect/logging.h>
 #include <core/threading/thread.h>
 
+#include "aspect/asp_inifin.h"
+#include "aspect/clingo_control_manager.h"
+#include "aspect/clingo_manager_inifin.h"
+
 namespace fawkes {
 	class AspectIniFin;
 }
@@ -39,6 +42,8 @@ class ASPThread
 {
 	private:
 	fawkes::ASPAspectIniFin ASPIniFin;
+	fawkes::ClingoManagerAspectIniFin ClingoIniFin;
+	fawkes::LockPtr<fawkes::ClingoControlManager> CtrlMgr;
 
 	protected:
 	/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
@@ -50,7 +55,6 @@ class ASPThread
 	void init(void) override;
 	void loop(void) override;
 	void finalize(void) override;
-
 };
 
 #endif
diff --git a/src/plugins/asp/aspect/asp.cpp b/src/plugins/asp/aspect/asp.cpp
index 7650e4a..fcd57c8 100644
--- a/src/plugins/asp/aspect/asp.cpp
+++ b/src/plugins/asp/aspect/asp.cpp
@@ -39,6 +39,9 @@ namespace fawkes {
  * @property ASPAspect::ControlName
  * @brief The name for the control in the manager.
  *
+ * @property ASPAspect::LogComponent
+ * @brief The component for the logger.
+ *
  * @property ASPAspect::ClingoControl
  * @brief Clingo Control for exclusive usage.
  */
@@ -47,8 +50,10 @@ namespace fawkes {
 /**
  * Constructor.
  * @param[in] controlName The desired control name.
+ * @param[in] logComponent The component for the logger.
  */
-ASPAspect::ASPAspect(const std::string&& controlName) : ControlName(std::move(controlName))
+ASPAspect::ASPAspect(const std::string&& controlName, const std::string&& logComponent) :
+	ControlName(std::move(controlName)), LogComponent(std::move(logComponent))
 {
 	add_aspect("ASPAspect");
 	return;
diff --git a/src/plugins/asp/aspect/asp.h b/src/plugins/asp/aspect/asp.h
index 72782e0..b86b869 100644
--- a/src/plugins/asp/aspect/asp.h
+++ b/src/plugins/asp/aspect/asp.h
@@ -42,6 +42,7 @@ class ASPAspect : public virtual Aspect
 {
 	private:
 	const std::string ControlName;
+	const std::string LogComponent;
 
 	void init_ASPAspect(LockPtr<Clingo::Control> clingoControl);
 	void finalize_ASPAspect();
@@ -50,7 +51,7 @@ class ASPAspect : public virtual Aspect
 	LockPtr<Clingo::Control> ClingoControl;
 
 	public:
-	ASPAspect(const std::string&& controlName);
+	ASPAspect(const std::string&& controlName, const std::string&& logComponent = std::string());
 	virtual ~ASPAspect(void);
 
 	friend class ASPAspectIniFin;
diff --git a/src/plugins/asp/aspect/asp_inifin.cpp b/src/plugins/asp/aspect/asp_inifin.cpp
index c6f1887..ecd27eb 100644
--- a/src/plugins/asp/aspect/asp_inifin.cpp
+++ b/src/plugins/asp/aspect/asp_inifin.cpp
@@ -40,9 +40,6 @@ namespace fawkes {
  * This initializer/finalizer will provide the ASP node handle to threads with the ASPAspect.
  * @author Björn Schäpers
  *
- * @property ASPAspectIniFin::Log
- * @brief The logger used for Clingo Output.
- *
  * @property ASPAspectIniFin::CtrlMgr
  * @brief The control manager.
  */
@@ -50,7 +47,7 @@ namespace fawkes {
 /**
  * Constructor.
  */
-ASPAspectIniFin::ASPAspectIniFin(void) : AspectIniFin("ASPAspect"), Log(nullptr)
+ASPAspectIniFin::ASPAspectIniFin(void) : AspectIniFin("ASPAspect")
 {
 	return;
 }
@@ -73,23 +70,7 @@ ASPAspectIniFin::init(Thread *thread)
 		thread->name());
 	} //if ( asp_thread == nullptr )
 
-	auto clingoLogger = [this](const Clingo::WarningCode code, char const *msg)
-		{
-			fawkes::Logger::LogLevel level = fawkes::Logger::LL_NONE;
-			switch ( code )
-			{
-				case Clingo::WarningCode::AtomUndefined      :
-				case Clingo::WarningCode::OperationUndefined :
-				case Clingo::WarningCode::RuntimeError       : level = fawkes::Logger::LL_ERROR; break;
-				case Clingo::WarningCode::Other              :
-				case Clingo::WarningCode::VariableUnbounded  : level = fawkes::Logger::LL_WARN;
-				case Clingo::WarningCode::FileIncluded       :
-				case Clingo::WarningCode::GlobalVariable     : level = fawkes::Logger::LL_INFO; break;
-			} //switch ( code )
-			Log->log(level, "Clingo", msg);
-			return;
-		};
-	asp_thread->init_ASPAspect(LockPtr<Clingo::Control>(new Clingo::Control({}, clingoLogger, 100)));
+	asp_thread->init_ASPAspect(CtrlMgr->create_control(asp_thread->ControlName, asp_thread->LogComponent));
 	return;
 }
 
@@ -108,17 +89,6 @@ ASPAspectIniFin::finalize(Thread *thread)
 }
 
 /**
- * @brief Sets the logger to use for Clingo messages.
- * @param[in] logger The new logger.
- */
-void
-ASPAspectIniFin::setLogger(Logger *logger)
-{
-	Log = logger;
-	return;
-}
-
-/**
  * @brief Sets the control manager.
  * @param[in] ctrlMgr The new control manager.
  */
diff --git a/src/plugins/asp/aspect/asp_inifin.h b/src/plugins/asp/aspect/asp_inifin.h
index 1563622..141ffb9 100644
--- a/src/plugins/asp/aspect/asp_inifin.h
+++ b/src/plugins/asp/aspect/asp_inifin.h
@@ -40,7 +40,6 @@ class Logger;
 class ASPAspectIniFin : public AspectIniFin
 {
 	private:
-	Logger *Log;
 	LockPtr<ClingoControlManager> CtrlMgr;
 
 	public:
@@ -50,7 +49,6 @@ class ASPAspectIniFin : public AspectIniFin
 	void init(Thread *thread) override;
 	void finalize(Thread *thread) override;
 
-	void setLogger(Logger *logger);
 	void setControlManager(const LockPtr<ClingoControlManager>& ctrlMgr);
 };
 
diff --git a/src/plugins/asp/aspect/clingo_control_manager.cpp b/src/plugins/asp/aspect/clingo_control_manager.cpp
index b508ef7..6019d76 100644
--- a/src/plugins/asp/aspect/clingo_control_manager.cpp
+++ b/src/plugins/asp/aspect/clingo_control_manager.cpp
@@ -39,9 +39,8 @@ namespace fawkes {
 
 /**
  * Constructor.
- * @param[in] logger The logger for the controls.
  */
-ClingoControlManager::ClingoControlManager(Logger *logger) : Log(logger)
+ClingoControlManager::ClingoControlManager(void) : Log(nullptr)
 {
 	return;
 }
@@ -53,6 +52,16 @@ ClingoControlManager::~ClingoControlManager(void)
 }
 
 /**
+ * @brief Sets the logger for all Clingo Controls.
+ * @param[in] logger The logger.
+ */
+void ClingoControlManager::setLogger(Logger *logger)
+{
+	Log = logger;
+	return;
+}
+
+/**
  * Create a new control. The control is registered internally under the specified name.
  * It must be destroyed when done with it. Only a single control can be created for a particular control name.
  * @param[in] ctrl_name The Name by which to register the control.
diff --git a/src/plugins/asp/aspect/clingo_control_manager.h b/src/plugins/asp/aspect/clingo_control_manager.h
index 41a5406..be16d12 100644
--- a/src/plugins/asp/aspect/clingo_control_manager.h
+++ b/src/plugins/asp/aspect/clingo_control_manager.h
@@ -44,9 +44,11 @@ class ClingoControlManager
 	std::unordered_map<std::string, LockPtr<Clingo::Control>> Controls;
 
 	public:
-	ClingoControlManager(Logger *logger);
+	ClingoControlManager(void);
 	virtual ~ClingoControlManager(void);
 
+	void setLogger(Logger *logger);
+
 	LockPtr<Clingo::Control> create_control(const std::string& ctrl_name, const std::string& log_component_name);
 	void destroy_control(const std::string& ctrl_name);
 
diff --git a/src/plugins/asp/aspect/clingo_manager_inifin.cpp b/src/plugins/asp/aspect/clingo_manager_inifin.cpp
index 6478dd7..391167c 100644
--- a/src/plugins/asp/aspect/clingo_manager_inifin.cpp
+++ b/src/plugins/asp/aspect/clingo_manager_inifin.cpp
@@ -82,7 +82,7 @@ ClingoManagerAspectIniFin::finalize(Thread *thread)
  * @param[in] clingoCtrlMgr Clingo control manager
  */
 void
-ClingoManagerAspectIniFin::set_manager(LockPtr<ClingoControlManager>& clingoCtrlMgr)
+ClingoManagerAspectIniFin::setControlManager(LockPtr<ClingoControlManager>& clingoCtrlMgr)
 {
 	ClingoCtrlMgr = clingoCtrlMgr;
 	return;
diff --git a/src/plugins/asp/aspect/clingo_manager_inifin.h b/src/plugins/asp/aspect/clingo_manager_inifin.h
index a33cc52..a142d88 100644
--- a/src/plugins/asp/aspect/clingo_manager_inifin.h
+++ b/src/plugins/asp/aspect/clingo_manager_inifin.h
@@ -45,7 +45,7 @@ class ClingoManagerAspectIniFin : public AspectIniFin
 	void init(Thread *thread) override;
 	void finalize(Thread *thread) override;
 
-	void set_manager(LockPtr<ClingoControlManager>& clingoCtrlMgr);
+	void setControlManager(LockPtr<ClingoControlManager>& clingoCtrlMgr);
 };
 
 } // end namespace fawkes

- *commit* 026a3c991b6b3c03c3f52323b1e4806eef871c73 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Mon Oct 31 16:26:27 2016 +0100
Subject: ASP-Aspect: Added access wrapper class.

 src/plugins/asp/Makefile                          |   12 +-
 src/plugins/asp/asp.files                         |    2 +
 src/plugins/asp/aspect/Makefile                   |   10 +-
 src/plugins/asp/aspect/asp.cpp                    |   12 +-
 src/plugins/asp/aspect/asp.h                      |   12 +-
 src/plugins/asp/aspect/asp_inifin.cpp             |    2 +-
 src/plugins/asp/aspect/clingo_access.cpp          |  356 +++++++++++++++++++++
 src/plugins/asp/aspect/clingo_access.h            |   82 +++++
 src/plugins/asp/aspect/clingo_control_manager.cpp |   29 +--
 src/plugins/asp/aspect/clingo_control_manager.h   |   11 +-
 10 files changed, 473 insertions(+), 55 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/Makefile b/src/plugins/asp/Makefile
index d1b8a48..9df80ff 100644
--- a/src/plugins/asp/Makefile
+++ b/src/plugins/asp/Makefile
@@ -41,14 +41,14 @@ ifeq ($(HAVE_CPP11),1)
   ifeq ($(HAVE_CLINGO),1)
     PRESUBDIRS += aspect
 
-	CFLAGS  += $(CFLAGS_CLINGO) $(CFLAGS_CPP11)
-	LDFLAGS += $(LDFLAGS_CLINGO) $(LDFLAGS_CPP11)
+    CFLAGS  += $(CFLAGS_CLINGO) $(CFLAGS_CPP11)
+    LDFLAGS += $(LDFLAGS_CLINGO) $(LDFLAGS_CPP11)
 
-	PLUGINS_all = $(PLUGINDIR)/asp.so
+    PLUGINS_all = $(PLUGINDIR)/asp.so
 
-	INSTALL_extra = asp_files
-else
-	WARN_TARGETS += warning_clingo
+    INSTALL_extra = asp_files
+  else
+    WARN_TARGETS += warning_clingo
   endif
 else
   WARN_TARGETS += warning_cpp11
diff --git a/src/plugins/asp/asp.files b/src/plugins/asp/asp.files
index 3c8dad7..3ed9f3c 100644
--- a/src/plugins/asp/asp.files
+++ b/src/plugins/asp/asp.files
@@ -9,6 +9,8 @@ aspect/asp.h
 aspect/asp.cpp
 aspect/asp_inifin.h
 aspect/asp_inifin.cpp
+aspect/clingo_access.h
+aspect/clingo_access.cpp
 aspect/clingo_control_manager.h
 aspect/clingo_control_manager.cpp
 aspect/clingo_manager.h
diff --git a/src/plugins/asp/aspect/Makefile b/src/plugins/asp/aspect/Makefile
index 5c66c4e..9a43079 100644
--- a/src/plugins/asp/aspect/Makefile
+++ b/src/plugins/asp/aspect/Makefile
@@ -36,12 +36,12 @@ LDFLAGS_CLINGO = -L$(HOME)/clingo/build/debug/ -Wl,-rpath=$(HOME)/clingo/build/d
 
 ifeq ($(HAVE_CPP11),1)
   ifeq ($(HAVE_CLINGO),1)
-	CFLAGS  += $(CFLAGS_CLINGO) $(CFLAGS_CPP11)
-	LDFLAGS += $(LDFLAGS_CLINGO) $(LDFLAGS_CPP11)
+    CFLAGS  += $(CFLAGS_CLINGO) $(CFLAGS_CPP11)
+    LDFLAGS += $(LDFLAGS_CLINGO) $(LDFLAGS_CPP11)
 
-	LIBS_all = $(LIBDIR)/libfawkesaspaspect.so
-else
-	WARN_TARGETS += warning_clingo
+    LIBS_all = $(LIBDIR)/libfawkesaspaspect.so
+  else
+    WARN_TARGETS += warning_clingo
   endif
 else
   WARN_TARGETS += warning_cpp11
diff --git a/src/plugins/asp/aspect/asp.cpp b/src/plugins/asp/aspect/asp.cpp
index fcd57c8..5aee875 100644
--- a/src/plugins/asp/aspect/asp.cpp
+++ b/src/plugins/asp/aspect/asp.cpp
@@ -22,7 +22,7 @@
  */
 
 #include "asp.h"
-#include <clingo.hh>
+#include "clingo_access.h"
 
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
@@ -69,12 +69,12 @@ ASPAspect::~ASPAspect(void)
 /** Init ASP aspect.
  * This sets the Clingo Control.
  * It is guaranteed that this is called for an ASP Thread before start is called (when running regularly inside Fawkes).
- * @param control The Clingo Control
+ * @param[in] clingo The Clingo Control.
  */
 void
-ASPAspect::init_ASPAspect(LockPtr<Clingo::Control> control)
+ASPAspect::init_ASPAspect(const LockPtr<ClingoAccess>& clingo)
 {
-	ClingoControl = control;
+	Clingo = clingo;
 	return;
 }
 
@@ -82,9 +82,9 @@ ASPAspect::init_ASPAspect(LockPtr<Clingo::Control> control)
  * This clears the Clingo Control.
  */
 void
-ASPAspect::finalize_ASPAspect()
+ASPAspect::finalize_ASPAspect(void)
 {
-	ClingoControl.clear();
+	Clingo.clear();
 	return;
 }
 
diff --git a/src/plugins/asp/aspect/asp.h b/src/plugins/asp/aspect/asp.h
index b86b869..e749f8a 100644
--- a/src/plugins/asp/aspect/asp.h
+++ b/src/plugins/asp/aspect/asp.h
@@ -29,26 +29,24 @@
 
 #include <string>
 
-namespace Clingo {
-  class Control;
-}
-
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
 }
 #endif
 
+class ClingoAccess;
+
 class ASPAspect : public virtual Aspect
 {
 	private:
 	const std::string ControlName;
 	const std::string LogComponent;
 
-	void init_ASPAspect(LockPtr<Clingo::Control> clingoControl);
-	void finalize_ASPAspect();
+	void init_ASPAspect(const LockPtr<ClingoAccess>& clingo);
+	void finalize_ASPAspect(void);
 
 	protected:
-	LockPtr<Clingo::Control> ClingoControl;
+	LockPtr<ClingoAccess> Clingo;
 
 	public:
 	ASPAspect(const std::string&& controlName, const std::string&& logComponent = std::string());
diff --git a/src/plugins/asp/aspect/asp_inifin.cpp b/src/plugins/asp/aspect/asp_inifin.cpp
index ecd27eb..a4f48d7 100644
--- a/src/plugins/asp/aspect/asp_inifin.cpp
+++ b/src/plugins/asp/aspect/asp_inifin.cpp
@@ -21,12 +21,12 @@
  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
  */
 
-#include <clingo.hh>
 #include <core/threading/thread_finalizer.h>
 #include <logging/logger.h>
 
 #include "asp.h"
 #include "asp_inifin.h"
+#include "clingo_access.h"
 #include "clingo_control_manager.h"
 
 namespace fawkes {
diff --git a/src/plugins/asp/aspect/clingo_control_manager.cpp b/src/plugins/asp/aspect/clingo_control_manager.cpp
index 6019d76..865c872 100644
--- a/src/plugins/asp/aspect/clingo_control_manager.cpp
+++ b/src/plugins/asp/aspect/clingo_control_manager.cpp
@@ -19,13 +19,12 @@
  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
  */
 
+#include "clingo_access.h"
 #include "clingo_control_manager.h"
 
 #include <core/exception.h>
 #include <logging/logger.h>
 
-#include <clingo.hh>
-
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
 }
@@ -68,31 +67,16 @@ void ClingoControlManager::setLogger(Logger *logger)
  * @param[in] log_component_name The Prefix for log entries. If empty it will be set to "Clingo".
  * @return A new plain Clingo Control.
  */
-LockPtr<Clingo::Control>
-ClingoControlManager::create_control(const std::string& ctrl_name, const std::string& log_component_name)
+LockPtr<ClingoAccess> ClingoControlManager::create_control(const std::string& ctrl_name,
+		const std::string& log_component_name)
 {
 	if ( Controls.count(ctrl_name) != 0 )
 	{
 		throw Exception("Clingo Control '%s' already exists!", ctrl_name.c_str());
 	} //if ( Controls.count(ctrl_name) != 0 )
 
-	auto clingoLogger = [this,log_component_name](const Clingo::WarningCode code, char const *msg)
-		{
-			fawkes::Logger::LogLevel level = fawkes::Logger::LL_NONE;
-			switch ( code )
-			{
-				case Clingo::WarningCode::AtomUndefined      :
-				case Clingo::WarningCode::OperationUndefined :
-				case Clingo::WarningCode::RuntimeError       : level = fawkes::Logger::LL_ERROR; break;
-				case Clingo::WarningCode::Other              :
-				case Clingo::WarningCode::VariableUnbounded  : level = fawkes::Logger::LL_WARN;
-				case Clingo::WarningCode::FileIncluded       :
-				case Clingo::WarningCode::GlobalVariable     : level = fawkes::Logger::LL_INFO; break;
-			} //switch ( code )
-			Log->log(level, log_component_name.empty() ? "Clingo" : log_component_name.c_str(), msg);
-			return;
-		};
-	LockPtr<Clingo::Control> ctrl(new Clingo::Control({}, clingoLogger, 100));
+	Clingo::SymbolSpan s;
+	LockPtr<ClingoAccess> ctrl(new ClingoAccess(Log, log_component_name));
 
 	Controls.emplace(ctrl_name, ctrl);
 
@@ -111,12 +95,11 @@ ClingoControlManager::destroy_control(const std::string& ctrl_name)
 	return;
 }
 
-
 /**
  * Get map of controls.
  * @return The map from control name to control lock ptr.
  */
-const std::unordered_map<std::string, LockPtr<Clingo::Control>>&
+const std::unordered_map<std::string, LockPtr<ClingoAccess>>&
 ClingoControlManager::controls(void) const
 {
 	return Controls;
diff --git a/src/plugins/asp/aspect/clingo_control_manager.h b/src/plugins/asp/aspect/clingo_control_manager.h
index be16d12..fdc7cf4 100644
--- a/src/plugins/asp/aspect/clingo_control_manager.h
+++ b/src/plugins/asp/aspect/clingo_control_manager.h
@@ -26,22 +26,19 @@
 
 #include <unordered_map>
 
-namespace Clingo {
-	class Control;
-}
-
 namespace fawkes {
 #if 0 /* just to make Emacs auto-indent happy */
 }
 #endif
 
+class ClingoAccess;
 class Logger;
 
 class ClingoControlManager
 {
 	private:
 	Logger *Log;
-	std::unordered_map<std::string, LockPtr<Clingo::Control>> Controls;
+	std::unordered_map<std::string, LockPtr<ClingoAccess>> Controls;
 
 	public:
 	ClingoControlManager(void);
@@ -49,10 +46,10 @@ class ClingoControlManager
 
 	void setLogger(Logger *logger);
 
-	LockPtr<Clingo::Control> create_control(const std::string& ctrl_name, const std::string& log_component_name);
+	LockPtr<ClingoAccess> create_control(const std::string& ctrl_name, const std::string& log_component_name);
 	void destroy_control(const std::string& ctrl_name);
 
-	const std::unordered_map<std::string, LockPtr<Clingo::Control>>& controls(void) const;
+	const std::unordered_map<std::string, LockPtr<ClingoAccess>>& controls(void) const;
 };
 
 } // end namespace fawkes

- *commit* 83afebd42bbb6fcc0d6bc78e976d771a6f9692f9 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Mon Oct 31 16:44:19 2016 +0100
Subject: ASP-Aspect: Use a different name for the member.

 src/plugins/asp/aspect/asp.cpp |    6 +++---
 src/plugins/asp/aspect/asp.h   |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/aspect/asp.cpp b/src/plugins/asp/aspect/asp.cpp
index 5aee875..5b53228 100644
--- a/src/plugins/asp/aspect/asp.cpp
+++ b/src/plugins/asp/aspect/asp.cpp
@@ -42,7 +42,7 @@ namespace fawkes {
  * @property ASPAspect::LogComponent
  * @brief The component for the logger.
  *
- * @property ASPAspect::ClingoControl
+ * @property ASPAspect::ClingoAcc
  * @brief Clingo Control for exclusive usage.
  */
 
@@ -74,7 +74,7 @@ ASPAspect::~ASPAspect(void)
 void
 ASPAspect::init_ASPAspect(const LockPtr<ClingoAccess>& clingo)
 {
-	Clingo = clingo;
+	ClingoAcc = clingo;
 	return;
 }
 
@@ -84,7 +84,7 @@ ASPAspect::init_ASPAspect(const LockPtr<ClingoAccess>& clingo)
 void
 ASPAspect::finalize_ASPAspect(void)
 {
-	Clingo.clear();
+	ClingoAcc.clear();
 	return;
 }
 
diff --git a/src/plugins/asp/aspect/asp.h b/src/plugins/asp/aspect/asp.h
index e749f8a..c9885d1 100644
--- a/src/plugins/asp/aspect/asp.h
+++ b/src/plugins/asp/aspect/asp.h
@@ -46,7 +46,7 @@ class ASPAspect : public virtual Aspect
 	void finalize_ASPAspect(void);
 
 	protected:
-	LockPtr<ClingoAccess> Clingo;
+	LockPtr<ClingoAccess> ClingoAcc;
 
 	public:
 	ASPAspect(const std::string&& controlName, const std::string&& logComponent = std::string());

- *commit* 36920462f64b4f5aae158ce8f0b2fa9ccac69944 - - - - - - - - - -
Author:  Bjoern Schaepers <bjoern.schaepers at rwth-aachen.de>
Date:    Mon Oct 31 17:04:05 2016 +0100
Subject: ASP-Aspect: Added external handling.

 src/plugins/asp/aspect/clingo_access.cpp |   55 ++++++++++++++++++++++++++++++
 src/plugins/asp/aspect/clingo_access.h   |    3 ++
 2 files changed, 58 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/asp/aspect/clingo_access.cpp b/src/plugins/asp/aspect/clingo_access.cpp
index 5d7b822..fd4a60e 100644
--- a/src/plugins/asp/aspect/clingo_access.cpp
+++ b/src/plugins/asp/aspect/clingo_access.cpp
@@ -353,4 +353,59 @@ ClingoAccess::ground(const Clingo::PartSpan& parts)
 	return true;
 }
 
+/**
+ * @brief Assigns an external value.
+ * @param[in] atom The atom to assign.
+ * @param[in] value The assigned value.
+ * @return If it could be assigned.
+ */
+bool
+ClingoAccess::assign_external(const Clingo::Symbol atom, const Clingo::TruthValue value)
+{
+	MutexLocker locker(&ControlMutex);
+	if ( Solving )
+	{
+		return false;
+	} //if ( Solving )
+
+	if ( Debug )
+	{
+		Log->log_info(LogComponent.c_str(), "Assigning %s to %s.", [value](void)
+			{
+				const char *ret = "Unknown Value";
+				switch ( value )
+				{
+					case Clingo::TruthValue::Free  : ret = "Free";  break;
+					case Clingo::TruthValue::True  : ret = "True";  break;
+					case Clingo::TruthValue::False : ret = "False"; break;
+				} //switch ( value )
+				return ret;
+			}, atom.string());
+	} //if ( Debug )
+	Control.assign_external(atom, value);
+	return true;
+}
+
+/**
+ * @brief Releases an external value.
+ * @param[in] atom The atom to release.
+ * @return If it could be released.
+ */
+bool
+ClingoAccess::release_external(const Clingo::Symbol atom)
+{
+	MutexLocker locker(&ControlMutex);
+	if ( Solving )
+	{
+		return false;
+	} //if ( Solving )
+
+	if ( Debug )
+	{
+		Log->log_info(LogComponent.c_str(), "Releasing %s.", atom.string());
+	} //if ( Debug )
+	Control.release_external(atom);
+	return true;
+}
+
 } // end namespace fawkes
diff --git a/src/plugins/asp/aspect/clingo_access.h b/src/plugins/asp/aspect/clingo_access.h
index 6f6ed18..ebeb189 100644
--- a/src/plugins/asp/aspect/clingo_access.h
+++ b/src/plugins/asp/aspect/clingo_access.h
@@ -75,6 +75,9 @@ class ClingoAccess
 	bool loadFile(const std::string& path);
 
 	bool ground(const Clingo::PartSpan& parts);
+
+	bool assign_external(const Clingo::Symbol atom, const Clingo::TruthValue value);
+	bool release_external(const Clingo::Symbol atom);
 };
 
 } // end namespace fawkes




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list