Next: If-element
Up: Function
Previous: Function
Contents
Index
Subfunction
Subfunctions are initiated by two bits for the type of subfunction:
- 00: value
- 01: variable
- 10: subfunction with arity of one
- 11: subfunction with arity of two
If the subfunction is a value (Introduction: ), the value is directly following after the introduction . The number of bits of the value is determined by the appropriate domain for subfunctions "subfunction" (see section 21.2.4 on page ).
If the subfunction is a variable (Introduction: ), the variable identifier /name, of a variable defined above the function element, is directly following after the introduction . The number of bits of the variable identifier is determined by the appropriate domain for variables "variable" (see section 21.2.4 on page ).
If the subfunction has an arity of one (introduction: ), a (at least 2 bits) bit field follows directly the introduction , which indicates the type of subfunction. Immediately after the bit field follows another subfunction (initiated by the 2 bits for its type), which is the subfunction of the subfunction with arity of one.
Values for the type of a subfunction with an arity of one:
- 00: absolut value
- 01: sine function
- 10: The introduction of rarely used one arity functions. The next two bits indicate the type of the one arity subfunction:
- 00 10: logarithm
- 01 10: arc sine
- 10 10: round
- 11 10: free for future assignments
- 11: The introduction of rarely used one arity functions. The next 6 bits indicate the type of one arity subfunction:
- **** ** 11: free for future assignments
If the subfunction has an arity of two (introduction: ), a (at least 3 bits) bit field follows directly the introduction , which indicates the type of subfunction. Immediately after the bit field follow two other subfunctions (initiated each by the 2 bits for their type), which are the subfunctions of the subfunction with arity of two.
Values for the type of a subfunction with an arity of two:
- 000: adding
- 001: subtraction
- 010: multiplication
- 011: division
- 100: exponentiation
- 101: minimum
- 110: maximum
- 111: The introduction of rarely used two arity functions. The next 5 bits indicate the type of two arity subfunction:
- 0000 0 111: if-function (before the two other subfunctions, first the condition the if-subfunction is stored)
- 0000 1 111: delay
- 0001 0 111: modulo
- **** * 111: free for future assignments
Example:
- example object: fun( , mult( sin( 5 ), ), ... )
- bits for "fun" (introduction): 1011
- bits for "mult" (introduction for "two arity subfunction" and "mult"): 11 010
- bits for "sin" (introduction for "one arity subfunction" and "sin"): 10 01
- bits for the value 5 (introduction for "value" and 5 as a 4 bit natural number with the value domain "subfunction" as "naturalNumberB(4)", which means a bit natural number): 00 0101
- bits for die Variable (the first variable in the part object branch, introduction for "variable" and the 4 bit variable identifier): 01 0001
- bits for the entire function element: 1011 11 010 10 01 00 0101 01 0001 ... (=Bits for the subobject)
- bits for the entire function element (first bit at the front): 1101 1101 0011 0001 0101 0100 0 ... (=Bits for the subobject)
Next: If-element
Up: Function
Previous: Function
Contents
Index
Betti Österholz
2013-02-13