This context is used to build computational tools in Pharo that can operate on Leibniz terms and contexts. See Plotting for an example.
Requires special terms (termClasses) for defining term classes in Pharo code.
Normally, terms created using an lzTerm
annotation are represented by instances of LzTermInContext
Object subclass: #LzTermInContext
uses: TLzEquality + TLzPrintable
instanceVariableNames: 'term normalForm context rewriteCache'
classVariableNames: ''
package: 'Leibniz2-Terms'
, which contains references to the term and its context. The term class mechanism allows substituting another class, which must be a subclass of LzTermInContext
Object subclass: #LzTermInContext
uses: TLzEquality + TLzPrintable
instanceVariableNames: 'term normalForm context rewriteCache'
classVariableNames: ''
package: 'Leibniz2-Terms'
.
To use this mechanism, define a subsort of PharoTermClass whose name is the name of your Pharo class. Terms whose sort is a subsort of this sort will then be instantiated using your class.