| Description |
Data-inheritance is a brand of inferencing widely used in O-O languages. It can readily
provide default or computed topic characteristics which FOL finds very hard to
formalize. The PSI-set below denotes types of packed character Strings which provide
these features by using O-O techniques.
Each denoted character String may be optionally embedded in an occurrence in any subclass of aspect topic to define and configure its special (default or computed) characteristics and its dynamic behavior. Under WORDS, the dynamic characteristics of any target topic arise only from each such scripted aspect that has been asserted for the target, or for some other topic from which that aspect-target pair inherits data. |
|---|---|
| Publisher | Lexikos Corporation |
| Creator | Dan Corwin |
| Language | http://www.topicmaps.org/xtm/1.0/language.xtm#en |
| Version | 2003/11/03 |
| Status | Pre-release draft for comment |
| Date Published | 2003/10/02 |
| Aspect Type | http://www.lexikos.com/psi/words/aspect/#type |
| Default Value | http://www.lexikos.com/psi/words/aspect/#default |
| Functional Value | http://www.lexikos.com/psi/words/aspect/#function |
| Value Constraints | http://www.lexikos.com/psi/words/aspect/#constraints |
| Change Listeners | http://www.lexikos.com/psi/words/aspect/#listeners |
| Data Inheritance | http://www.lexikos.com/psi/words/aspect/#inheritance |
Such scripts are key parts of a TM's ontology under WORDS, which help to define (i.e., configure) the abstract system behavior for each Aspect Type.
This has many exotic use cases. One simple example would be to find the value of some resourceRef by normal means, then read in that resource as a stream, and locally process it to compute the final value returned by the script.
A more complex (and useful) example might combine the above script with a real time clock and a separate scheduler. It builds a nightly report of selected content or changes. At other times (to stay nimble), it returns the last such (cached) value.
This is a very general spec, as open as the registry of predicates. Validation will return the first listed predicate to fail in each case. Such logic (often experimental) may become part of a TMCL spec, or augment it.
Details of the substring formats and semantics are forthcoming separately. This is an advanced feature, whose uses seem highly application-specific.
For a RoleType in such a situation, WORDS uses no inheritance of the value, but instead it looks for a script that can return a Default Value. That script may be inherited, but not the default topic itself.
This PSI types ResourceData holding comma-separated specs that can configure exceptions to such inheritance rules. Details are in separate forthcoming specs. They involve such variations as:
No matter what rules get configured above, they can be designated for each aspect by the single character 'n' (iNheritance), whereas normal lookup rules for a value can be summarized by the single character 'L' (Lookup). Using such notation, a full list of primative ways to get an aspect value might be:
The codes above can be combined into an optional script-like Inheritance Policy subString for the Aspect Type, as in these bolded examples:
If such a policy is present, it will program WORDS to return a value of the aspect by using the indicated pattern of calls. If the policy is omitted from the Aspect Type, WORDS will use these default policies: