Download RacerPro User's Guide Version 1.9.2

Transcript
120
CHAPTER 6. THE NEW RACERPRO QUERY LANGUAGE - NRQL
The following functions are borrowed from Common Lisp and work as expected:
* + - / 1+ 1- < <= = > >= append asin asinh atan atanh ceiling concat cons consp
cos cosh eighth ensure-list eq eql equal equalp evenp expt fifth find first
flatten float floor format fourth intersection length list listp log max member
min minusp ninth nth nth null numberp oddp plusp position princ rationalize
remove rest reverse round search second set-difference set-equal set-subset
seventh signum sin sinh sixth sqrt string-capitalize string-downcase string-equal
string-greaterp string-lessp string-upcase string< string<= string= string>
string>= stringp symbol-name symbolp tan tanh tenth terpri third tree-equal
type-of union with-open-output-file write zerop
6.1.3.2
MiniLisp Head-Projection Operators
We have already discussed the told value and attribute retrieval head-projection
operators. nRQL offers some more head projection operators which are implemented in MiniLisp. The following head projections operators are implemented in MiniLisp and can be called MiniLisp macro head-projection operators:
:all-types (also: :types :instantiators :all-instantiators), :all-types-flat
(also:
:all-instantiators-flat :types-flat :instantiators-flat),
and
:direct-types
(also:
:most-specific-types :most-specific-instantiators
:direct-instantiators), :direct-types-flat (also: :most-specific-types-flat
:most-specific-instantiators-flat :direct-instantiators-flat), and :describe
as well as :individual-synonyms.
Here are some examples illustrating these macro operators:
? (full-reset)
> :okay-full-reset
? (instance i c)
> :OKAY
? (implies c d)
> :OKAY
? (retrieve (?x (describe ?x)) (?x top))
> (((?x i)
(((:lambda (?x) (describe-ind ?x *current-abox*)) ?x)
(i
:assertions
((i c))
:role-fillers
NIL
:told-attribute-fillers
NIL
:told-datatype-fillers
NIL
:annotation-datatype-property-fillers
NIL
Racer Systems GmbH & Co. KG — http://www.racer-systems.com