[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jun 15 19:04:34 1995 
Subject:more on sections and rules 
From:A . Sloman 
Volume-ID:950615.03 

Cc: r.poli@cs.bham.ac.uk
My colleague, Riccardo Poli has suggested that I should associate a
unique section with each rule, and then reinstate that section when
the rule's conditions are being tested, and again when the rule's
actions are being run.

This seems like a good idea, and very simple. I would not have to change
the matcher to use section_valof and it prevents unwanted interactions
between rules, or between rule variables and other variables.

Has anyone ever tried doing anything like this?

It almost amounts to simulating lvars (lexical scoping) for rules,
except that sections allow you to re-enter a lexical context, whereas
you can't do that with lvars.

The only problem is that one would have to ensure that every identifier
to be accessed in pop11 code in rule actions is automatically imported
into all these rule-local sections. That means declaring things as
global e.g. in the enclosing section. (We don't have Lisp's ability to
import a package, as Chris Dollin complained long ago, I think.).

I have no idea what the overhead is of associating a different section
with each rule. Does anyone know the space overhead for a section, and
per local identifier, per imported identifier, etc. A cheaper
possibility is to associate a section with each rule-type.

Comments and suggestions welcome.
Aaron