Skip to content

Commit

Permalink
Merge pull request opencog#18 from vsbogd/merge-opencog-to-singnet
Browse files Browse the repository at this point in the history
Merge opencog -> singnet
  • Loading branch information
vsbogd authored Jun 16, 2020
2 parents 0a9cc53 + eb83d83 commit 9420fa4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
13 changes: 10 additions & 3 deletions opencog/unify/Unify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,15 +493,22 @@ Handle Unify::substitute_vardecl(const Handle& vardecl,
return createLink(std::move(oset), t);
}


// Return true iff the given handle is not in the given atomspace (if
// any).
static bool not_in_atomspace(const Handle& handle, const AtomSpace* atomspace)
{
return nullptr != atomspace
and nullptr == atomspace->get_atom(handle);
}

// Is a clause constant, relative to some atomspace?
// Why would it matter whether or not it is in some atomspace?
// Return true iff the given clause is constant and is not in the
// given atomspace. A set of variables is provided to make the
// distinction between variables and variable interpreted as constants
// (they are constants is not in vars). Checking the present of the
// clause in the atomspace matters because we don't want to trigger a
// rule that will produce a term conditioned on the presence of a
// clause that was actually not in the atomspace (that would have been
// turned into a constant due to partial instantiation of a rule).
static bool not_constant(const HandleSet& vars,
const Handle& clause,
const AtomSpace* as)
Expand Down
2 changes: 1 addition & 1 deletion opencog/ure/backwardchainer/BIT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <opencog/util/algorithm.h>
#include <opencog/atoms/core/FindUtils.h>
#include <opencog/atoms/core/TypeUtils.h>
#include <opencog/atoms/execution/LibraryManager.h>
#include <opencog/atoms/grounded/LibraryManager.h>
#include <opencog/atoms/pattern/PatternUtils.h>

#include "BIT.h"
Expand Down
2 changes: 1 addition & 1 deletion opencog/ure/backwardchainer/ControlPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <opencog/util/random.h>
#include <opencog/util/algorithm.h>
#include <opencog/unify/Unify.h>
#include <opencog/atoms/execution/MapLink.h>
#include <opencog/atoms/core/MapLink.h>

#include "../MixtureModel.h"
#include "../ActionSelection.h"
Expand Down
13 changes: 0 additions & 13 deletions tests/ure/backwardchainer/BITUTest.cxxtest
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,6 @@ void BITUTest::test_expand_1()
" (VariableSet"
" )"
" (AndLink"
" (PresentLink"
" (TypedVariableLink"
" (VariableNode \"$X\")"
" (TypeNode \"ConceptNode\")"
" )"
" (EvaluationLink"
" (PredicateNode \"contain\")"
" (ListLink"
" (ConceptNode \"treatment-1\")"
" (ConceptNode \"compound-A\")"
" )"
" )"
" )"
" (NotLink"
" (IdenticalLink"
" (LambdaLink"
Expand Down
2 changes: 1 addition & 1 deletion tests/ure/backwardchainer/GradientUTest.cxxtest
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <opencog/util/mt19937ar.h>

#include <opencog/atomspace/AtomSpace.h>
#include <opencog/atoms/execution/LibraryManager.h>
#include <opencog/atoms/grounded/LibraryManager.h>
#include <opencog/atoms/truthvalue/SimpleTruthValue.h>
#include <opencog/ure/backwardchainer/BackwardChainer.h>
#include <opencog/ure/URELogger.h>
Expand Down

0 comments on commit 9420fa4

Please sign in to comment.