Skip to content

Namespace zmbt::expr

Namespace List > zmbt > expr

Expression Language API.

Public Attributes

Type Name
lang::SignatureUnary<::zmbt::lang::Keyword::Abs > const Abs
Absolute value.
lang::SignatureUnary<::zmbt::lang::Keyword::Acos > const Acos
Arccos function.
lang::SignatureUnary<::zmbt::lang::Keyword::Acosh > const Acosh
Hyperbolic arccos.
lang::SignatureBinary<::zmbt::lang::Keyword::Add > const Add
Addition.
lang::SignatureVariadic<::zmbt::lang::Keyword::All > const All
Match all predicates.
lang::SignatureBinary<::zmbt::lang::Keyword::And > const And
Logical and.
lang::SignatureVariadic<::zmbt::lang::Keyword::Any > const Any
Match any predicate.
lang::SignatureBinary<::zmbt::lang::Keyword::Near > const Approx
Alias for Near.
lang::SignatureUnary<::zmbt::lang::Keyword::Arange > const Arange
Generate range of numbers.
lang::SignatureBinary<::zmbt::lang::Keyword::Argmax > const Argmax
Max value index by key function.
lang::SignatureBinary<::zmbt::lang::Keyword::Argmin > const Argmin
Min value index by key function.
lang::SignatureUnary<::zmbt::lang::Keyword::Asin > const Asin
Arcsin function.
lang::SignatureUnary<::zmbt::lang::Keyword::Asinh > const Asinh
Hyperbolic arcsin.
lang::SignatureBinary<::zmbt::lang::Keyword::Assert > const Assert
Return argument if it holds assertion or error otherwise.
lang::SignatureBinary<::zmbt::lang::Keyword::At > const At
lang::SignatureUnary<::zmbt::lang::Keyword::Atan > const Atan
Arctan function.
lang::SignatureUnary<::zmbt::lang::Keyword::Atanh > const Atanh
Hyperbolic arctan.
lang::SignatureUnary<::zmbt::lang::Keyword::Avg > const Avg
Arythmetic average.
lang::SignatureBinary<::zmbt::lang::Keyword::Bind > const Bind
Bind design-time parameters to function.
lang::SignatureBinary<::zmbt::lang::Keyword::BitAnd > const BitAnd
Bitwise and.
lang::SignatureUnary<::zmbt::lang::Keyword::BitNot > const BitNot
Bitwise not.
lang::SignatureBinary<::zmbt::lang::Keyword::BitOr > const BitOr
Bitwise or.
lang::SignatureBinary<::zmbt::lang::Keyword::BitXor > const BitXor
Bitwise xor.
lang::SignatureUnary<::zmbt::lang::Keyword::Bool > const Bool
Predicate on boolean transform (aka truthy)
lang::SignatureBinary<::zmbt::lang::Keyword::Q > const C
Alias for Q.
lang::SignatureUnary<::zmbt::lang::Keyword::Card > const Card
Set cardinality (uniques count)
lang::SignatureUnary<::zmbt::lang::Keyword::Cartesian > const Cartesian
Cartesian product.
lang::SignatureCast const Cast
Reserialize decorated type as decorator.
lang::SignatureBinary<::zmbt::lang::Keyword::Cat > const Cat
Concatenate sequences.
lang::SignatureUnary<::zmbt::lang::Keyword::Ceil > const Ceil
Ceil.
lang::SignatureBinary<::zmbt::lang::Keyword::Chunks > const Chunks
Split into chunks of specified max width.
lang::SignatureBinary<::zmbt::lang::Keyword::Cat > const Concat
Alias for Cat.
lang::SignatureBinary<::zmbt::lang::Keyword::Q > const Const
Alias for Q.
lang::SignatureBinary<::zmbt::lang::Keyword::Ni > const Contains
Alias for Ni.
lang::SignatureUnary<::zmbt::lang::Keyword::Cos > const Cos
Cosinus function.
lang::SignatureUnary<::zmbt::lang::Keyword::Cosh > const Cosh
Hyperbolic cos.
lang::SignatureBinary<::zmbt::lang::Keyword::Count > const Count
Count matches by predicate param.
lang::SignatureBinary<::zmbt::lang::Keyword::D > const D
Return x if not null, else return default value.
lang::SignatureBinary<::zmbt::lang::Keyword::Dbg > const Dbg
Evaluate function and print evaluation log to stderr.
lang::SignatureBinary<::zmbt::lang::Keyword::Dbg > const Debug
Alias for Dbg.
lang::SignatureCast const Decorate
Alias for Cast.
lang::SignatureBinary<::zmbt::lang::Keyword::D > const Default
Alias for D.
lang::SignatureBinary<::zmbt::lang::Keyword::Del > const Del
Delete elements from structure by given query.
lang::SignatureBinary<::zmbt::lang::Keyword::Del > const Delete
Alias for Del.
lang::SignatureBinary<::zmbt::lang::Keyword::Diff > const Diff
Set difference.
lang::SignatureBinary<::zmbt::lang::Keyword::Div > const Div
Division.
lang::SignatureConst<::zmbt::lang::Keyword::E > const E
Euler's number.
lang::SignatureBinary<::zmbt::lang::Keyword::Each > const Each
Test predicate for each item in a sequence.
lang::SignatureUnary<::zmbt::lang::Keyword::Enumerate > const Enumerate
Enumerate sequence.
lang::SignatureConst<::zmbt::lang::Keyword::Eps > const Eps
Machine epsilon.
lang::SignatureBinary<::zmbt::lang::Keyword::Eq > const Eq
Is equal.
lang::SignatureUnary<::zmbt::lang::Keyword::Erf > const Erf
Error function.
lang::SignatureUnary<::zmbt::lang::Keyword::Erfc > const Erfc
Error function complement.
lang::SignatureErr const Err
Error object.
lang::SignatureErr const Error
Alias for Err.
lang::SignatureBinary<::zmbt::lang::Keyword::Eval > const Eval
Flip designtime and run-time parameters, evaluating input as expression.
lang::SignatureUnary<::zmbt::lang::Keyword::Exp > const Exp
Exponential (e^x)
lang::SignatureConst<::zmbt::lang::Keyword::False > const False
Logical false.
lang::SignatureUnary<::zmbt::lang::Keyword::Not > const Falsy
Alias for Not.
lang::SignatureBinary<::zmbt::lang::Keyword::Filter > const Filter
Filter sequence by predicate param.
lang::SignatureBinary<::zmbt::lang::Keyword::Find > const Find
Find the first element that satisfies given predicate.
lang::SignatureBinary<::zmbt::lang::Keyword::FindIdx > const FindIdx
Find index of the first element that satisfies given predicate.
lang::SignatureBinary<::zmbt::lang::Keyword::FindPtr > const FindPtr
Find json pointer of the first element that satisfies given predicate.
lang::SignatureUnary<::zmbt::lang::Keyword::Flatten > const Flatten
Flatten nested list.
lang::SignatureBinary<::zmbt::lang::Keyword::Flip > const Flip
Flip design-time and eval-time parameters.
lang::SignatureUnary<::zmbt::lang::Keyword::Floor > const Floor
Floor.
lang::SignatureVariadic<::zmbt::lang::Keyword::Fmt > const Fmt
Format string with the given parameter list.
lang::SignatureBinary<::zmbt::lang::Keyword::Fn > const Fn
Inline named function.
lang::SignatureBinary<::zmbt::lang::Keyword::Fold > const Fold
Reduce sequence with binary operator.
lang::SignatureVariadic<::zmbt::lang::Keyword::Fork > const Fork
Pack results from enveloped functions into an array.
lang::SignatureVariadic<::zmbt::lang::Keyword::Fmt > const Format
Alias for Fmt.
lang::SignatureUnary<::zmbt::lang::Keyword::Gamma > const Gamma
Gamma function.
lang::SignatureBinary<::zmbt::lang::Keyword::Ge > const Ge
Greater or equal.
lang::SignatureBinary<::zmbt::lang::Keyword::Gt > const Gt
Greater than.
lang::SignatureUnary<::zmbt::lang::Keyword::Id > const Id
Identity function.
lang::SignatureBinary<::zmbt::lang::Keyword::In > const In
Element is in.
lang::SignatureConst<::zmbt::lang::Keyword::Inf > const Inf
Infinity.
lang::SignatureBinary<::zmbt::lang::Keyword::Intersect > const Intersect
Set intersection.
lang::SignatureUnary<::zmbt::lang::Keyword::IsErr > const IsErr
Test the argument is err expression.
lang::SignatureUnary<::zmbt::lang::Keyword::IsErr > const Iserror
Alias for IsErr.
lang::SignatureUnary<::zmbt::lang::Keyword::Items > const Items
Extract key-value pairs from object.
lang::SignatureUnary<::zmbt::lang::Keyword::Keys > const Keys
Extract keys from object.
lang::SignatureUnary<::zmbt::lang::Keyword::Kwrd > const Kwrd
Introspect expression keyword.
lang::SignatureBinary<::zmbt::lang::Keyword::Le > const Le
Lesser or equal.
lang::SignatureBinary<::zmbt::lang::Keyword::Link > const Link
Symbolic binding of the input value.
lang::SignatureBinary<::zmbt::lang::Keyword::Log > const Log
Logarithm.
lang::SignatureBinary<::zmbt::lang::Keyword::Lookup > const Lookup
Lookup table function.
lang::SignatureBinary<::zmbt::lang::Keyword::Lshift > const Lshift
Bitwise left shift.
lang::SignatureBinary<::zmbt::lang::Keyword::Lt > const Lt
Lesser than.
lang::SignatureBinary<::zmbt::lang::Keyword::Map > const Map
Apply param expr to every element of sequence.
lang::SignatureBinary<::zmbt::lang::Keyword::Max > const Max
Max value by key function.
lang::SignatureBinary<::zmbt::lang::Keyword::Min > const Min
Min value by key function.
lang::SignatureBinary<::zmbt::lang::Keyword::Mod > const Mod
Modulo.
lang::SignatureBinary<::zmbt::lang::Keyword::Mul > const Mul
Multiplication.
lang::SignatureConst<::zmbt::lang::Keyword::NaN > const NaN
Not a number.
lang::SignatureBinary<::zmbt::lang::Keyword::Ne > const Ne
Not equal.
lang::SignatureBinary<::zmbt::lang::Keyword::Near > const Near
Floating point approximately equal.
lang::SignatureUnary<::zmbt::lang::Keyword::Neg > const Neg
Negate.
lang::SignatureBinary<::zmbt::lang::Keyword::Ni > const Ni
Contains element.
lang::SignatureUnary<::zmbt::lang::Keyword::Not > const Nil
Alias for Not.
lang::SignatureConst<::zmbt::lang::Keyword::Noop > const Noop
No operation.
lang::SignatureUnary<::zmbt::lang::Keyword::Not > const Not
Logical complement.
lang::SignatureBinary<::zmbt::lang::Keyword::NotIn > const NotIn
Element is not in.
lang::SignatureBinary<::zmbt::lang::Keyword::NotNi > const NotNi
Not contains element.
lang::SignatureConst<::zmbt::lang::Keyword::Null > const Null
Null value.
lang::SignatureOp const Op
Bind type-specific operator handler to function.
lang::SignatureBinary<::zmbt::lang::Keyword::Or > const Or
Logical or.
lang::SignatureOp const Overload
Alias for Op.
lang::SignatureBinary<::zmbt::lang::Keyword::PSubset > const PSubset
Is proper subset.
lang::SignatureBinary<::zmbt::lang::Keyword::PSuperset > const PSuperset
Is proper superset.
lang::SignatureUnary<::zmbt::lang::Keyword::Prms > const Parameters
Alias for Prms.
lang::SignatureUnary<::zmbt::lang::Keyword::Parse > const Parse
Parse string as json.
lang::SignatureConst<::zmbt::lang::Keyword::Pi > const Pi
Pi constant.
lang::SignatureVariadic<::zmbt::lang::Keyword::Pipe > const Pipe
Pipe functions in left-to-right composition.
lang::SignatureBinary<::zmbt::lang::Keyword::Pow > const Pow
To power.
lang::SignatureBinary<::zmbt::lang::Keyword::PreProc > const PreProc
Preprocessing token.
lang::SignatureUnary<::zmbt::lang::Keyword::Prms > const Prms
Introspect expression parameters.
lang::SignatureUnary<::zmbt::lang::Keyword::Prod > const Prod
Multiplication reduction.
lang::SignatureBinary<::zmbt::lang::Keyword::Push > const Push
Push element into a front of sequence.
lang::SignatureBinary<::zmbt::lang::Keyword::Q > const Q
Quote parameter, similar to lisp quotation.
lang::SignatureBinary<::zmbt::lang::Keyword::Quot > const Quot
Quotient.
lang::SignatureBinary<::zmbt::lang::Keyword::Re > const Re
Regular expression match.
lang::SignatureBinary<::zmbt::lang::Keyword::Recur > const Recur
Apply recursion to parameter expr and initial value.
lang::SignatureBinary<::zmbt::lang::Keyword::Fold > const Reduce
Alias for Fold.
lang::SignatureBinary<::zmbt::lang::Keyword::Re > const Regex
Alias for Re.
lang::SignatureBinary<::zmbt::lang::Keyword::Repeat > const Repeat
Repeat value in list.
lang::SignatureUnary<::zmbt::lang::Keyword::Reverse > const Reverse
Reverse sequence.
lang::SignatureUnary<::zmbt::lang::Keyword::Round > const Round
Round to nearest integer.
lang::SignatureBinary<::zmbt::lang::Keyword::Rshift > const Rshift
Bitwise right shift.
lang::SignatureVariadic<::zmbt::lang::Keyword::Saturate > const Saturate
Saturate matches in order.
lang::SignatureUnary<::zmbt::lang::Keyword::Str > const Serialize
Alias for Str.
lang::SignatureBinary<::zmbt::lang::Keyword::SetEq > const SetEq
Equal as set.
lang::SignatureUnary<::zmbt::lang::Keyword::Sign > const Sign
Sign.
lang::SignatureUnary<::zmbt::lang::Keyword::Sin > const Sin
Sinus function.
lang::SignatureUnary<::zmbt::lang::Keyword::Sinh > const Sinh
Hyperbolic sin.
lang::SignatureUnary<::zmbt::lang::Keyword::Size > const Size
Sequence size.
lang::SignatureBinary<::zmbt::lang::Keyword::Slide > const Slide
Sliding-window iteration.
lang::SignatureBinary<::zmbt::lang::Keyword::Sort > const Sort
Sort list by key function.
lang::SignatureUnary<::zmbt::lang::Keyword::Sqrt > const Sqrt
Square root.
lang::SignatureUnary<::zmbt::lang::Keyword::Str > const Str
Serialize json as string.
lang::SignatureBinary<::zmbt::lang::Keyword::Stride > const Stride
Striding iteration.
lang::SignatureBinary<::zmbt::lang::Keyword::Sub > const Sub
Subtraction.
lang::SignatureBinary<::zmbt::lang::Keyword::Subset > const Subset
Is subset.
lang::SignatureUnary<::zmbt::lang::Keyword::Sum > const Sum
Summation reduction.
lang::SignatureBinary<::zmbt::lang::Keyword::Superset > const Superset
Is superset.
lang::SignatureUnary<::zmbt::lang::Keyword::Tan > const Tan
Tangens function.
lang::SignatureUnary<::zmbt::lang::Keyword::Tanh > const Tanh
Hyperbolic tan.
lang::SignatureConst<::zmbt::lang::Keyword::Thread > const Thread
Thread id.
lang::SignatureUnary<::zmbt::lang::Keyword::ToList > const ToList
Put argument into a list.
lang::SignatureBinary<::zmbt::lang::Keyword::Trace > const Trace
Same as id, but also prints identifier parameter to debug log.
lang::SignatureUnary<::zmbt::lang::Keyword::Transp > const Transp
Transpose multidimensional list, turning rows into columns.
lang::SignatureConst<::zmbt::lang::Keyword::True > const True
Logical true.
lang::SignatureUnary<::zmbt::lang::Keyword::Bool > const Truthy
Alias for Bool.
lang::SignatureBinary<::zmbt::lang::Keyword::Try > const Try
Evaluate function and return result or null if it returns error.
lang::SignatureVariadic<::zmbt::lang::Keyword::Tuple > const Tuple
Pack expressions into an tuple without evaluation.
lang::SignatureUncast const Uncast
Reserialize decorator as decorated type.
lang::SignatureUncast const Undecorate
Alias for Uncast.
lang::SignatureBinary<::zmbt::lang::Keyword::Unfold > const Unfold
Put results of recursive fn call on initial value into an array.
lang::SignatureBinary<::zmbt::lang::Keyword::Union > const Union
Set union.
lang::SignatureUnary<::zmbt::lang::Keyword::Uniques > const Uniques
Filter unique elements.
lang::SignatureUnary<::zmbt::lang::Keyword::Values > const Values
Extract values from object.
lang::SignatureConst<::zmbt::lang::Keyword::Noop > const _
Alias for Noop.

