Re: defclass and defconcept
"Cameron Ross" <[email protected]> Wed, 22 Aug 2007 22:27:03 -0400
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <38C1C6FA933F4E29A8CDF33C83057196@crosslaptop> |
Thanks Thomas, I was a little confused by the fact that some classes are subsets of others. For example, the following query indicates that some stella classes appear to be related via powerloom's subset-of relation: PL-KERNEL-KB |= (retrieve all (subset-of ?x number)) There are 3 solutions: #1: ?X=NUMBER #2: ?X=INTEGER #3: ?X=FLOAT Also, the following query suggests that the interval-integer class is related to powerloom's thing and scalar-interval concepts via the subset-of relation: PL-KERNEL-KB |= (retrieve all (subset-of integer-interval ?x)) There are 4 solutions: #1: ?X=INTEGER-INTERVAL #2: ?X=THING #3: ?X=SCALAR-INTERVAL #4: ?X=SCALAR I suppose there is a measure of inter-mingling of stella classes and powerloom concepts, relations etc. Once again, thanks for the info, Cameron. ----- Original Message ----- From: "Thomas Russ" <[email protected]> To: "Cameron Ross" <[email protected]> Cc: "PowerLoom Forum" <[email protected]> Sent: Wednesday, August 22, 2007 12:22 PM Subject: Re: [PowerLoom Forum] defclass and defconcept > > On Aug 20, 2007, at 8:54 PM, Cameron Ross wrote: > >> What is the difference between defclass and defconcept? > > DEFCLASS is used to define Stella classes, in other words, programming > language level classes. > > DEFCONCEPT is used to define PowerLoom concepts, a particular kind of > unary relation. > > You would only use DEFCLASS if you want to do Stella programming. For > PowerLoom, you need to use DEFCONCEPT. > > >> Also, what is NON-OBJECT? > > From the documentation string associated with it: > > "A data structure that cannot be a dispatch argument to > a (real) method, because its type is not accessible at run-time." > > This is used by the Stella code translator to identify types that do not > have a realization in the native object system, and thus cannot have > proper method dispatch work for it. Some examples are literals like > INTEGER, which are not legal dispatch types in Java (int) or C++ (int) or > even Common Lisp (FIXNUM). So they need to be handled specially by the > translator. Currently the only non-objects in Stella are all programming > language literals such as numbers, boolean values and strings. >