Skip to content
Rel
REFERENCE
Libraries
intrinsics

The Intrinsic Library (intrinsics)

Collection of intrinsic Rel definitions.

Float

Float(x)

Holds if x is a 64-bit floating point number type.

Example:

Integrity constraint that tests whether x is a 64-bit floating point number.

def R = Float[2.0]

ic float_type_check(x in R) {
    Float(x)
}

Definition

@inline
def Float = rel_primitive_Floating[64]

// Forward declarations of control relations.

def output = false
def abort = false
def insert = false
def delete = false
def export = false
def _internal_ic_violation = false

Int

Int(x)

Holds if x is a 64-bit signed integer type.

Examples:

Integrity constraint that tests whether x is an Int.

def R = 6

ic int_type_check(x in R) {
    Int(x)
}

Schema defined in a relation using Int:

def my_relation(x in String, y in Int) {
    x = "abc" and y = 123
}

def output = my_relation

Definition

@inline
def Int = rel_primitive_SignedInt[64]

UInt

UInt(x)

Holds if x is a 64-bit unsigned integer type.

Examples:

Integrity constraint that tests whether x is a 64-bit unsigned integer:

def R = uint64[2]

ic uint_type_check(x in R) {
    UInt(x)
}

Definition

@inline
def UInt = rel_primitive_UnsignedInt[64]

UInt128

UInt128

128-bit unsigned integer type.

Definition

@inline
def UInt128 = rel_primitive_UnsignedInt[128]