Public Attributes Documentation

variable Abs

Absolute value.

lang::SignatureUnary<::zmbt::lang::Keyword::Abs> const zmbt::expr::Abs;


variable Acos

Arccos function.

lang::SignatureUnary<::zmbt::lang::Keyword::Acos> const zmbt::expr::Acos;


variable Acosh

Hyperbolic arccos.

lang::SignatureUnary<::zmbt::lang::Keyword::Acosh> const zmbt::expr::Acosh;


variable Add

Addition.

lang::SignatureBinary<::zmbt::lang::Keyword::Add> const zmbt::expr::Add;


variable All

Match all predicates.

lang::SignatureVariadic<::zmbt::lang::Keyword::All> const zmbt::expr::All;


variable And

Logical and.

lang::SignatureBinary<::zmbt::lang::Keyword::And> const zmbt::expr::And;

Generic behavior: if first operand is truthy, returns second operand, otherwise first


variable Any

Match any predicate.

lang::SignatureVariadic<::zmbt::lang::Keyword::Any> const zmbt::expr::Any;


variable Approx

Alias for Near.

lang::SignatureBinary<::zmbt::lang::Keyword::Near> const zmbt::expr::Approx;


variable Arange

Generate range of numbers.

lang::SignatureUnary<::zmbt::lang::Keyword::Arange> const zmbt::expr::Arange;

Return evenly spaced values within a given interval.

Parameters: * start: start value * stop: stop value * step: step value

Parameters dynamic evaluation: * stop: int -> [0, stop, 1] * [start, stop] -> [start, stop, 1] * [start, stop, step] -> [start, stop, step]


variable Argmax

Max value index by key function.

lang::SignatureBinary<::zmbt::lang::Keyword::Argmax> const zmbt::expr::Argmax;


variable Argmin

Min value index by key function.

lang::SignatureBinary<::zmbt::lang::Keyword::Argmin> const zmbt::expr::Argmin;


variable Asin

Arcsin function.

lang::SignatureUnary<::zmbt::lang::Keyword::Asin> const zmbt::expr::Asin;


variable Asinh

Hyperbolic arcsin.

lang::SignatureUnary<::zmbt::lang::Keyword::Asinh> const zmbt::expr::Asinh;


variable Assert

Return argument if it holds assertion or error otherwise.

lang::SignatureBinary<::zmbt::lang::Keyword::Assert> const zmbt::expr::Assert;


variable At

lang::SignatureBinary<::zmbt::lang::Keyword::At> const zmbt::expr::At;

$

Structure index is evaluated as array index or as key-value pair index for objects on order-preserving backends.

Result is null if requested element not found.


variable Atan

Arctan function.

lang::SignatureUnary<::zmbt::lang::Keyword::Atan> const zmbt::expr::Atan;


variable Atanh

Hyperbolic arctan.

lang::SignatureUnary<::zmbt::lang::Keyword::Atanh> const zmbt::expr::Atanh;


variable Avg

Arythmetic average.

lang::SignatureUnary<::zmbt::lang::Keyword::Avg> const zmbt::expr::Avg;


variable Bind

Bind design-time parameters to function.

lang::SignatureBinary<::zmbt::lang::Keyword::Bind> const zmbt::expr::Bind;


variable BitAnd

Bitwise and.

lang::SignatureBinary<::zmbt::lang::Keyword::BitAnd> const zmbt::expr::BitAnd;


variable BitNot

Bitwise not.

lang::SignatureUnary<::zmbt::lang::Keyword::BitNot> const zmbt::expr::BitNot;


variable BitOr

Bitwise or.

lang::SignatureBinary<::zmbt::lang::Keyword::BitOr> const zmbt::expr::BitOr;


variable BitXor

Bitwise xor.

lang::SignatureBinary<::zmbt::lang::Keyword::BitXor> const zmbt::expr::BitXor;


variable Bool

Predicate on boolean transform (aka truthy)

lang::SignatureUnary<::zmbt::lang::Keyword::Bool> const zmbt::expr::Bool;


variable C

Alias for Q.

lang::SignatureBinary<::zmbt::lang::Keyword::Q> const zmbt::expr::C;


variable Card

Set cardinality (uniques count)

lang::SignatureUnary<::zmbt::lang::Keyword::Card> const zmbt::expr::Card;


variable Cartesian

Cartesian product.

lang::SignatureUnary<::zmbt::lang::Keyword::Cartesian> const zmbt::expr::Cartesian;


variable Cast

Reserialize decorated type as decorator.

lang::SignatureCast const zmbt::expr::Cast;


variable Cat

Concatenate sequences.

lang::SignatureBinary<::zmbt::lang::Keyword::Cat> const zmbt::expr::Cat;


variable Ceil

Ceil.

lang::SignatureUnary<::zmbt::lang::Keyword::Ceil> const zmbt::expr::Ceil;


variable Chunks

Split into chunks of specified max width.

lang::SignatureBinary<::zmbt::lang::Keyword::Chunks> const zmbt::expr::Chunks;

Similar to Stride, but includes the last subsequence smaller then step width.


variable Concat

Alias for Cat.

lang::SignatureBinary<::zmbt::lang::Keyword::Cat> const zmbt::expr::Concat;


variable Const

Alias for Q.

lang::SignatureBinary<::zmbt::lang::Keyword::Q> const zmbt::expr::Const;


variable Contains

Alias for Ni.

lang::SignatureBinary<::zmbt::lang::Keyword::Ni> const zmbt::expr::Contains;


variable Cos

Cosinus function.

lang::SignatureUnary<::zmbt::lang::Keyword::Cos> const zmbt::expr::Cos;


variable Cosh

Hyperbolic cos.

lang::SignatureUnary<::zmbt::lang::Keyword::Cosh> const zmbt::expr::Cosh;


variable Count

Count matches by predicate param.

lang::SignatureBinary<::zmbt::lang::Keyword::Count> const zmbt::expr::Count;


variable D

