COGENT Frequently Asked Questions
The purpose of this page is to answer some Frequently Asked Questions
(FAQs) about COGENT, and provide some useful hints and tips for model
construction. The page itself is under constant construction.
Questions fall under three main headings:
There is also a form at the bottom of this page allowing you to
submit a faq.
General Questions
Q: What does COGENT stand for?
A: Cognitive Objects within a Graphical EnviroNmenT
Q: Is there a Mac version of COGENT?
A: It is now possible to run COGENT on a Mac
provided you are running Mac OS X. You will also need to
install an X windows server, which is available at no cost from Apple's
OS X software web site. [Note: The X in "OS X" and the X in "X Windows"
refer to different things. OS X, and even a "server version of OS X"
does not normally come with an X windows server.] If you have OS X
and X windows, then please contact us
(r.cooper@bbk.ac.uk)
and we'll be happy to provide the executable.
Installation Questions
Q: The
documentation for installing COGENT Version 2.1 on Windows suggests that
COGENT should be installed in C:\Program Files\COGENT, but the
installation procedure defaults to C:\COGENT. Which is correct?
A: There is an inconsistency between the installation
procedure and the documentation for Version 2.1 (sorry!). We recommend using
the standard configuration but installing in C:\Program Files\COGENT
(rather than C:\COGENT as the installation routine would prefer).
However, it really doesn't matter where you install COGENT -- it's a matter of
taste.
Q:
When I try to execute COGENT after installing it the following error is
reported:
ld.so.1: cogent: fatal: libxview.so.3: open failed: No such file or directory
Killed
A: This error only occurs with the very old
Unix version of COGENT, which uses the standard xview libraries, and
which will only execute if these libraries are available. The environment variable
LD_LIBRARY_PATH specifies the location of the libraries (normally
/usr/openwin/lib). Find out where the libraries are located and set the
environment variable (from the Unix prompt) accordingly. For example:
setenv LD_LIBRARY_PATH /usr/openwin/lib
COGENT should now work. Setting the environment variable should probably be
automated by adding the above Unix shell command (or an appropriate
variant of it) to COGENT users' .cshrc files.
Technical Questions
Q:
What's the difference between refracted and unrefracted rules?
A: Refraction is a standard concept from the
production system literature. It is often the case with non-triggered
rules (typically rules which fire when certain elements are present
in a buffer) that the rule should fire just once for each possible
instantiation of its variables, and the rule should not fire on every
cycle with the same variable binding. Refracted rules fire just once
for any given variable binding.
Q: If an element is added to a
propositional data store then it appears that all rules which match that
particular element will fire only once. This seems to be true even if the
element is added, then deleted then added again. How can I make a rule
that fires once each time the element is added?
A: This behaviour occurs when a rule is marked as refracted (which is the default for non-triggered
rules). If you want the rule to fire on every cycle, you'll need to set "Rule
is refracted" off for the rule in question. If you want the rule to fire with
one instantiation, then not fire until the element is deleted and added again,
you need to do something a bit hacky: make sure that each time the element is
added it is slightly different. This can be done by including the cycle
number on which the element was added as an argument within the element:
BEFORE:
Rule (refracted): Add an element to a buffer, thus triggering another rule
IF: some conditions
THEN: add term(arg) to buffer
Rule (refracted): Triggered rule, that will only fire once per value of X
IF: term(X) is in buffer
THEN: some actions
AFTER:
Rule (refracted): Add an element to a buffer, thus triggering another rule
IF: some conditions
the current cycle is N
THEN: add term(arg, N) to buffer
Rule (refracted): Triggered rule, that will only fire once per value of X
IF: term(X, N) is in buffer
THEN: some actions
Now, when the element is deleted and added again, it will not be exactly
the same, allowing the refracted rule to fire again.
Q: I can't work out why my rule won't fire. What can
I do?
A: You can use the "trace" qualifier on
conditions of the rule. If they satisfy, the instantiation patterns will be
printed out in the OOS window.
Q: Although COGENT buffers have configurable access
properties, allowing first-in/first-out and last-in/first out access, I find
that all items in a buffer are output on each cycle. How can I make COGENT
buffers output only one item on each cycle, in the specified order?
A: To match only one item per cycle, use the
"once" qualifier on a match condition. Then the condition will only
satisfy once per cycle. Note that unless the buffer contents change before the
next access, for example by deleting the first-matched item, the same item
will be output each time.
Q: When I send a trigger to a process, it always
takes effect on the next cycle. How can I delay execution of a trigger until
some specified later time?
A: Define a rule with the trigger pattern
"wait(X)", whose only action is to send the trigger X recurrently to
the process. Then to delay the trigger "foo(bar)" by one cycle, use
the construction "wait(foo(bar))". These can be nested, so for a
delay of two cycles use "wait(wait(foo(bar)))" and so on.
Submit a FAQ
If you have a question that isn't answered above but which you think
might qualify as a FAQ, please use the form below to submit the question.
We'll then get back to as soon as possible.
© The COGENT Group (1997, 1998)