How to interpret guile error message - trying to use guile for the first time

52 views
Skip to first unread message

Alex

unread,
Mar 1, 2017, 4:27:25 PM3/1/17
to opencog
Hi!

I am following http://wiki.opencog.org/w/Getting_Started_with_Atoms_and_the_Scheme_Shell and I am trying to run guile (I have already compiled all the necessary components and I have started cogserver). I have made .guile file with the suggested content:
(use-modules (ice-9 readline)) (activate-readline)
(add-to-load-path "/usr/local/share/opencog/scm")
(add-to-load-path ".")
(use-modules (opencog))
(use-modules (opencog query))
(use-modules (opencog exec))

But upon starting guile I am receiving:

Backtrace:
In ice-9/boot-9.scm:
 157: 6 [catch #t #<catch-closure 55bcf1122a60> ...]
In unknown file:
   ?: 5 [apply-smob/1 #<catch-closure 55bcf1122a60>]
In ice-9/boot-9.scm:
  63: 4 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 3 [eval # #]
In unknown file:
   ?: 2 [primitive-load "/home/osboxes/.guile"]
In ice-9/eval.scm:
 393: 1 [eval #<memoized e-modules> ()]
In unknown file:
   ?: 0 [memoize-variable-access! #<memoized e-modules> #<directory # 55bcf1113c60>]

ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: e-modules


What to do next? 

OK, I know that I should debug code and find the error in my input files, configuration files of the software itself (I can do this and am ready to do this in future), but I am trying to set up my knowledge base ASAP and maybe some have already experienced something like this?

Alex

unread,
Mar 2, 2017, 4:24:41 PM3/2/17
to opencog
OK, I can execute 'telnet localhost 17001' and 'scm' and enter into remote guile shell and then I can succesfully execute initialization:
(use-modules (ice-9 readline)) (activate-readline)
(add-to-load-path "/usr/local/share/opencog/scm")
(add-to-load-path ".")
(use-modules (opencog))
(use-modules (opencog query))
(use-modules (opencog exec))

Now I have 2 questions:
1) how can I load file from my filesystem into this guile shell - the file will contain my knowledge base as a set of node and link definitions. I prefer to write and keep my knowledge base in file.
2) I don't understand the running of rule engine. My knowledge base can contain lot of rules (ImplicationLinks, BindLInks) and I would like to get conclusions from this knowledge base - how can I do this? I am aware of the command cog-bind! (and other Scheme commands http://wiki.opencog.org/w/Scheme ) but that command is for on BindLink. I would like to initiate a continuous process (forward chaining, arriving the the consequence set) when one BindLink modifies hypergraph and new rules are automatically searched to be matched with the updated hypergraph and so on, so on untile some termination criteria is achived. How can I initiate such process and how to define termination criteria?

AmeBel

unread,
Mar 2, 2017, 7:45:28 PM3/2/17
to opencog

1) how can I load file from my filesystem into this guile shell - the file will contain my knowledge base as a set of node and link definitions. I prefer to write and keep my knowledge base in file.

 
2) I don't understand the running of rule engine. My knowledge base can contain lot of rules (ImplicationLinks, BindLInks) and I would like to get conclusions from this knowledge base - how can I do this? I am aware of the command cog-bind! (and other Scheme commands http://wiki.opencog.org/w/Scheme ) but that command is for on BindLink. I would like to initiate a continuous process (forward chaining, arriving the the consequence set) when one BindLink modifies hypergraph and new rules are automatically searched to be matched with the updated hypergraph and so on, so on untile some termination criteria is achived. How can I initiate such process and how to define termination criteria?

The present termination criteria for the forward chainer is the number of steps, see http://wiki.opencog.org/w/URE_Configuration_Format#Termination_Criteria
Reply all
Reply to author
Forward
0 new messages