-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from opencog/move-types
Move URE types from atomspace to URE
- Loading branch information
Showing
12 changed files
with
122 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
; | ||
; OpenCog Unified Rule Engine module | ||
; | ||
(define-module (opencog ure)) | ||
(define-module (opencog ure) | ||
#:use-module (opencog) | ||
#:use-module (opencog ure-config) | ||
) | ||
|
||
(use-modules (opencog ure-config)) | ||
(use-modules (opencog logger)) | ||
(load-extension (string-append opencog-ext-path-ure "libure") "opencog_ure_init") | ||
(load-extension | ||
(string-append opencog-ext-path-ure-types "libure-types") | ||
"ure_types_init") | ||
|
||
(load-extension | ||
(string-append opencog-ext-path-ure "libure") | ||
"opencog_ure_init") | ||
|
||
(include-from-path "opencog/ure/types/ure_types.scm") | ||
(load-from-path "opencog/ure/ure-utils.scm") | ||
(export-ure-utils) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
INSTALL (FILES | ||
BackwardChainer.h | ||
TraceRecorder.h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
OPENCOG_ADD_ATOM_TYPES(atom_types.script | ||
atom_types.h | ||
atom_types.definitions | ||
atom_types.inheritance | ||
ure_types.scm | ||
ure_types.pyx | ||
) | ||
ADD_CUSTOM_TARGET(ure_atom_types DEPENDS atom_types.h) | ||
|
||
# The atom_types.h file is written to the build directory | ||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) | ||
|
||
ADD_LIBRARY (ure-types SHARED | ||
atom_types_init | ||
) | ||
|
||
# Without this, parallel make will race and crap up the generated files. | ||
ADD_DEPENDENCIES(ure-types ure_atom_types) | ||
|
||
TARGET_LINK_LIBRARIES(ure-types | ||
${ATOMSPACE_atomtypes_LIBRARY} | ||
) | ||
|
||
INSTALL (TARGETS ure-types | ||
LIBRARY DESTINATION "lib${LIB_DIR_SUFFIX}/opencog" | ||
) | ||
|
||
ADD_GUILE_EXTENSION(SCM_CONFIG ure-types "opencog-ext-path-ure-types") | ||
|
||
INSTALL (FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/atom_types.h | ||
${CMAKE_CURRENT_BINARY_DIR}/atom_names.h | ||
DESTINATION "include/opencog/ure/types" | ||
) | ||
|
||
INSTALL (FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/ure_types.scm | ||
DESTINATION "${GUILE_SITE_DIR}/opencog/ure/types" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Assorted URE link types. These are specific to the theory of URE | ||
// and the rules it defines for knowledge representation and reasoning. | ||
// See the book on PLN by Goertzel etal. to understand what these are | ||
// all about. | ||
|
||
// ImplicationScopeLink is a synonym for RuleLink, as far as I can tell. | ||
// It is used by PLN to do more or less the same thing as RuleLink. | ||
// Except that BackwardChainerUTest hangs when it inherits from | ||
// RuleLink, because RuleLink::execute() does something that URE isn't | ||
// expecting. XXX FIXME. | ||
IMPLICATION_SCOPE_LINK <- RULE_LINK | ||
// IMPLICATION_SCOPE_LINK <- SCOPE_LINK | ||
|
||
// Mystery link used by URE in it's unit tests. It is not documented | ||
// anywhere that I know of. | ||
ATTRACTION_LINK <- ORDERED_LINK | ||
|
||
// Used in the URE unit tests. | ||
INTENSIONAL_INHERITANCE_LINK <- INHERITANCE_LINK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* opencog/ure/types/atom_types_init.cc | ||
* | ||
* Copyright (C) 2014 Eddie Monroe | ||
* All Rights Reserved | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License v3 as | ||
* published by the Free Software Foundation and including the exceptions | ||
* at http://opencog.org/wiki/Licenses | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program; if not, write to: | ||
* Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
#include "opencog/ure/types/atom_types.definitions" | ||
|
||
#define INHERITANCE_FILE "opencog/ure/types/atom_types.inheritance" | ||
#define INITNAME ure_types_init | ||
|
||
#include <opencog/atoms/atom_types/atom_types.cc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters