*******************************************************************************
                            T R A N S L A T I O N
*******************************************************************************
Other:
------
Values	
        IF--->PR:prValue
        IF<---PR:proPR_Term
        PR<---NL:sbGetDE_Val
Left/Right-side Terms
        IF--->PR:cprTerm

Sentences:
----------
IF	--->	PR	cprTerm
IF	<---	PR	proPR_Term
IF	--->	NL	conSentence
NL	--->	ST	parSynTree
ST	--->	PR	prPredicate

Queries:
--------
IF	--->	NL	conQuery
IF	<---	PR	proPR_Term
PR	<---	ST	tbqQuery+prQuery
ST	<---	NL	parSynTree


Sentence Rules:
---------------
IF	--->	RTif	rcnTree
IF	<---	PR	proPR_Term
PR	<---	RTif	rlgPR	
RTif	--->	RTnl	rtrNL
	<---   		rtrIF
RTif	--->	XML	xmlFromRule
        <---		xmlToRule
RTnl	--->	tree 	rtrMakeTree

Certainty Rules:
----------------
IF	--->	XML	xmlFromCR
        <---            xmlToCR

Functions:
----------
IF	--->	NL	conFunction
IF	<---	ST	parTerm
IF	<---	PR	proPR_Term
PR	<---	ST	tbqFunction+prFunction
ST	<---	NL	parSynTree
*******************************************************************************
                           W O R K   D A T A B A S E
*******************************************************************************
-----------------
SOLUTION DATABASE
-----------------
The solution database is used to store solutions and tables during a session with Pro/3.

chain "H" (one record per sol.set)
      domain STERM format: cmp("H",
                              [int(SOLREF),
                              int(NSOL),      #solutions
                              int(TRACED),    1=sol.set has been traced  0=else
                              int(NCOMPS),    #components
                              QUERY,          original query which set is a response to
                              int(ALTERED)])  1=set has been altered  0=else
      indexes: H1:SOLREF (un)
       
chain "V" (one record per sol. set)
      domain STERM format: cmp("V",
                              [int(SOLREF),
                               int(COMPNO),
                               str(VAR)]
      indexes: V1:SOLREF|COMPNO (un)
               V2:SOLREF|VAR    (un)                            
               V3:SOLREF        (nu)
	
chain "Snn.." (one record per solution in sol.set nn..)
      domain STERM format: cmp("S",[int(SolNo)|VALUES])
                           note that SolNo is 0 while solutions are being inserted and
                           thereafter set to 1,..,N (after call on solSetEnumerate)
      indexes: Snn..:SOLNO  (un)  note that there is one index table per chain
      

1/ queries on unary relations:
interpretation	solution	components
--------------	---------------	---------------------------------------------------------------------
attributes	entity		the entity's attributes:
(same entity			1/1:OUTRIGHTcontract_no=str("O-1")
type)				1/2:OUTRIGHTtrade_dt=int(9054)

entity		entity		only one component:
(different			1/1:X=cmp("spot",[str("S-1"),int(9054),str("direct"),str("Dresdner,
entity				HK"),fix(1000000),str("USD"),fix(1550000),str("DEM"),str("Deutsche, Frankfurt"),
types)				str("NDEMDB-101"),str("Citibank, NY"),str("FUSDCB-301")])  

2/ queries on binary relations:
each solution represents the solution for all arguments.
each argument is represented as in either of the two case above (the representation for the two
arguments does not need to be the same).
--------------
TABLE DATABASE
--------------
chain "TM" (one record per sol. set)
      domain STERM format: cmp("TM",
                              [int(SOLREF),
                               int(NTABLES),
                               str(PREDKB),
                               str(PREDNL),
                               int(NENTARGS),
                               int(NARGS)]
      indexes: TM1:SOLREF (un)
	
chain "TH" (one record per table)
	domain STERM format: cmp("TH"
	                        [int(SOLREF),
	                         int(TABNO),
	                         int(NCOLS),
	                         int(NROWS),
	                         str(ST),
	                         int(SORTED)    1=table is sorted, 0=not sorted
	                         int(ASCENDING) 1=ascending, -1=descending (only relevant of SORTED=1)
	                         int(WRAPPED)]  1=column headers are wrapped, else -1
	indexes: TH1:SOLREF|TABNO
	         TH2:SOLREF|ST
	
chain "TA" (one record per table argument)
	domain STERM format: cmp("TA"
	                        [int(SOLREF),
	                         int(TABNO),
	                         int(ARGNO),
	                         str(ARGKB),
	                         str(ARGNL),
	                         int(NDES)]

	indexes: TA1:SOLREF|TABNO|ARGNO
		                          
chain "TD" (one record per table column)
	domain STERM format: cmp("TD"
	                        [int(SOLREF),
	                         int(TABNO),
	                         int(ARGNO),
	                         int(DENO),
	                         int(COLNO),
	                         str(DEKB),
	                         str(DENL),
	                         str(DOMAIN),
	                         str(FORMAT),
	                         int(WIDTH),
	                         int(PIXELS),
	                         int(DISPLAY),    1=column id displayed, else -1
	                         int(SORTNO)]     0=not sort key, else 1 or 2 .. or NCOLS
	                         
	indexes: TD1:SOLREF|TABNO|ARGNO|DENO
		 TD2:SOLREF|TABNO|COLNO
                               	       
chain "Sn..Tm.." (one record per table cell - one chain per table)
	domain STERM format: cmp("T",
	                        [int(ROWNO),
	                         int(COLNO),
	                         str(VALNL),
	                         VAL])

	indexes: Sn..Tm.. ROWNO|COLNO

if a table is sorted:
---------------------
chain "USn..Tm.." (one record per table row)
	domain STERM format cmp("",[int(PHYSROW),int(LOGROW)])
	
	indexes: USn..Tm.. VALNLkVALNLm (the values are padded with blanks according to format)
	         XSn..Tm.. LOGROW
	         
	To find the physical row no corresponding to the row logical sequence no N:
	stbGetRowL_P
*******************************************************************************
                         S E N T E N C E    R U L E S
*******************************************************************************
 
rule types: --> rubRuleType
rule components (from list box(es)) --> rtrCompMess
rule elements (buttons) --> rtrElmMess
*******************************************************************************
                          I N E X A C T   R U L E S
*******************************************************************************
 
Term-formats: --> ir::crtLoadBody
