
Fact
Definition
Variable in the EH&S Expert.
Use
Facts are containers for data in the sets of rules of the EH&S Expert and can be used in the following ways:
Structure
Facts can always be found at the beginning of the set of rules, in a section that is headed with the keyword
FACTS . The individual facts are separated by commas.
|
FACTS | ||
|
Substance name(IN), | ||
|
Flash point(IN), | ||
|
RPhrase(OUT), | ||
|
ContainsPB(OUT) := "Y", | ||
|
... | ||

If you create a set of rules using the rule editor, the editor generates a rule file with the correct syntax automatically.
In the rules of the EH&S Expert, facts are used without any type specifications (text, integers, for example). All facts can adopt all types of data. If required, the data is converted automatically.
The system distinguishes between the following data types internally and in assignments:
Texts can be entered between two quotation marks ("hello," for example).
Numbers are written directly.
Sets are written as one element between two square brackets. Characteristics that are assigned multiple values are represented as sets.
Ranges are written in curly brackets. The lower and upper limits are included, provided they are not excluded explicitly by operators (<, >). The expression to stands between the lower and upper limit (for example, {>2 to 3}).
The following functions determine the range limits:
The following functions determine the operators of the range limits:
The following function determines whether a value is within the range limits:

The following assignments of data types to facts are therefore possible:
Conversion between the data types is explained in the following tables using examples. The second row shows the data types before the conversion; the columns below it show the conversion result in each case.
|
Number |
Range | |||
|
5 |
{1 to 3} |
{3 to 3} |
{>=1 to <=3} | |
Number |
Error |
3 |
Error | |
Range |
{5 to 5} |
|||
Text |
"5" |
">=1 - <=3" |
">=3 - <= 3" |
">=1 - <=3" |
List |
[5] |
[{1 to 3}] |
[{3 to 3}] |
[{>=1 to <=3}] |
|
Text |
List | ||||||
|
"Hello" |
"1 - 3" |
"1" |
["Hello"] |
[1] |
[{1 to 3}] |
[1,"A", 5] | |
Number |
Error |
Error |
1 |
Error |
1 |
Error |
Error |
Range |
Error |
{1 to 3} |
{1 to 1} |
Error |
{1 to 1} |
{1 to 3} |
Error |
Text |
"Hello" |
"1" |
">=1 - <=3" |
Error | |||
List |
["Hello"] |
["1 - 3"] |
["1"] |
||||
Integration
When defining the facts, an assignment to the corresponding elements in EH&S (characteristics, identifiers, and so on) is not yet made. These assignments are made centrally in the
mapping tables. In this way, rules can be written without the system being aware of the exact assignment to the elements in EH&S.