Experiments with Pro-Active Declarative Meta-Programming
1. Experiments with Pro-Active
Declarative Meta-Programming
Verónica Uquillas Gómez
Andy Kellens
Kris Gybels
Theo D’Hondt
International Workshop on Smalltalk Technologies Software Languages Lab
31st of August 2009, Brest - France Vrije Universiteit Brussel
ESUG 2009 Belgium
3. SOUL: Smalltalk Open Unification
Language
Query language
Prolog-like
Smalltalk, Java,
C(++), Cobol
class(?class) if
member(?class, [Smalltalk allClasses])
4. PARACHUT: Programming And Reasoning
About CHanges Using Time
if subclassOf(?subclass, ?superclass),
….
Ch1 Ch2 Ch3 Chn TIME
…
5. Backward Chaining vs. Forward Chaining
Goal-driven Data-driven
More possible start states or goal states?
What kind of events triggers problem-solving?
6. Example: hash – equal rule
“re-implementing the = method implies re-implementing the
hash method”
classNeedsHash(?class) if class
methodInClass(?class, =), instanceVariableInClass
not(methodInClass(?class, hash)) methodInClass
methodCallsMethod
classNeedsEqual(?class) if classInPackage
methodInClass(?class, hash), subclassOf
not(methodInClass(?class, =)) classInHierarchyOf