Skip to content

Commit

Permalink
Get rid os the crsip-logic api
Browse files Browse the repository at this point in the history
  • Loading branch information
linas committed Apr 15, 2015
1 parent aadeaa6 commit bb11716
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 33 deletions.
3 changes: 0 additions & 3 deletions opencog/cython/opencog/bindlink.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ cdef extern from "opencog/query/BindLink.h" namespace "opencog":
# C++:
# Handle bindlink(AtomSpace*, Handle);
# Handle single_bindlink (AtomSpace*, Handle);
# Handle crisp_logic_bindlink(AtomSpace*, Handle);
# Handle pln_bindlink(AtomSpace*, Handle);
# TruthValuePtr satisfaction_link(AtomSpace*, Handle);
#
cdef cHandle c_bindlink "bindlink" (cAtomSpace*, cHandle)
cdef cHandle c_single_bindlink "single_bindlink" (cAtomSpace*, cHandle)
cdef cHandle c_crisp_logic_bindlink "crisp_logic_bindlink" (cAtomSpace*,
cHandle)
cdef cHandle c_pln_bindlink "pln_bindlink" (cAtomSpace*, cHandle)
cdef tv_ptr c_satisfaction_link "satisfaction_link" (cAtomSpace*, cHandle)

Expand Down
6 changes: 0 additions & 6 deletions opencog/cython/opencog/bindlink.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ def single_bindlink(AtomSpace atomspace, Handle handle):
cdef Handle result = Handle(c_result.value())
return result

def crisp_logic_bindlink(AtomSpace atomspace, Handle handle):
cdef cHandle c_result = c_crisp_logic_bindlink(atomspace.atomspace,
deref(handle.h))
cdef Handle result = Handle(c_result.value())
return result

def pln_bindlink(AtomSpace atomspace, Handle handle):
cdef cHandle c_result = c_pln_bindlink(atomspace.atomspace, deref(handle.h))
cdef Handle result = Handle(c_result.value())
Expand Down
1 change: 0 additions & 1 deletion opencog/query/BindLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class AtomSpace;

Handle bindlink(AtomSpace*, const Handle&);
Handle single_bindlink (AtomSpace*, const Handle&);
Handle crisp_logic_bindlink(AtomSpace*, const Handle&);
Handle pln_bindlink(AtomSpace*, const Handle&);
TruthValuePtr satisfaction_link(AtomSpace*, const Handle&);

Expand Down
3 changes: 1 addition & 2 deletions tests/cython/bindlink/bindlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from opencog.atomspace import AtomSpace, TruthValue, Atom, Handle, types
from opencog.bindlink import stub_bindlink, bindlink, single_bindlink,\
crisp_logic_bindlink, pln_bindlink,\
execute_atom, evaluate_atom
pln_bindlink, execute_atom, evaluate_atom
from opencog.utilities import initialize_opencog, finalize_opencog
from opencog.type_constructors import *

Expand Down
22 changes: 1 addition & 21 deletions tests/cython/bindlink/test_bindlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from opencog.atomspace import AtomSpace, TruthValue, Atom, Handle, types
from opencog.bindlink import stub_bindlink, bindlink, single_bindlink,\
crisp_logic_bindlink, pln_bindlink,\
execute_atom, evaluate_atom
pln_bindlink, execute_atom, evaluate_atom
from opencog.utilities import initialize_opencog, finalize_opencog
from opencog.type_constructors import *

Expand Down Expand Up @@ -108,25 +107,6 @@ def test_single_bindlink(self):
self.assertEquals(atom.type, types.SetLink)


def test_crisp_logic_bindlink(self):

# Remember the starting atomspace size.
starting_size = self.atomspace.size()

# Run bindlink.
result = crisp_logic_bindlink(self.atomspace, self.bindlink_handle)
self.assertTrue(result is not None and result.value() > 0)

# Check the ending atomspace size, it should have added one SetLink.
ending_size = self.atomspace.size()
self.assertEquals(ending_size, starting_size + 1)

# The SetLink should have three items in it.
atom = self.atomspace[result]
self.assertEquals(atom.arity, 3)
self.assertEquals(atom.type, types.SetLink)


def test_pln_bindlink(self):

# Remember the starting atomspace size.
Expand Down

0 comments on commit bb11716

Please sign in to comment.