Return x if not null, else return default value.

lang::SignatureBinary<::zmbt::lang::Keyword::D> const zmbt::expr::D;


variable Dbg

Evaluate function and print evaluation log to stderr.

lang::SignatureBinary<::zmbt::lang::Keyword::Dbg> const zmbt::expr::Dbg;


variable Debug

Alias for Dbg.

lang::SignatureBinary<::zmbt::lang::Keyword::Dbg> const zmbt::expr::Debug;


variable Decorate

Alias for Cast.

lang::SignatureCast const zmbt::expr::Decorate;


variable Default

Alias for D.

lang::SignatureBinary<::zmbt::lang::Keyword::D> const zmbt::expr::Default;


variable Del

Delete elements from structure by given query.

lang::SignatureBinary<::zmbt::lang::Keyword::Del> const zmbt::expr::Del;

Possible queries: * Structure index (negative resolves as reverse) * JSON Pointer * List of queries

Structure index is evaluated as array index or as key-value pair index for objects on order-preserving backends. When deleting an object element, resulting items order may change.


variable Delete

Alias for Del.

lang::SignatureBinary<::zmbt::lang::Keyword::Del> const zmbt::expr::Delete;


variable Diff

Set difference.

lang::SignatureBinary<::zmbt::lang::Keyword::Diff> const zmbt::expr::Diff;


variable Div

Division.

lang::SignatureBinary<::zmbt::lang::Keyword::Div> const zmbt::expr::Div;

  • \([ ] \mapsto [x, y] \mapsto x / y\)
  • \([y] \mapsto [x] \mapsto x / y\)

variable E

Euler's number.

lang::SignatureConst<::zmbt::lang::Keyword::E> const zmbt::expr::E;


variable Each

Test predicate for each item in a sequence.

lang::SignatureBinary<::zmbt::lang::Keyword::Each> const zmbt::expr::Each;

Equivalent to Count(p | Not) | Eq(0)


variable Enumerate

Enumerate sequence.

lang::SignatureUnary<::zmbt::lang::Keyword::Enumerate> const zmbt::expr::Enumerate;

Enumerate sequence with index.


variable Eps

Machine epsilon.

lang::SignatureConst<::zmbt::lang::Keyword::Eps> const zmbt::expr::Eps;


variable Eq

Is equal.

lang::SignatureBinary<::zmbt::lang::Keyword::Eq> const zmbt::expr::Eq;


variable Erf

Error function.

lang::SignatureUnary<::zmbt::lang::Keyword::Erf> const zmbt::expr::Erf;


variable Erfc

Error function complement.

lang::SignatureUnary<::zmbt::lang::Keyword::Erfc> const zmbt::expr::Erfc;


variable Err

Error object.

lang::SignatureErr const zmbt::expr::Err;

Error object handling the message and context info


variable Error

Alias for Err.

lang::SignatureErr const zmbt::expr::Error;


variable Eval

Flip designtime and run-time parameters, evaluating input as expression.

lang::SignatureBinary<::zmbt::lang::Keyword::Eval> const zmbt::expr::Eval;


variable Exp

Exponential (e^x)

lang::SignatureUnary<::zmbt::lang::Keyword::Exp> const zmbt::expr::Exp;


variable False

Logical false.

lang::SignatureConst<::zmbt::lang::Keyword::False> const zmbt::expr::False;


variable Falsy

Alias for Not.

lang::SignatureUnary<::zmbt::lang::Keyword::Not> const zmbt::expr::Falsy;


variable Filter

Filter sequence by predicate param.

lang::SignatureBinary<::zmbt::lang::Keyword::Filter> const zmbt::expr::Filter;


variable Find

Find the first element that satisfies given predicate.

lang::SignatureBinary<::zmbt::lang::Keyword::Find> const zmbt::expr::Find;


variable FindIdx

Find index of the first element that satisfies given predicate.

lang::SignatureBinary<::zmbt::lang::Keyword::FindIdx> const zmbt::expr::FindIdx;

Similar to FindPtr, but will integer index or nullptr for non-indexable input. Objects are processed as list of key-value pairs.


variable FindPtr

Find json pointer of the first element that satisfies given predicate.

lang::SignatureBinary<::zmbt::lang::Keyword::FindPtr> const zmbt::expr::FindPtr;


variable Flatten

Flatten nested list.

lang::SignatureUnary<::zmbt::lang::Keyword::Flatten> const zmbt::expr::Flatten;


variable Flip

Flip design-time and eval-time parameters.

lang::SignatureBinary<::zmbt::lang::Keyword::Flip> const zmbt::expr::Flip;

Useful for binding lhs operands to non-commutative operators. Unlike Haskell's flip, won't change the order or eval-time parameters - for that case use the Reverse keyword instead.

Prefix operator form (tilde):

Flip(Div(1)) ≡ ~Div(1)


variable Floor

Floor.

lang::SignatureUnary<::zmbt::lang::Keyword::Floor> const zmbt::expr::Floor;


variable Fmt

Format string with the given parameter list.

lang::SignatureVariadic<::zmbt::lang::Keyword::Fmt> const zmbt::expr::Fmt;

Constant expressions are supported for the token list, s.t. "%s" | Fmt(Pi) produces "3.141592653589793E0"


variable Fn

Inline named function.

lang::SignatureBinary<::zmbt::lang::Keyword::Fn> const zmbt::expr::Fn;

Expression Fn(reference, expr) creates a symbolic link to expr, at the same time evaluating given arguments (inlining the expr). The reference is avaliable in the evaluation context, including in the expr itself (essentially enabling an arbitrary recursion).

Infix operator form (left shift):

"\(f" << E ≡ Fn("\)f", E)


variable Fold

Reduce sequence with binary operator.

lang::SignatureBinary<::zmbt::lang::Keyword::Fold> const zmbt::expr::Fold;

