Skip to content
Keywords and Symbols

Keywords and Symbols

Tables of keywords and other lexical symbols for the Rel language.

Keywords

KeywordDescription
andlogical conjunction
asintroduces a local name for a relation imported from another module
boundbegins a bound declaration
defbegins the declaration of a relation
elseseparates the two branches of a conditional expression
endends a conditional expression or a module
entitybegins the declaration of an entity type (deprecated)
existsthe existential quantifier
falseboolean constant (the empty relation {})
foran alternative form of relational abstraction
forallthe universal quantifier
froma variant of inverse relational abstraction
icbegins the declaration of an integrity constraint
ifbegins a conditional expression
iffboolean equivalence
implieslogical implication
inbinds a variable to the elements of a set of unary tuples.
modulebegins the declaration of a module
notlogical negation
orlogical disjunction
thenseparates the condition and the first branch of a conditional expression
trueboolean constant (the singleton relation {()})
usebegins the list of names imported from another module
wherebinds variables to sets of values that satisfy a formula
withbegins the declaration of imports from another module
xorlogical “exclusive or”

General Language

SymbolOperator Name
.dot
,comma
;semicolon
:colon
(, )parentheses (precedence)
(, )parentheses (application)
{, }curly braces (precedence)
{, }curly braces (definitions)
[, ]square brackets
=equal (definitions)
in
%string interpolation in string constants
#specialization

Logical Operations

SymbolOperator Name
or
and
¬not
exists
forall
, , xor
, iff
, implies
|for
()true
{}false

For Constructing Data Type Constants

SymbolData Type
0xUnsigned Integer
., e, EFloating-point Number
:, :"...",Symbol
'Character
", """String
raw", raw""", raw string
%string interpolation

Mathematical Operations

SymbolOperator Name
+add
-subtract
*multiply
/divide
÷trunc_divide
%remainder
×cart
^power
=eq
, !=neq
, >=gt_eq
, <=lt_eq
>gt
<lt
Σsum

Operations on Relations

SymbolOperator Name
union
intersect
proper_superset
proper_subset
superset
subset
++>right_override
<++left_override
:>suffix_join
<:prefix_join

Infix Symbols

User-defined Symbols
, , , , , , , , , , , , infix symbols

Next: Terminology

Was this doc helpful?