Enum ExpressionKind

Source
pub enum ExpressionKind {
    LoadConstant(Constant),
    ArithLog(ArithLogOp, Vec<Expression>),
    StreamAccess(StreamReference, StreamAccessKind, Vec<Expression>),
    ParameterAccess(StreamReference, usize),
    LambdaParameterAccess {
        wref: WindowReference,
        pref: usize,
    },
    Ite {
        condition: Box<Expression>,
        consequence: Box<Expression>,
        alternative: Box<Expression>,
    },
    Tuple(Vec<Expression>),
    TupleAccess(Box<Expression>, usize),
    Function(FnExprKind),
    Widen(WidenExprKind),
    Default {
        expr: Box<Expression>,
        default: Box<Expression>,
    },
}
Expand description

The kinds of an Expression of the RtLolaHir.

Variants§

§

LoadConstant(Constant)

Loading a Constant

§

ArithLog(ArithLogOp, Vec<Expression>)

Applying arithmetic or logic operation

The first argument contains the operator of type ArithLogOp, the second arguments contains the arguments of the operation, which are Expressions. The vectors is structured as: Unary: 1st argument -> operand Binary: 1st argument -> lhs, 2nd argument -> rhs n-ary: kth argument -> kth operand

§

StreamAccess(StreamReference, StreamAccessKind, Vec<Expression>)

Accessing another stream

A stream access has the following arguments:

  • the StreamReference of the stream that is accessed
  • the StreamAccessKind of the stream access, e.g. an offset access
  • the argmuents for parametrized stream accesses. This vector is empty if the stream that is accessed is not parametrized.
§

ParameterAccess(StreamReference, usize)

Accessing the n’th parameter of a parameterized stream

This kind represents the access of a parameterized stream. For this, we use the folloing arguments:

  • the first argument contains the StreamReference of the parametrized stream that is accessed
  • the second argument contains the index of the parameter.
§

LambdaParameterAccess

This kind represents the access to a lambda parameter

Fields

§wref: WindowReference

Reference to the instance aggregation using the lambda function

§pref: usize

Reference to the parameter

§

Ite

An if-then-else expression

If the condition evaluates to true, the consequence is executed otherwise the alternative. All arguments are an Expression.

Fields

§condition: Box<Expression>

The condition of the if-then-else expression.

§consequence: Box<Expression>

The consequence of the if-then-else expression.

§alternative: Box<Expression>

The alternative of the if-then-else expression.

§

Tuple(Vec<Expression>)

A tuple expression.

§

TupleAccess(Box<Expression>, usize)

Represents an access to a tuple element

The second argument indicates the index of the accessed element, while the first produces the accessed tuple.

§

Function(FnExprKind)

A function call with its monomorphic type

§

Widen(WidenExprKind)

A function call to widen the type of an Expression

§

Default

Represents the transformation of an optional value into a “normal” one

Fields

§expr: Box<Expression>

The expression that results in an optional value

§default: Box<Expression>

An infallible expression providing a default value of expr evaluates to None

Trait Implementations§

Source§

impl Clone for ExpressionKind

Source§

fn clone(&self) -> ExpressionKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExpressionKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ExpressionKind

Source§

fn eq(&self, other: &ExpressionKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ExpressionKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.