To set a specific initial value, use composition with Push, e.g. Push(0) | Fold(Add)

For reverse operation, see Unfold


variable Fork

Pack results from enveloped functions into an array.

lang::SignatureVariadic<::zmbt::lang::Keyword::Fork> const zmbt::expr::Fork;

Allows to combine different properties in a single expression. Parameter


variable Format

Alias for Fmt.

lang::SignatureVariadic<::zmbt::lang::Keyword::Fmt> const zmbt::expr::Format;


variable Gamma

Gamma function.

lang::SignatureUnary<::zmbt::lang::Keyword::Gamma> const zmbt::expr::Gamma;


variable Ge

Greater or equal.

lang::SignatureBinary<::zmbt::lang::Keyword::Ge> const zmbt::expr::Ge;


variable Gt

Greater than.

lang::SignatureBinary<::zmbt::lang::Keyword::Gt> const zmbt::expr::Gt;


variable Id

Identity function.

lang::SignatureUnary<::zmbt::lang::Keyword::Id> const zmbt::expr::Id;


variable In

Element is in.

lang::SignatureBinary<::zmbt::lang::Keyword::In> const zmbt::expr::In;


variable Inf

Infinity.

lang::SignatureConst<::zmbt::lang::Keyword::Inf> const zmbt::expr::Inf;


variable Intersect

Set intersection.

lang::SignatureBinary<::zmbt::lang::Keyword::Intersect> const zmbt::expr::Intersect;


variable IsErr

Test the argument is err expression.

lang::SignatureUnary<::zmbt::lang::Keyword::IsErr> const zmbt::expr::IsErr;


variable Iserror

Alias for IsErr.

lang::SignatureUnary<::zmbt::lang::Keyword::IsErr> const zmbt::expr::Iserror;


variable Items

Extract key-value pairs from object.

lang::SignatureUnary<::zmbt::lang::Keyword::Items> const zmbt::expr::Items;


variable Keys

Extract keys from object.

lang::SignatureUnary<::zmbt::lang::Keyword::Keys> const zmbt::expr::Keys;


variable Kwrd

Introspect expression keyword.

lang::SignatureUnary<::zmbt::lang::Keyword::Kwrd> const zmbt::expr::Kwrd;


variable Le

Lesser or equal.

lang::SignatureBinary<::zmbt::lang::Keyword::Le> const zmbt::expr::Le;


Symbolic binding of the input value.

lang::SignatureBinary<::zmbt::lang::Keyword::Link> const zmbt::expr::Link;

The capture is referenced by an arbitrary string preceded by dollar sign, e.g. "$x".

On the first access it stores the input value in isolated expression context, and returns it on each subsequent call. It can't be reset after the first access.

The string after $ sign shall not be enclosed in [], {}, or (), as those formats are reserved for internal usage.


variable Log

Logarithm.

lang::SignatureBinary<::zmbt::lang::Keyword::Log> const zmbt::expr::Log;

Logarithm with base b: * \([ ] \mapsto [x, b] \mapsto log\_b(x)\) * \([b] \mapsto [x] \mapsto log\_b(x)\)


variable Lookup

Lookup table function.

lang::SignatureBinary<::zmbt::lang::Keyword::Lookup> const zmbt::expr::Lookup;

Parametrized at design time with fixed array or object, produces the value at corresponding At query given as eval-time argument. Equivalent to ~At(...)


variable Lshift

Bitwise left shift.

lang::SignatureBinary<::zmbt::lang::Keyword::Lshift> const zmbt::expr::Lshift;

  • \([ ] \mapsto [x, s] \mapsto x \texttt{ << } s\)
  • \([s] \mapsto [x] \mapsto x \texttt{ << } s\)

variable Lt

Lesser than.

lang::SignatureBinary<::zmbt::lang::Keyword::Lt> const zmbt::expr::Lt;


variable Map

Apply param expr to every element of sequence.

lang::SignatureBinary<::zmbt::lang::Keyword::Map> const zmbt::expr::Map;


variable Max

Max value by key function.

lang::SignatureBinary<::zmbt::lang::Keyword::Max> const zmbt::expr::Max;


variable Min

Min value by key function.

lang::SignatureBinary<::zmbt::lang::Keyword::Min> const zmbt::expr::Min;


variable Mod

Modulo.

lang::SignatureBinary<::zmbt::lang::Keyword::Mod> const zmbt::expr::Mod;

Modulo of x: * \([ ] \mapsto [x, m] \mapsto x % m\) * \([m] \mapsto [x] \mapsto x % m\)


variable Mul

Multiplication.

lang::SignatureBinary<::zmbt::lang::Keyword::Mul> const zmbt::expr::Mul;


variable NaN

Not a number.

lang::SignatureConst<::zmbt::lang::Keyword::NaN> const zmbt::expr::NaN;


variable Ne

Not equal.

lang::SignatureBinary<::zmbt::lang::Keyword::Ne> const zmbt::expr::Ne;


variable Near

Floating point approximately equal.

lang::SignatureBinary<::zmbt::lang::Keyword::Near> const zmbt::expr::Near;

Based on numpy.isclose: abs(x - ref) <= (atol + rtol * abs(ref))

Rhs parameters: ref: reference value rtol: relative tolerance, default = 1e-05 atol: absolute tolerance, default = 1e-08

Rhs dynamic evaluation: * ref -> [ref, default, default] * [ref] -> [ref, default, default] * [ref, rtol] -> [ref, rtol , default] * [ref, rtol, atol] -> [ref, rtol , atol ]


variable Neg

Negate.

lang::SignatureUnary<::zmbt::lang::Keyword::Neg> const zmbt::expr::Neg;


variable Ni

Contains element.

lang::SignatureBinary<::zmbt::lang::Keyword::Ni> const zmbt::expr::Ni;


variable Nil

Alias for Not.

