MAIN DOMAINS |
DOMAIN |
KB NAME ** |
SHORT FORMAT |
NOTES |
EXAMPLES |
INTEGER |
p3_din |
IN |
The range
is [-2147483648,
2147483647].
NL: Integer data elements can be entered
with or without comma (12000 or 12,000). |
|
NUMBER |
p3_dnu |
NU |
Fixed
point numbers.
NL: Number data elements can be entered
with or without comma and with or without decimal point
(12000, 12,000, 12000.00 or 12,000.00). Numbers can also
be entered as percentages (25% or 25.0%). |
- 10.0
- 1,300,000,000.99
- -1234567.1234567
|
STRING |
p3_dli |
LI |
A strings is enclosed in
double quotes ("xxx")
(both in NL and in IF), and can contain any
characters except quotes, apostrophes and curly brackets. Strings have
the same representation both in NL and in IF. |
- "10.0
- "US$"
- "Peter, Paul
and Mary"
|
IDENTIFIER |
p3_dif |
IF |
An identifier correspond
to a syntagm, i.e. it is represented by a "sequence
of tokens (words)" in NL and a KB name in the KB (IF
format). Identifiers must be
defined as such before it is used. |
|
SYMBOL |
p3_dsy |
SY |
A symbol is a hybrid
between a string and an identifier. Symbols are enclosed
in quotes in NL and represented as str("...") in IF. Symbols can contain
multiple elements (separated by |), and each element can
correspond to a string or an identifier. Identifier
components have a different representation in NL and IF
(corresponding to the difference in the representations
of identifiers). String components have the same
representation in NL and IF. A component will always be interpreted as
an identifier if such an identifier exists in the KB.
Symbols can be used by the KE, but is mainly intended for
sentences used in the administration of the KB, f.ex.
data elements in the dependency graphs. |
- "is conditionally projected|CONDITIONAL|1|0"
- "is conditionally projected"
- "Peter, Paul and Mary"
|
|
Date and Time Sub-domains
|
SUB-DOMAIN |
KB NAME |
SHORT FORMAT |
SUB-SET OF DOMAIN |
NOTES |
EXAMPLES
(NL) |
INTERNAL_DATE
as much as possible use
the XML_DATE domain instead
|
p3_did |
ID |
INTEGER |
The date domain can represent dates on or after 1 January 1775. The dates are represented internally as
integers, chronologically enumerated starting with 1 (1 = 1
January 1775). All arithmetic operations valid for
integers are valid for dates. Various formats are
available for dates in input and output according to the
date format option. Refer to the Output
Preferences-window. |
- 12-Aug-1999
- 12-08-1999
- 12/08/99
- 19990812
Quotes are not used! |
INTERNAL_TIME
as much as possible use
the XML_TIME domain instead
|
p3_dit |
IT |
INTEGER |
The time domain can
represent times within the day. The format HH:MM:SS:FF is
used in input and output (FFs are 1/100 of a second). The
SS and/or FF parts are optional. Times are represented
internally as a fixed point number equal to HH*360000+MM*6000+SS*100+FF. |
|
XML_TIME |
p3_dxt |
XT |
|
XML-type
time. |
- "13:45:01"
- "01:16:59-05:00"
- "01:16:59+05:00"
|
XML_DATE |
p3_dxd |
XD |
|
XML-type
date. |
- "2001-12-31"
- "-800-01-01"
Note that the INTERNAL_DATE NL-format
can be used in input. |
DATETIME |
p3_dxdt |
XDT |
|
XML-type
datetime. |
- "2001-12-31T13:45:01"
- "2001-12-31T13:45:01-05:00"
- "-800-01-01T00:00:00-05:00"
|
DURATION |
p3_dxdr |
XDR |
|
XML-type
duration. |
- "P5Y"
- "P1M2D"
- "-P2DT50S"
- "-P2Y3M4DT5H6M7S"
|
|
Other Sub-Domains |
SUB-DOMAIN |
KB NAME |
SHORT FORMAT |
SUB-SET OF DOMAIN |
NOTES |
EXAMPLES
(NL) |
CERTAINTY_FACTOR |
p3_dcf |
CF |
NUMBER |
A certainty factors is a
number with a special interpretation (see certainty rules for details). Certainty factors are in the in
the range [-1,1]. Certainty factors are represented in
the same way as numbers. |
|
PROBABILITY |
p3_dpr |
PR |
NUMBER |
Probabilities expressed as number in the
range [0,1] and are used in certainty rules (data rules). |
|
MEMBERSHIP_GRADE |
p3_dmg |
MG |
NUMBER |
A measurement for degree of membership in a
fuzzy set. 1 means that
the element definitely is a member of the set, while
values in the range <0,1> mean that the element is a member to
a degree. The higher the value, the higher the degree of membership. |
|
INCREMENT_FACTOR |
p3_dinc |
INC |
NUMBER |
Increment factors are used in bayesian
combinations of certainty rules, and are in the range [1,..] |
|
DECREMENT_FACTOR |
p3_ddec |
DEC |
NUMBER |
Decrement factors are used in bayesian
combinations of certainty rules, and are in the range [0,1> |
|
TERM_STRING |
p3_dts |
TS |
STRING |
See under. |
|
|
Note also the pseudo-domain ANY (with KB name 'pd_any'), which are
used internally in situations where the domain is unknown/undetermined.
TERM_STRING DOMAIN
Values of the TERM_STRING domain are string representations of
terms. They can thus represent
arbitrarily complex values. TERM_STRING values use the nested
term-string format (with prefix-letter "z")since the term-string
typically is embedded within another term-string. This is always the
case for sentences or rules with TERM_STRING domain components when
stored in SQL-type databases (since the
conclusion- and condition-fields always are stored as term-strings).
A special case of TERM_STRING domain values are term-string values
which represent
basic terms,
where component-values easily can be retrieved and used in e.g. sentence
rules with the term string component built-in function.
Example
The
TIMESERIES_OF
procedure returns a TERM_STRING
domain value corresponding to a basic term with 14 components. The
standard deviation component is retrieved by the following call
(assuming that the variable
EarningsSeries represents a time series value):
Sdv=term
string component given term string EarningsSeries and component no 7
LIST DOMAINS
There is a
list domain
corresponding to each of the domains in the table above. Lists
follow the general syntax element, element, ... , element and element. (List domain short codes end with the letter l, e.g.
nl for number lists. Their KB name ends with underscore l, e.g. pd_nu_l)
Examples
- 1, 2 and 3
- "Peter",
"Paul" and "Mary"
- "Peter,
Paul and Mary", "Bob Dylan" and "Crosby,
Stills, Nash and Young"
- Peter, Paul
and Mary, Bob Dylan and Crosby, Stills, Nash and Young
Example 1 is a list of integers,
example 2 and 3 are lists of strings, while example 4 is a
list of two identifiers (i.e. the Peter, Paul and Mary, Bob Dylan and
Crosby, Stills,
Nash and Young).
The ANY-list domain (LIST OF ANY VALUES) can be used to create
data element types or simple variables where the list members can be different
domains (i.e. any non-list domains).
Example
"Peter",
Paul, 123, 3.14 and "2004-12-24"
List domain limitations
- Variables can represent values of a list domain
(i.e. an entire list), but variables cannot represent list members.
- There are no list-manipulation operators, e.g.
there are nom operators to insert, remove or refer to members of a list.
Pro/3 has a number of built in
list functions in lieu of native string manipulation operators.
|
WORKING WITH DATES
XML_DATE is the recommended date domain, where dates
are represented as strings on the format "YYYY-MM-DD". The
comparison-operators (<,<=,>,>=,=) can have XML_DATE operands. While you
cannot add or subtract XML_DATE values, you can add and subtract
DURATION-domain values such as "P14D" (14 days) and
"P1Y2M3D" (1 year 2 months 3 days) to an XML_DATE.
Numerical procedures (in set
rules) do generally not work with XML_DATE values (with the
exception of the DATE_INTERPOLATION procedure which is made explicitly for
XML_DATE). To get around this limitation you will have to work with
INTERNAL_DATE values instead (where the date value
is represented internally as an integer). You can convert between XML_DATE and
INTERNAL_DATE with the two built-in
functions xml date of internal date and internal date number,
which return an XML_DATE and an INTERNAL_DATE respectively.
There are a number of built-in and
standard date functions.
Pro/3 has some flexibility in accepting various date formats in input (see
Processing Preferences-window). These
preferences also control how INTERNAL_DATE values are displayed in output. |