FORUM F-logic Builtins


    

The descriptions of all the builtins include arity, signatures (which indicate the type of the arguments), bindings (where f means that the argument must be free and b that it must be bound), plain English description, and examples. The abbreviations for the various types mentioned in the signatures are as follows:

Comparisons

Comparisons that have been deleted are included among the methods of primitive data types.
==
Arity: 2
Signatures: aa
Bindings: bb, bf, fb, ff
Description: Examples:
=
Arity: 2
Signatures: aa
Bindings: ff, fb, bf, bb
Description: Examples:
!=
Arity: 2
Signatures: aa
Bindings: ff, fb, bf, bb
Description: Examples:

Basic Mathematical Predicates (Optional)

_multiply
Arity: 3
Signatures: => _multiply(_number,_number,_number)
The arguments can be any number of a supported numeric data type. Conversion rules apply. **** Which??? ****
Bindings: fbb, bfb, bbf,

Description: Examples:
_add
Arity: 3
Signatures: => _add(_number,_number,_number)
The arguments can be any number of a supported numeric data type. Conversion rules apply. **** Which??? ****
Bindings: fbb, bfb, bbf, bbb
Description: Examples:
_abs
Arity: 2
Signatures: => _abs(_number,_number,_number)
The arguments can be any number of a supported numeric data type. Conversion rules apply. **** Which??? ****
Bindings: bf, fb, bb
Description: Examples:

Basic Mathematical Functions

These are basic mathematical functions are available in is-statements, e.g. ?X is (?Y+3/?Z+5)*sin(?Z) which means that the value of the expression on the right is assigned to variable ?X. Note that functions are not prefixed with an underscore '_'.

+
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
-
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
+
Arity: 2
Signatures: _number,_number, _string,_string, _dateTime,_duration, _time,_duration, _date,_duration.
Bindings: bb
Description: Examples:
-
Arity: 2
Signatures: _number,_number, _dateTime,_duration, _time,_duration, _date,_duration.
Bindings: bb
Description: Examples:
*
Arity: 2
Signatures: _number,_number
Bindings: bb
Description: Examples:
/
Arity: 2
Signatures: _number,_number
Bindings: bb
Description: Examples:
mod
Arity: 2
Signatures: _integer,_integer
Bindings: bb
Description: Examples:
abs
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
max
Arity: 2
Signatures: _number,_number
Bindings: bb
Description: Examples:
min
Arity: 2
Signatures: _number,_number
Bindings: bb
Description: Examples:
round
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
ceil
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
floor
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
tan
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
atan
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
sin
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
asin
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
cos
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
acos
Arity: 1
Signatures: _double
Bindings: b
Description: Examples:
exp
Arity: 1
Signatures: _number
Bindings: b
Description: Examples:
log
Arity: 1
Signatures: _number,_number
Bindings: b
Description: Examples:
pow
Arity: 3
Signatures: _number,_number
Bindings: bb
Description: Examples:

$Date: 2007/02/21 15:46:33 $