lang::SignatureUnary<::zmbt::lang::Keyword::Not> const zmbt::expr::Nil;


variable Noop

No operation.

lang::SignatureConst<::zmbt::lang::Keyword::Noop> const zmbt::expr::Noop;

Returns true without input validation. Used in place of matchers for uninteresting signals.


variable Not

Logical complement.

lang::SignatureUnary<::zmbt::lang::Keyword::Not> const zmbt::expr::Not;


variable NotIn

Element is not in.

lang::SignatureBinary<::zmbt::lang::Keyword::NotIn> const zmbt::expr::NotIn;


variable NotNi

Not contains element.

lang::SignatureBinary<::zmbt::lang::Keyword::NotNi> const zmbt::expr::NotNi;


variable Null

Null value.

lang::SignatureConst<::zmbt::lang::Keyword::Null> const zmbt::expr::Null;


variable Op

Bind type-specific operator handler to function.

lang::SignatureOp const zmbt::expr::Op;

Expression Op(op, f) instructs f to use op operator on invocation instead of the default generic.

Operator parameter singleton can be referenced with a string key or constructed in place using type<T> tag.

This operator handler is propagated downstream to all terminal subexpression in f. The result of f(x) is not decorated as type<T>.


variable Or

Logical or.

lang::SignatureBinary<::zmbt::lang::Keyword::Or> const zmbt::expr::Or;

Generic behavior: if first operand is truthy, returns first operand, second otherwise


variable Overload

Alias for Op.

lang::SignatureOp const zmbt::expr::Overload;


variable PSubset

Is proper subset.

lang::SignatureBinary<::zmbt::lang::Keyword::PSubset> const zmbt::expr::PSubset;


variable PSuperset

Is proper superset.

lang::SignatureBinary<::zmbt::lang::Keyword::PSuperset> const zmbt::expr::PSuperset;


variable Parameters

Alias for Prms.

lang::SignatureUnary<::zmbt::lang::Keyword::Prms> const zmbt::expr::Parameters;


variable Parse

Parse string as json.

lang::SignatureUnary<::zmbt::lang::Keyword::Parse> const zmbt::expr::Parse;


variable Pi

Pi constant.

lang::SignatureConst<::zmbt::lang::Keyword::Pi> const zmbt::expr::Pi;


variable Pipe

Pipe functions in left-to-right composition.

lang::SignatureVariadic<::zmbt::lang::Keyword::Pipe> const zmbt::expr::Pipe;


variable Pow

To power.

lang::SignatureBinary<::zmbt::lang::Keyword::Pow> const zmbt::expr::Pow;

X to power p * \([ ] \mapsto [x, p] \mapsto x^p\) * \([p] \mapsto [x] \mapsto x^p\)


variable PreProc

Preprocessing token.

lang::SignatureBinary<::zmbt::lang::Keyword::PreProc> const zmbt::expr::PreProc;

String token that can be substituted with arbitrary expression on expression preprocessing.


variable Prms

Introspect expression parameters.

lang::SignatureUnary<::zmbt::lang::Keyword::Prms> const zmbt::expr::Prms;


variable Prod

Multiplication reduction.

lang::SignatureUnary<::zmbt::lang::Keyword::Prod> const zmbt::expr::Prod;

Equivalent to Reduce(Mul)


variable Push

Push element into a front of sequence.

lang::SignatureBinary<::zmbt::lang::Keyword::Push> const zmbt::expr::Push;


variable Q

Quote parameter, similar to lisp quotation.

lang::SignatureBinary<::zmbt::lang::Keyword::Q> const zmbt::expr::Q;

Quotation lifts any parameter to constant, s.t. produced expression will return the design-time parameter on evaluation, ignoring input. If evaluable expression is passed, it is returned unevaluated. Unlike plain literals which can be treated as predicate matchers in certain context, Q(x) is always a constant expression discarding input. ~Q (Flip(Q)) is equivalent to Id.


variable Quot

Quotient.

lang::SignatureBinary<::zmbt::lang::Keyword::Quot> const zmbt::expr::Quot;

