I suspect that nobody outside Birmingham is using my rule-based
system extension to Pop-11 (apart from known collaborators).
But just in case there is anyone who has copied it and is using it, this
is a warning that I shall shortly be installing a significantly revised
version, and would welcome any comments on problems, suggestions for
improvements, etc. from any existing users.
The library is a much improved version of LIB NEWPSYS (which was
first introduce to Poplog Pop-11 around 1989). It is is available in
ftp://ftp.cs.bham.ac.uk/pub/dist/poplog
and described in
ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/prb/help/poprulebase
and other files in the same directory.
It provides facilities for smooth interactions between rule-based
processing and "sub-symbolic" processing (e.g. neural nets) using
FILTER conditions and MAP and SELECT actions. (Ideas due to Riccardo
Poli).
=======================================================================
The major changes that I am now planning include the following:
1. Conditions of the form [WHERE ....] will have their code compiled
when rules are read in, rather than at run time when the rule is tested.
This leads to a considerable increase in speed in some programs. There's
a slight loss in generality. In particular it is no longer possible for
some of the code in a condition to be expanded at run time into new
forms by using "??" variables that have picked up values from earlier
conditions. (Up to a point, this sort of effect can be achieved in other
ways.) The effect of "?var" remains: just use "var".
2. It will be possible to include additional global variable
declarations in the conditions or actions of a rule, by using a
pseudo-condition or pseudo action of the form:
[RULE_VARS var1 var2 ....]
This will allow var1, var2, to be used with "?" or "??" inside
subsequent conditions or actions, to access their current global values.
Previously that could be done ONLY for variables that were introduced in
ordinary conditions. One advantage of this is that the syntax for
actions that need to access values of global variables is considerably
simplified. Another is that testing of conditions can
be speeded up. E.g. the conditions
.... [location obj1 ?loc] [WHERE loc == myloc] ....
can be replaced by
.... [RULE_VARS myloc] [location obj1 ?myloc] ....
(However, there's a slight garbage collection overhead because
popmatchvars gets extended by the use of RULE_VARS. This may be
compensated by elimination of some other variables, as in the
above example.)
3. Along with the above I plan to introduce a new pseudo-condition that
allows Pop-11 code to be run between conditions.
.... [POP11 <pop-11 code>] ....
will be equivalent to
.... [WHERE <pop-11 code>; true] ....
I.e. a POP11 condition will always succeed. It allows values of
RULE_VARS to be changed, trace printing to be generated while conditions
are being tested, items outside the current database to be altered
during testing of conditions, etc. This provides one way to allow the
value of a slot of a structure found in one condition to be used in
subsequent conditions.
e.g. a set of conditions might look like this:
.....
[RULE_VARS obj_name]
[.... ?obj ....]
[POP11 name_of(obj) -> obj_name]
[ ... ?obj_name ....]
and in that case ?obj_name could also be used in the actions of that
rule.
Similar uses of RULE_VARS can be made in actions of this form
[POP11 ....]
(POP11 actions are already supported).
4. In order to allow a pointer to a database item matching a condition
to be used in subsequent conditions or in actions, without having to
reconstruct the item from its parts, I am introducing another
pseudo-condition (suggested by Darryl Davis and Riccardo Poli). A
condition of this form will always succeed
[ ->> var ]
and will cause the variable var to have as its value the database item
that matched the previous condition (which must be a simple condition).
It is then possible for subsequent conditions and subsequent actions to
use ?var or ??var to refer to that database item.
Earlier changes included allowing new user-defined condition-types,
allowing rules to have weights that can be used for determining priority
(suggested by Tim Read) allowing DOALL actions to have a sequence of
actions to be treated as one (possibly embedded) action, and allowing an
optional extra numerical argument to prb_run
prb_run(rules, data, limit)
to limit the number of cycles. (This allows the running of different
systems to be interleaved, simulating concurrency.)
Comments and further suggestions for change welcome. In the longer term
I wish to provide better support for multiple rule-sets and multiple
databases. At present rule-sets and databases can be switched, and can
be pushed and popped. However, you cannot easily have N different
databases concurrently active, and allow a rule to have conditions that
are matched against different databases. E.g.
[INBASE db1 .....]
....
[INBASE db2 .....]
....
etc.
The main effect of allowing this would be equivalent to introducing more
sophisticated indexing to speed up programs that use large databases of
information.
However a more complex indexing mechanism would probably lead to larger
and much more complex code (e.g. the RETE mechanism), and can also make
garbage collection difficult.
I like the idea of databases made of simple lists which are ordinary
Pop-11 objects that users can manipulate. This makes it much easier to
write programs in which a single agent has a "mind" made up of a
collection of interacting databases and rulesets, as in the SIM_AGENT
package, available as
ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/sim
which has documentation in the help/ sub-directory and in
ftp://ftp.cs.bham.ac.uk/pub/dist/cog_affect/
in the file
Aaron.Sloman_Riccardo.Poli_sim_agent_toolkit.ps.Z
Comments and suggestions welcome.
Aaron
---
|