[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pattern matching

  Date: 09 May 89 10:52:31+0100
  From: Jiri Dvorak <dvorak@iam.unibe.ch>
  To: CommonLoops.pa@xerox.com
  Subject: Pattern matching
  Message-Id: <405*dvorak@iam.unibe.ch>
  Is there a nice way to implement a pattern matcher in PCL that deals
  with patterns of the form:
    (object slot value)
  where at every position variables are allowed? I.e. the pattern matcher
  should be able to find all objects with a given value in a given slot,
  or find all slots of a given object, etc.
Well, you should be able to have metaclasses provide support for this.
For example, you might want classes to keep track of their instances, so
that queries like (class-of x 'some-class) will work.
What else you do depends on how you want to optimize other queries.
For example, you may want to maintain inverse relationships on
slot-value if you do (object 'some-slot 'some-value) queries a lot.
You may want to build your own slot-discriptions to let you specify
how each slot should be indexed.