Quotient of x: * \([ ] \mapsto [x, d] \mapsto x // d\) * \([d] \mapsto [x] \mapsto x // d\)


variable Re

Regular expression match.

lang::SignatureBinary<::zmbt::lang::Keyword::Re> const zmbt::expr::Re;

If input is not a string, match it's serialized form.


variable Recur

Apply recursion to parameter expr and initial value.

lang::SignatureBinary<::zmbt::lang::Keyword::Recur> const zmbt::expr::Recur;

Inference rules:

  • n | Recur(x & f) \(\mapsto ◯ⁿ f(x)\), or
  • Q(p) | Recur(x₀ & f) \(\mapsto x\_k\), where
  • \(x\_{i+1} = f(x\_i)\)
  • \(p(x\_{i}) = \top \quad \forall i \le k\)
  • \(p(x\_{i+1}) = \bot\) (exit condition)

variable Reduce

Alias for Fold.

lang::SignatureBinary<::zmbt::lang::Keyword::Fold> const zmbt::expr::Reduce;


variable Regex

Alias for Re.

lang::SignatureBinary<::zmbt::lang::Keyword::Re> const zmbt::expr::Regex;


variable Repeat

Repeat value in list.

lang::SignatureBinary<::zmbt::lang::Keyword::Repeat> const zmbt::expr::Repeat;


variable Reverse

Reverse sequence.

lang::SignatureUnary<::zmbt::lang::Keyword::Reverse> const zmbt::expr::Reverse;


variable Round

Round to nearest integer.

lang::SignatureUnary<::zmbt::lang::Keyword::Round> const zmbt::expr::Round;

Hint: To round to ndigits precision after the decimal point, use Mul(ndigits) | Round | Div(ndigits) combo.


variable Rshift

Bitwise right shift.

lang::SignatureBinary<::zmbt::lang::Keyword::Rshift> const zmbt::expr::Rshift;

  • \([ ] ↦ [x, s] ↦ x \texttt{ >> } s\)
  • \([s] ↦ [x] ↦ x \texttt{ >> } s\)

variable Saturate

Saturate matches in order.

lang::SignatureVariadic<::zmbt::lang::Keyword::Saturate> const zmbt::expr::Saturate;


variable Serialize

Alias for Str.

lang::SignatureUnary<::zmbt::lang::Keyword::Str> const zmbt::expr::Serialize;


variable SetEq

Equal as set.

lang::SignatureBinary<::zmbt::lang::Keyword::SetEq> const zmbt::expr::SetEq;


variable Sign

Sign.

lang::SignatureUnary<::zmbt::lang::Keyword::Sign> const zmbt::expr::Sign;


variable Sin

Sinus function.

lang::SignatureUnary<::zmbt::lang::Keyword::Sin> const zmbt::expr::Sin;


variable Sinh

Hyperbolic sin.

lang::SignatureUnary<::zmbt::lang::Keyword::Sinh> const zmbt::expr::Sinh;


variable Size

Sequence size.

lang::SignatureUnary<::zmbt::lang::Keyword::Size> const zmbt::expr::Size;


variable Slide

Sliding-window iteration.

lang::SignatureBinary<::zmbt::lang::Keyword::Slide> const zmbt::expr::Slide;

Sliding window iteration by specified window width.


variable Sort

Sort list by key function.

lang::SignatureBinary<::zmbt::lang::Keyword::Sort> const zmbt::expr::Sort;


variable Sqrt

Square root.

lang::SignatureUnary<::zmbt::lang::Keyword::Sqrt> const zmbt::expr::Sqrt;


variable Str

Serialize json as string.

lang::SignatureUnary<::zmbt::lang::Keyword::Str> const zmbt::expr::Str;


variable Stride

Striding iteration.

lang::SignatureBinary<::zmbt::lang::Keyword::Stride> const zmbt::expr::Stride;

Striding iteration by specified step width. Reminder subsequence smaller then step width is discarded.


variable Sub

Subtraction.

lang::SignatureBinary<::zmbt::lang::Keyword::Sub> const zmbt::expr::Sub;


variable Subset

Is subset.

lang::SignatureBinary<::zmbt::lang::Keyword::Subset> const zmbt::expr::Subset;


variable Sum

Summation reduction.

lang::SignatureUnary<::zmbt::lang::Keyword::Sum> const zmbt::expr::Sum;

Equivalent to Reduce(Add)


variable Superset

Is superset.

lang::SignatureBinary<::zmbt::lang::Keyword::Superset> const zmbt::expr::Superset;


variable Tan

Tangens function.

lang::SignatureUnary<::zmbt::lang::Keyword::Tan> const zmbt::expr::Tan;


variable Tanh

Hyperbolic tan.

lang::SignatureUnary<::zmbt::lang::Keyword::Tanh> const zmbt::expr::Tanh;


variable Thread

Thread id.

lang::SignatureConst<::zmbt::lang::Keyword::Thread> const zmbt::expr::Thread;

Not really a constant, but useful for branching the test input conditions.


variable ToList

Put argument into a list.

lang::SignatureUnary<::zmbt::lang::Keyword::ToList> const zmbt::expr::ToList;

Equivalent to At([""])


variable Trace

Same as id, but also prints identifier parameter to debug log.

lang::SignatureBinary<::zmbt::lang::Keyword::Trace> const zmbt::expr::Trace;


variable Transp

Transpose multidimensional list, turning rows into columns.

lang::SignatureUnary<::zmbt::lang::Keyword::Transp> const zmbt::expr::Transp;

May be used to zip sequences of equal length.


variable True

Logical true.

lang::SignatureConst<::zmbt::lang::Keyword::True> const zmbt::expr::True;


variable Truthy

Alias for Bool.

lang::SignatureUnary<::zmbt::lang::Keyword::Bool> const zmbt::expr::Truthy;


variable Try

Evaluate function and return result or null if it returns error.

lang::SignatureBinary<::zmbt::lang::Keyword::Try> const zmbt::expr::Try;


variable Tuple

Pack expressions into an tuple without evaluation.

lang::SignatureVariadic<::zmbt::lang::Keyword::Tuple> const zmbt::expr::Tuple;


variable Uncast

Reserialize decorator as decorated type.

lang::SignatureUncast const zmbt::expr::Uncast;


variable Undecorate

Alias for Uncast.

lang::SignatureUncast const zmbt::expr::Undecorate;


variable Unfold

Put results of recursive fn call on initial value into an array.

lang::SignatureBinary<::zmbt::lang::Keyword::Unfold> const zmbt::expr::Unfold;

Inference rules:

  • n | Unfold(x & f)\(\mapsto [x\_0, x\_1, ..., x\_n]\), or
  • Q(p) | Unfold(x₀ & f) \(\mapsto [x\_0, x\_1, ..., x\_k]\), where
  • \(x\_{i+1} = f(x\_i)\)
  • \(p(x\_{i}) = \top \quad \forall i \le k\)
  • \(p(x\_{i+1}) = \bot\) (exit condition)

variable Union

Set union.

lang::SignatureBinary<::zmbt::lang::Keyword::Union> const zmbt::expr::Union;


variable Uniques

Filter unique elements.

lang::SignatureUnary<::zmbt::lang::Keyword::Uniques> const zmbt::expr::Uniques;


variable Values

Extract values from object.

lang::SignatureUnary<::zmbt::lang::Keyword::Values> const zmbt::expr::Values;


variable _

Alias for Noop.

lang::SignatureConst<::zmbt::lang::Keyword::Noop> const zmbt::expr::_;



The documentation for this class was generated from the following file zmbt-framework/zmbt-framework/backends/cxx/include/zmbt/expr/api.hpp