opencog / asmoses

MOSES Machine Learning: Meta-Optimizing Semantic Evolutionary Search for the AtomSpace (https://github.com/opencog/atomspace)
https://wiki.opencog.org/w/Meta-Optimizing_Semantic_Evolutionary_Search
Other
39 stars 31 forks source link

Add oc_to_string to help debugging #7

Closed ngeiswei closed 6 years ago

ngeiswei commented 6 years ago

oc_to_string is defined in the atomspace and opencog repositories to pretty print OpenCog C++ data structures like Handle in a way that is easy to call withing a debugger like gdb. See for instance https://github.com/opencog/atomspace/blob/master/opencog/atoms/base/Handle.h#L278

It would be convenient if oc_to_string was overloaded for MOSES data structures as well.

ngeiswei commented 6 years ago

Overloading oc_to_string for combo_tree and vertex would be a good start.

ngeiswei commented 6 years ago

PR #9 overloads oc_to_string for combo_tree and vertex. However I let that issue open as it could be overloaded for more C++ structures such as CTable and many more.

ngeiswei commented 6 years ago

oc_to_string now needs to take an indent argument in order to be callable by poc, see https://github.com/opencog/atomspace/pull/1785