All built-in operations on the data sorts
This page is generated from the GROOVE 7.5.3 source code by manual/make-refs.sh; do not edit it by hand.
The built-in operations per data sort, usable in the attribute expressions described in the Advanced rule features chapter. Operations with a symbol can be written in prefix or infix notation; all operations can be called by name, in functional style.
Sort bool
| Operation |
Symbol |
Description |
and(bool, bool): bool |
& |
Conjunction |
bigand(bool): bool |
|
Collective conjunction |
bigor(bool): bool |
|
Collective disjunction |
eq(bool, bool): bool |
== |
Equality test |
neq(bool, bool): bool |
!= |
Inequality test |
not(bool): bool |
! |
Inversion |
or(bool, bool): bool |
| |
Disjunction |
Sort int
| Operation |
Symbol |
Description |
abs(int): int |
|
Absolute value |
add(int, int): int |
+ |
Addition |
bigmax(int): int |
|
Collective maximum |
bigmin(int): int |
|
Collective minimum |
div(int, int): int |
/ |
Division |
eq(int, int): bool |
== |
Equality test |
ge(int, int): bool |
>= |
Greater-or-equal test |
gt(int, int): bool |
> |
Greater-than test |
ite(bool, int, int): int |
|
If-then-else |
le(int, int): bool |
<= |
Lesser-or-equal test |
lt(int, int): bool |
< |
Lesser-than test |
max(int, int): int |
|
Maximum |
min(int, int): int |
|
Minimum |
mod(int, int): int |
% |
Modulo |
mul(int, int): int |
* |
Multiplication |
neg(int): int |
- |
Inversion |
neq(int, int): bool |
!= |
Inequality test |
prod(int): int |
|
Product |
sub(int, int): int |
- |
Subtraction |
sum(int): int |
|
Summation |
toReal(int): real |
(real) |
Real number conversion |
toString(int): string |
(string) |
Conversion to STRING |
Sort real
| Operation |
Symbol |
Description |
abs(real): real |
|
Absolute value |
add(real, real): real |
+ |
Addition |
bigmax(real): real |
|
Collective maximum |
bigmin(real): real |
|
Collective minimum |
div(real, real): real |
/ |
Division |
eq(real, real): bool |
== |
Equality test |
ge(real, real): bool |
>= |
Greater-or-equal test |
gt(real, real): bool |
> |
Greater-than test |
ite(bool, real, real): real |
|
If-then-else |
le(real, real): bool |
<= |
Lesser-or-equal test |
lt(real, real): bool |
< |
Lesser-than test |
max(real, real): real |
|
Maximum |
min(real, real): real |
|
Minimum |
mul(real, real): real |
* |
Multiplication |
neg(real): real |
- |
Inversion |
neq(real, real): bool |
!= |
Inequality test |
prod(real): real |
|
Product |
sub(real, real): real |
- |
Subtraction |
sum(real): real |
|
Summation |
toInt(real): int |
(int) |
Conversion to INT |
toString(real): string |
(string) |
Conversion to STRING |
Sort string
| Operation |
Symbol |
Description |
concat(string, string): string |
+ |
String concatenation |
eq(string, string): bool |
== |
Equality test |
ge(string, string): bool |
>= |
Greater-or-equal test |
gt(string, string): bool |
> |
Greater-than test |
isBool(string): bool |
|
Boolean representation test |
isInt(string): bool |
|
Integer representation test |
isReal(string): bool |
|
Real number representation test |
ite(bool, string, string): string |
|
If-then-else |
le(string, string): bool |
<= |
Lesser-or-equal test |
length(string): int |
|
Length |
lookup(string, string): int |
|
Substring matching |
lt(string, string): bool |
< |
Lesser-than test |
neq(string, string): bool |
!= |
Inequality test |
substring(string, int, int): string |
|
Substring |
suffix(string, int): string |
|
Suffix |
toBool(string): bool |
|
Boolean conversion |
toInt(string): int |
(int) |
Conversion to INT |
toReal(string): real |
(real) |
Real number conversion |