Skip to main content

Expression

Enum Expression 

Source
pub enum Expression {
Show 100 variants AbstractLiteral(Metadata, AbstractLiteral<Expression>), Root(Metadata, Vec<Expression>), Bubble(Metadata, Moo<Expression>, Moo<Expression>), Comprehension(Metadata, Moo<Comprehension>), AbstractComprehension(Metadata, Moo<AbstractComprehension>), DominanceRelation(Metadata, Moo<Expression>), FromSolution(Metadata, Moo<Atom>), Metavar(Metadata, Ustr), Atomic(Metadata, Atom), Active(Metadata, Moo<Expression>, Name), RecordField(Metadata, Moo<Expression>, Name), UnsafeIndex(Metadata, Moo<Expression>, Vec<Expression>), SafeIndex(Metadata, Moo<Expression>, Vec<Expression>), UnsafeSlice(Metadata, Moo<Expression>, Vec<Option<Expression>>), SafeSlice(Metadata, Moo<Expression>, Vec<Option<Expression>>), InDomain(Metadata, Moo<Expression>, DomainPtr), ToInt(Metadata, Moo<Expression>), Abs(Metadata, Moo<Expression>), Sum(Metadata, Moo<Expression>), Product(Metadata, Moo<Expression>), Min(Metadata, Moo<Expression>), Max(Metadata, Moo<Expression>), Not(Metadata, Moo<Expression>), Or(Metadata, Moo<Expression>), And(Metadata, Moo<Expression>), Imply(Metadata, Moo<Expression>, Moo<Expression>), Iff(Metadata, Moo<Expression>, Moo<Expression>), Union(Metadata, Moo<Expression>, Moo<Expression>), In(Metadata, Moo<Expression>, Moo<Expression>), Intersect(Metadata, Moo<Expression>, Moo<Expression>), Supset(Metadata, Moo<Expression>, Moo<Expression>), SupsetEq(Metadata, Moo<Expression>, Moo<Expression>), Subset(Metadata, Moo<Expression>, Moo<Expression>), SubsetEq(Metadata, Moo<Expression>, Moo<Expression>), Eq(Metadata, Moo<Expression>, Moo<Expression>), Neq(Metadata, Moo<Expression>, Moo<Expression>), Geq(Metadata, Moo<Expression>, Moo<Expression>), Leq(Metadata, Moo<Expression>, Moo<Expression>), Gt(Metadata, Moo<Expression>, Moo<Expression>), Lt(Metadata, Moo<Expression>, Moo<Expression>), Subsequence(Metadata, Moo<Expression>, Moo<Expression>), Substring(Metadata, Moo<Expression>, Moo<Expression>), SafeDiv(Metadata, Moo<Expression>, Moo<Expression>), UnsafeDiv(Metadata, Moo<Expression>, Moo<Expression>), SafeMod(Metadata, Moo<Expression>, Moo<Expression>), UnsafeMod(Metadata, Moo<Expression>, Moo<Expression>), Neg(Metadata, Moo<Expression>), Factorial(Metadata, Moo<Expression>), Defined(Metadata, Moo<Expression>), Range(Metadata, Moo<Expression>), ToSet(Metadata, Moo<Expression>), ToMSet(Metadata, Moo<Expression>), ToRelation(Metadata, Moo<Expression>), UnsafePow(Metadata, Moo<Expression>, Moo<Expression>), SafePow(Metadata, Moo<Expression>, Moo<Expression>), Flatten(Metadata, Option<Moo<Expression>>, Moo<Expression>), AllDiff(Metadata, Moo<Expression>), Table(Metadata, Moo<Expression>, Moo<Expression>), NegativeTable(Metadata, Moo<Expression>, Moo<Expression>), Minus(Metadata, Moo<Expression>, Moo<Expression>), Apart(Metadata, Moo<Expression>, Moo<Expression>), Participants(Metadata, Moo<Expression>), Party(Metadata, Moo<Expression>, Moo<Expression>), Parts(Metadata, Moo<Expression>), Together(Metadata, Moo<Expression>, Moo<Expression>), FlatAbsEq(Metadata, Moo<Atom>, Moo<Atom>), FlatAllDiff(Metadata, Vec<Atom>), FlatSumGeq(Metadata, Vec<Atom>, Atom), FlatSumLeq(Metadata, Vec<Atom>, Atom), FlatIneq(Metadata, Moo<Atom>, Moo<Atom>, Box<Literal>), FlatWatchedLiteral(Metadata, Reference, Literal), FlatWeightedSumLeq(Metadata, Vec<Literal>, Vec<Atom>, Moo<Atom>), FlatWeightedSumGeq(Metadata, Vec<Literal>, Vec<Atom>, Moo<Atom>), FlatMinusEq(Metadata, Moo<Atom>, Moo<Atom>), FlatProductEq(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>), MinionDivEqUndefZero(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>), MinionModuloEqUndefZero(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>), MinionPow(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>), MinionReify(Metadata, Moo<Expression>, Atom), MinionReifyImply(Metadata, Moo<Expression>, Atom), MinionWInIntervalSet(Metadata, Atom, Vec<i32>), MinionWInSet(Metadata, Atom, Vec<i32>), MinionElementOne(Metadata, Vec<Atom>, Moo<Atom>, Moo<Atom>), AuxDeclaration(Metadata, Reference, Moo<Expression>), SATInt(Metadata, SATIntEncoding, Moo<Expression>, (i32, i32)), PairwiseSum(Metadata, Moo<Expression>, Moo<Expression>), PairwiseProduct(Metadata, Moo<Expression>, Moo<Expression>), Image(Metadata, Moo<Expression>, Moo<Expression>), ImageSet(Metadata, Moo<Expression>, Moo<Expression>), PreImage(Metadata, Moo<Expression>, Moo<Expression>), Inverse(Metadata, Moo<Expression>, Moo<Expression>), Restrict(Metadata, Moo<Expression>, Moo<Expression>), LexLt(Metadata, Moo<Expression>, Moo<Expression>), LexLeq(Metadata, Moo<Expression>, Moo<Expression>), LexGt(Metadata, Moo<Expression>, Moo<Expression>), LexGeq(Metadata, Moo<Expression>, Moo<Expression>), FlatLexLt(Metadata, Vec<Atom>, Vec<Atom>), FlatLexLeq(Metadata, Vec<Atom>, Vec<Atom>), RelationProj(Metadata, Moo<Expression>, Vec<Option<Expression>>), Card(Metadata, Moo<Expression>),
}
Expand description

Variantsยง

ยง

AbstractLiteral(Metadata, AbstractLiteral<Expression>)

ยง

Root(Metadata, Vec<Expression>)

The top of the model

ยง

Bubble(Metadata, Moo<Expression>, Moo<Expression>)

An expression representing โ€œA is valid as long as B is trueโ€ Turns into a conjunction when it reaches a boolean context

ยง

Comprehension(Metadata, Moo<Comprehension>)

A comprehension.

The inside of the comprehension opens a new scope.

ยง

AbstractComprehension(Metadata, Moo<AbstractComprehension>)

Higher-level abstract comprehension

ยง

DominanceRelation(Metadata, Moo<Expression>)

Defines dominance (โ€œSolution A is preferred over Solution Bโ€)

ยง

FromSolution(Metadata, Moo<Atom>)

fromSolution(name) - Used in dominance relation definitions

ยง

Metavar(Metadata, Ustr)

ยง

Atomic(Metadata, Atom)

ยง

Active(Metadata, Moo<Expression>, Name)

Asserts that the given variant of a variant expression is in use. See also: GroundDomain::Variant Supported by: JsonInput.

ยง

RecordField(Metadata, Moo<Expression>, Name)

Indexing into a record expression, e.g {foo = 1, bar = true}[foo] See also: GroundDomain::Record Supported by: JsonInput.

ยง

UnsafeIndex(Metadata, Moo<Expression>, Vec<Expression>)

A matrix index.

Defined iff the indices are within their respective index domains. Supported by: JsonInput.

ยง

SafeIndex(Metadata, Moo<Expression>, Vec<Expression>)

A safe matrix index.

See Expression::UnsafeIndex Supported by: SMT.

ยง

UnsafeSlice(Metadata, Moo<Expression>, Vec<Option<Expression>>)

A matrix slice: a[indices].

One of the indicies may be None, representing the dimension of the matrix we want to take a slice of. For example, for some 3d matrix a, a[1,..,2] has the indices Some(1),None,Some(2).

It is assumed that the slice only has one โ€œwild-cardโ€ dimension and thus is 1 dimensional.

Defined iff the defined indices are within their respective index domains. Supported by: JsonInput.

ยง

SafeSlice(Metadata, Moo<Expression>, Vec<Option<Expression>>)

A safe matrix slice: a[indices].

See Expression::UnsafeSlice.

ยง

InDomain(Metadata, Moo<Expression>, DomainPtr)

inDomain(x,domain) iff x is in the domain domain.

This cannot be constructed from Essence input, nor passed to a solver: this expression is mainly used during the conversion of UnsafeIndex and UnsafeSlice to SafeIndex and SafeSlice respectively.

ยง

ToInt(Metadata, Moo<Expression>)

toInt(b) casts boolean expression b to an integer.

  • If b is false, then toInt(b) == 0

  • If b is true, then toInt(b) == 1 Supported by: SMT.

ยง

Abs(Metadata, Moo<Expression>)

|x| - absolute value of x Supported by: JsonInput, SMT.

ยง

Sum(Metadata, Moo<Expression>)

sum(<vec_expr>) Supported by: JsonInput, SMT.

ยง

Product(Metadata, Moo<Expression>)

a * b * c * ... Supported by: JsonInput, SMT.

ยง

Min(Metadata, Moo<Expression>)

min(<vec_expr>) Supported by: JsonInput, SMT.

ยง

Max(Metadata, Moo<Expression>)

max(<vec_expr>) Supported by: JsonInput, SMT.

ยง

Not(Metadata, Moo<Expression>)

not(a) Supported by: JsonInput, SAT, SMT.

ยง

Or(Metadata, Moo<Expression>)

or(<vec_expr>) Supported by: JsonInput, SAT, SMT.

ยง

And(Metadata, Moo<Expression>)

and(<vec_expr>) Supported by: JsonInput, SAT, SMT.

ยง

Imply(Metadata, Moo<Expression>, Moo<Expression>)

Ensures that a->b (material implication). Supported by: JsonInput, SMT.

ยง

Iff(Metadata, Moo<Expression>, Moo<Expression>)

iff(a, b) a <-> b Supported by: JsonInput, SMT.

ยง

Union(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

In(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Intersect(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Supset(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

SupsetEq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Subset(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

SubsetEq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Eq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Neq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Geq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Leq(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Gt(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Lt(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput, SMT.

ยง

Subsequence(Metadata, Moo<Expression>, Moo<Expression>)

s subsequence t tests whether the list of values taken by s occurs in the same order in the list of values taken by t Supported by: JsonInput.

ยง

Substring(Metadata, Moo<Expression>, Moo<Expression>)

s substring t tests whether the list of values taken by s occurs in the same order and contiguously in the list of values taken by t Supported by: JsonInput.

ยง

SafeDiv(Metadata, Moo<Expression>, Moo<Expression>)

Division after preventing division by zero, usually with a bubble Supported by: SMT.

ยง

UnsafeDiv(Metadata, Moo<Expression>, Moo<Expression>)

Division with a possibly undefined value (division by 0) Supported by: JsonInput.

ยง

SafeMod(Metadata, Moo<Expression>, Moo<Expression>)

Modulo after preventing mod 0, usually with a bubble Supported by: SMT.

ยง

UnsafeMod(Metadata, Moo<Expression>, Moo<Expression>)

Modulo with a possibly undefined value (mod 0) Supported by: JsonInput.

ยง

Neg(Metadata, Moo<Expression>)

Negation: -x Supported by: JsonInput, SMT.

ยง

Factorial(Metadata, Moo<Expression>)

Factorial: x! or โ€™factorial(x)` Supported by: JsonInput.

ยง

Defined(Metadata, Moo<Expression>)

Set of domain values function is defined for Supported by: JsonInput.

ยง

Range(Metadata, Moo<Expression>)

Set of codomain values function is defined for Supported by: JsonInput.

ยง

ToSet(Metadata, Moo<Expression>)

Supported by: JsonInput.

ยง

ToMSet(Metadata, Moo<Expression>)

Supported by: JsonInput.

ยง

ToRelation(Metadata, Moo<Expression>)

Supported by: JsonInput.

ยง

UnsafePow(Metadata, Moo<Expression>, Moo<Expression>)

Unsafe powerx**y (possibly undefined)

Defined when (X!=0 \/ Y!=0) /\ Y>=0 Supported by: JsonInput.

ยง

SafePow(Metadata, Moo<Expression>, Moo<Expression>)

UnsafePow after preventing undefinedness

ยง

Flatten(Metadata, Option<Moo<Expression>>, Moo<Expression>)

Flatten matrix operator flatten(M) or flatten(n, M) where M is a matrix and n is an optional integer argument indicating depth of flattening

ยง

AllDiff(Metadata, Moo<Expression>)

allDiff(<vec_expr>) Supported by: JsonInput.

ยง

Table(Metadata, Moo<Expression>, Moo<Expression>)

table([x1, x2, ...], [[r11, r12, ...], [r21, r22, ...], ...])

Represents a positive table constraint: the tuple [x1, x2, ...] must match one of the allowed rows. Supported by: JsonInput.

ยง

NegativeTable(Metadata, Moo<Expression>, Moo<Expression>)

negativeTable([x1, x2, ...], [[r11, r12, ...], [r21, r22, ...], ...])

Represents a negative table constraint: the tuple [x1, x2, ...] must NOT match any of the forbidden rows. Supported by: JsonInput.

ยง

Minus(Metadata, Moo<Expression>, Moo<Expression>)

Binary subtraction operator

This is a parser-level construct, and is immediately normalised to Sum([a,-b]). TODO: make this compatible with Set Difference calculations - need to change return type and domain for this expression and write a set comprehension rule. have already edited minus_to_sum to prevent this from applying to sets Supported by: JsonInput.

ยง

Apart(Metadata, Moo<Expression>, Moo<Expression>)

Partition Operator: test if a list of elements are not all contained in one part of the partition First Expr Arg is a list of elements Second Expr Arg is the partition Supported by: JsonInput.

ยง

Participants(Metadata, Moo<Expression>)

Partition Operator: union of all parts of a partition Expr Arg is a partition Supported by: JsonInput.

ยง

Party(Metadata, Moo<Expression>, Moo<Expression>)

Partition Operator: part of partition that contains specified element First Expr Arg is an element that should be contained Second Expr Arg is the partition that should contain that element Supported by: JsonInput.

ยง

Parts(Metadata, Moo<Expression>)

Partition Operator: partition to its set of parts Expr Arg is the partition from which the parts come from Supported by: JsonInput.

ยง

Together(Metadata, Moo<Expression>, Moo<Expression>)

Partition Operator: test if a list of elements are all in the same part of the partition First Expr Arg is the list of elements to test with Second Expr Arg is the partition to test on Supported by: JsonInput.

ยง

FlatAbsEq(Metadata, Moo<Atom>, Moo<Atom>)

Ensures that x=|y| i.e. x is the absolute value of y.

Low-level Minion constraint.

ยงSee also

ยง

FlatAllDiff(Metadata, Vec<Atom>)

Ensures that alldiff([a,b,...]).

Low-level Minion constraint.

ยงSee also

ยง

FlatSumGeq(Metadata, Vec<Atom>, Atom)

Ensures that sum(vec) >= x.

Low-level Minion constraint.

ยงSee also

ยง

FlatSumLeq(Metadata, Vec<Atom>, Atom)

Ensures that sum(vec) <= x.

Low-level Minion constraint.

ยงSee also

ยง

FlatIneq(Metadata, Moo<Atom>, Moo<Atom>, Box<Literal>)

ineq(x,y,k) ensures that x <= y + k.

Low-level Minion constraint.

ยงSee also

ยง

FlatWatchedLiteral(Metadata, Reference, Literal)

w-literal(x,k) ensures that x == k, where x is a variable and k a constant.

Low-level Minion constraint.

This is a low-level Minion constraint and you should probably use Eq instead. The main use of w-literal is to convert boolean variables to constraints so that they can be used inside watched-and and watched-or.

ยงSee also

ยง

FlatWeightedSumLeq(Metadata, Vec<Literal>, Vec<Atom>, Moo<Atom>)

weightedsumleq(cs,xs,total) ensures that cs.xs <= total, where cs.xs is the scalar dot product of cs and xs.

Low-level Minion constraint.

Represents a weighted sum of the form ax + by + cz + ...

ยงSee also

ยง

FlatWeightedSumGeq(Metadata, Vec<Literal>, Vec<Atom>, Moo<Atom>)

weightedsumgeq(cs,xs,total) ensures that cs.xs >= total, where cs.xs is the scalar dot product of cs and xs.

Low-level Minion constraint.

Represents a weighted sum of the form ax + by + cz + ...

ยงSee also

ยง

FlatMinusEq(Metadata, Moo<Atom>, Moo<Atom>)

Ensures that x =-y, where x and y are atoms.

Low-level Minion constraint.

ยงSee also

ยง

FlatProductEq(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>)

Ensures that x*y=z.

Low-level Minion constraint.

ยงSee also

ยง

MinionDivEqUndefZero(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>)

Ensures that floor(x/y)=z. Always true when y=0.

Low-level Minion constraint.

ยงSee also

ยง

MinionModuloEqUndefZero(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>)

Ensures that x%y=z. Always true when y=0.

Low-level Minion constraint.

ยงSee also

ยง

MinionPow(Metadata, Moo<Atom>, Moo<Atom>, Moo<Atom>)

Ensures that x**y = z.

Low-level Minion constraint.

This constraint is false when y<0 except for 1**y=1 and (-1)**y=z (where z is 1 if y is odd and z is -1 if y is even).

ยงSee also

ยง

MinionReify(Metadata, Moo<Expression>, Atom)

reify(constraint,r) ensures that r=1 iff constraint is satisfied, where r is a 0/1 variable.

Low-level Minion constraint.

ยงSee also

ยง

MinionReifyImply(Metadata, Moo<Expression>, Atom)

reifyimply(constraint,r) ensures that r->constraint, where r is a 0/1 variable. variable.

Low-level Minion constraint.

ยงSee also

ยง

MinionWInIntervalSet(Metadata, Atom, Vec<i32>)

w-inintervalset(x, [a1,a2, b1,b2, โ€ฆ ]) ensures that the value of x belongs to one of the intervals {a1,โ€ฆ,a2}, {b1,โ€ฆ,b2} etc.

The list of intervals must be given in numerical order.

Low-level Minion constraint.

ยงSee also

ยง

MinionWInSet(Metadata, Atom, Vec<i32>)

w-inset(x, [v1, v2, โ€ฆ ]) ensures that the value of x is one of the explicitly given values v1, v2, etc.

This constraint enforces membership in a specific set of discrete values rather than intervals.

The list of values must be given in numerical order.

Low-level Minion constraint.

ยงSee also

ยง

MinionElementOne(Metadata, Vec<Atom>, Moo<Atom>, Moo<Atom>)

element_one(vec, i, e) specifies that vec[i] = e. This implies that i is in the range [1..len(vec)].

Low-level Minion constraint.

ยงSee also

ยง

AuxDeclaration(Metadata, Reference, Moo<Expression>)

Declaration of an auxiliary variable.

As with Savile Row, we semantically distinguish this from Eq. Supported by: Minion.

ยง

SATInt(Metadata, SATIntEncoding, Moo<Expression>, (i32, i32))

This expression is for encoding ints for the SAT solver, it stores the encoding type, the vector of booleans and the min/max for the int. Supported by: SAT.

ยง

PairwiseSum(Metadata, Moo<Expression>, Moo<Expression>)

Addition over a pair of expressions (i.e. a + b) rather than a vec-expr like Expression::Sum. This is for compatibility with backends that do not support addition over vectors. Supported by: SMT.

ยง

PairwiseProduct(Metadata, Moo<Expression>, Moo<Expression>)

Multiplication over a pair of expressions (i.e. a * b) rather than a vec-expr like Expression::Product. This is for compatibility with backends that do not support multiplication over vectors. Supported by: SMT.

ยง

Image(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

ImageSet(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

PreImage(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Inverse(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

Restrict(Metadata, Moo<Expression>, Moo<Expression>)

Supported by: JsonInput.

ยง

LexLt(Metadata, Moo<Expression>, Moo<Expression>)

Lexicographical < between two matrices.

A <lex B iff: A[i] < B[i] for some i /\ (A[j] > B[j] for some j -> i < j) I.e. A must be less than B at some index i, and if it is greater than B at another index j, then j comes after i. I.e. A must be greater than B at the first index where they differ.

E.g. [1, 1] <lex [2, 1] and [1, 1] <lex [1, 2]

ยง

LexLeq(Metadata, Moo<Expression>, Moo<Expression>)

Lexicographical <= between two matrices

ยง

LexGt(Metadata, Moo<Expression>, Moo<Expression>)

Lexicographical > between two matrices This is a parser-level construct, and is immediately normalised to LexLt(b, a)

ยง

LexGeq(Metadata, Moo<Expression>, Moo<Expression>)

Lexicographical >= between two matrices This is a parser-level construct, and is immediately normalised to LexLeq(b, a)

ยง

FlatLexLt(Metadata, Vec<Atom>, Vec<Atom>)

Low-level minion constraint. See Expression::LexLt

ยง

FlatLexLeq(Metadata, Vec<Atom>, Vec<Atom>)

Low-level minion constraint. See Expression::LexLeq

ยง

RelationProj(Metadata, Moo<Expression>, Vec<Option<Expression>>)

Alters the shape of relations by projection Supported by: JsonInput.

ยง

Card(Metadata, Moo<Expression>)

Cardinality of a collection type Supported by: JsonInput.

Implementationsยง

Sourceยง

impl Expression

Source

pub fn domain_of(&self) -> Option<DomainPtr>

Returns the possible values of the expression, recursing to leaf expressions

Source

pub fn meta_ref(&self) -> &Metadata

Returns a reference to this expressionโ€™s metadata without cloning.

Source

pub fn get_meta(&self) -> Metadata

Source

pub fn set_meta(&self, meta: Metadata)

Source

pub fn is_safe(&self) -> bool

Checks whether this expression is safe.

An expression is unsafe if can be undefined, or if any of its children can be undefined.

Unsafe expressions are (typically) prefixed with Unsafe in our AST, and can be made safe through the use of bubble rules.

Source

pub fn is_associative_commutative_operator(&self) -> bool

True if the expression is an associative and commutative operator

Source

pub fn is_matrix_literal(&self) -> bool

True if the expression is a matrix literal.

This is true for both forms of matrix literals: those with elements of type Literal and Expression.

Source

pub fn identical_atom_to(&self, other: &Expression) -> bool

True iff self and other are both atomic and identical.

This method is useful to cheaply check equivalence. Assuming CSE is enabled, any unifiable expressions will be rewritten to a common variable. This is much cheaper than checking the entire subtrees of self and other.

Source

pub fn unwrap_list(&self) -> Option<Vec<Expression>>

If the expression is a list, returns a copied vector of the inner expressions.

A list is any a matrix with the domain int(1..). This includes matrix literals without any explicitly specified domain.

Source

pub fn unwrap_matrix_unchecked(self) -> Option<(Vec<Expression>, DomainPtr)>

If the expression is a matrix, gets it elements and index domain.

Consider using the safer Expression::unwrap_list instead.

It is generally undefined to edit the length of a matrix unless it is a list (as defined by Expression::unwrap_list). Users of this function should ensure that, if the matrix is reconstructed, the index domain and the number of elements in the matrix remain the same.

Source

pub fn extend_root(self, exprs: Vec<Expression>) -> Expression

For a Root expression, extends the inner vec with the given vec.

ยงPanics

Panics if the expression is not Root.

Source

pub fn into_literal(self) -> Option<Literal>

Converts the expression to a literal, if possible.

Source

pub fn to_ac_operator_kind(&self) -> Option<ACOperatorKind>

If this expression is an associative-commutative operator, return its ACOperatorKind.

Source

pub fn universe_categories(&self) -> HashSet<Category>

Returns the categories of all sub-expressions of self.

Trait Implementationsยง

Sourceยง

impl Biplate<AbstractComprehension> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<AbstractComprehension>, Box<dyn Fn(Tree<AbstractComprehension>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<AbstractLiteral<Expression>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<AbstractLiteral<Expression>>, Box<dyn Fn(Tree<AbstractLiteral<Expression>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<AbstractLiteral<Literal>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<AbstractLiteral<Literal>>, Box<dyn Fn(Tree<AbstractLiteral<Literal>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Atom> for Expression

Sourceยง

fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Comprehension> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Comprehension>, Box<dyn Fn(Tree<Comprehension>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<DeclarationPtr> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<DeclarationPtr>, Box<dyn Fn(Tree<DeclarationPtr>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for AbstractComprehension

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> AbstractComprehension>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for ComprehensionLetting

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> ComprehensionLetting>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Generator

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Generator>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for DomainGenerator

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> DomainGenerator>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for ExpressionGenerator

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> ExpressionGenerator>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Atom

Sourceยง

fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Atom>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for ComprehensionQualifier

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> ComprehensionQualifier>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Comprehension

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Comprehension>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Declaration

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Declaration>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for DeclarationKind

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> DeclarationKind>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Domain

Sourceยง

fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Domain>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for IntVal

Sourceยง

fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> IntVal>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for UnresolvedDomain

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> UnresolvedDomain>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Literal

Sourceยง

fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Literal>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for Model

Sourceยง

fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Self>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Expression> for SymbolTable

Sourceยง

fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Self>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Field<Expression>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Field<Expression>>, Box<dyn Fn(Tree<Field<Expression>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Field<Literal>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Field<Literal>>, Box<dyn Fn(Tree<Field<Literal>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Literal> for Expression

Sourceยง

fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Metadata> for Expression

Sourceยง

fn biplate(&self) -> (Tree<Metadata>, Box<dyn Fn(Tree<Metadata>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Model> for Expression

Sourceยง

fn biplate(&self) -> (Tree<Model>, Box<dyn Fn(Tree<Model>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Moo<Domain>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<DomainPtr>, Box<dyn Fn(Tree<DomainPtr>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Name> for Expression

Sourceยง

fn biplate(&self) -> (Tree<Name>, Box<dyn Fn(Tree<Name>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Option<Expression>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Option<Expression>>, Box<dyn Fn(Tree<Option<Expression>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Reference> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Reference>, Box<dyn Fn(Tree<Reference>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<SymbolTable> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<SymbolTable>, Box<dyn Fn(Tree<SymbolTable>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<SymbolTablePtr> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl Biplate<Vec<Expression>> for Expression

Sourceยง

fn biplate( &self, ) -> (Tree<Vec<Expression>>, Box<dyn Fn(Tree<Vec<Expression>>) -> Expression>)

Definition of a Biplate. Read more
ยง

fn with_children_bi(&self, children: VecDeque<To>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self

Biplate variant of [Uniplate::descend] Read more
ยง

fn universe_bi(&self) -> VecDeque<To>

Gets all children of a node, including itself and all children. Read more
ยง

fn children_bi(&self) -> VecDeque<To>

Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
ยง

fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self

Applies the given function to all nodes bottom up. Read more
ยง

fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
ยง

fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more
Sourceยง

impl CacheHashable for Expression

Sourceยง

fn invalidate_cache(&self)

Invalidate the cached hash for this node only. Used by mark_dirty_to_root when walking up ancestors after a child replacement.
Sourceยง

fn invalidate_cache_recursive(&self)

Invalidate the cached hash for this node and all descendants. Used on replacement subtrees after rule application to clear stale hashes from cloned-and-reassembled nodes.
Sourceยง

fn get_cached_hash(&self) -> u64

Return the cached hash, computing and storing it if not yet cached.
Sourceยง

fn calculate_hash(&self) -> u64

Compute the hash from scratch, store it, and return it.
Sourceยง

impl CategoryOf for Expression

Sourceยง

fn category_of(&self) -> Category

Gets the Category of a term.
Sourceยง

impl Clone for Expression

Sourceยง

fn clone(&self) -> Expression

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยง

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

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for Expression

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl<'de> Deserialize<'de> for Expression

Sourceยง

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl Display for Expression

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl Eq for Expression

Sourceยง

impl From<AbstractLiteral<Expression>> for Expression

Sourceยง

fn from(value: AbstractLiteral<Expression>) -> Self

Converts to this type from the input type.
Sourceยง

impl From<Atom> for Expression

Sourceยง

fn from(value: Atom) -> Self

Converts to this type from the input type.
Sourceยง

impl From<Literal> for Expression

Sourceยง

fn from(value: Literal) -> Self

Converts to this type from the input type.
Sourceยง

impl From<Moo<Expression>> for Expression

Sourceยง

fn from(val: Moo<Expression>) -> Self

Converts to this type from the input type.
Sourceยง

impl From<Reference> for Expression

Sourceยง

fn from(value: Reference) -> Self

Converts to this type from the input type.
Sourceยง

impl From<bool> for Expression

Sourceยง

fn from(b: bool) -> Self

Converts to this type from the input type.
Sourceยง

impl From<i32> for Expression

Sourceยง

fn from(i: i32) -> Self

Converts to this type from the input type.
Sourceยง

impl Hash for Expression

Sourceยง

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 ยท Sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Sourceยง

impl MatrixValue for Expression

Sourceยง

fn as_nested_matrix(&self) -> Option<&AbstractLiteral<Expr>>

If this element is a nested matrix, return a reference to it
Sourceยง

fn into_nested_matrix(self) -> Result<AbstractLiteral<Expr>, Self>

If this element is a nested matrix, consume it and return the matrix
Sourceยง

impl PartialEq for Expression

Sourceยง

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

Equality operator ==. Read more
1.0.0 (const: unstable) ยท Sourceยง

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

Inequality operator !=. Read more
Sourceยง

impl Quine for Expression

Sourceยง

impl Rule<Expression, Rc<RefCell<MorphState>>> for Rule<'_>

Sourceยง

fn apply( &self, commands: &mut Commands<Expression, Rc<RefCell<MorphState>>>, subtree: &Expression, meta: &Rc<RefCell<MorphState>>, ) -> Option<Expression>

Applies the rule to the given subtree and returns the result if applicable. Read more
Sourceยง

fn name(&self) -> &str

Return the name of the rule, will default to anonymous if not specified.
Sourceยง

fn applicable_to(&self) -> Option<Vec<usize>>

None -> Rule applies to all nodes Some(ids) -> Rule only applies to nodes with these discriminant ids
Sourceยง

impl Serialize for Expression

Sourceยง

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Sourceยง

impl StructuralPartialEq for Expression

Sourceยง

impl<'a> TryFrom<&'a Box<Expression>> for &'a Atom

Sourceยง

type Error = &'static str

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

fn try_from(value: &'a Box<Expression>) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl<'a> TryFrom<&'a Expression> for &'a Atom

Sourceยง

type Error = &'static str

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

fn try_from(value: &'a Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<&Expression> for ACOperatorKind

Sourceยง

type Error = ()

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

fn try_from(expr: &Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<&Expression> for i32

Sourceยง

type Error = ()

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

fn try_from(value: &Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<Box<Expression>> for ACOperatorKind

Sourceยง

type Error = ()

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

fn try_from(value: Box<Expression>) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<Box<Expression>> for Atom

Sourceยง

type Error = &'static str

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

fn try_from(value: Box<Expression>) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<Expression> for ACOperatorKind

Sourceยง

type Error = ()

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

fn try_from(value: Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<Expression> for Atom

Sourceยง

type Error = &'static str

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

fn try_from(value: Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<Expression> for i32

Sourceยง

type Error = ()

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

fn try_from(value: Expression) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<IntVal> for Expression

Sourceยง

type Error = DomainOpError

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

fn try_from(value: IntVal) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl Typeable for Expression

Sourceยง

impl Uniplate for Expression

Sourceยง

fn uniplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Expression>)

Definition of a Uniplate. Read more
ยง

fn descend(&self, op: &impl Fn(Self) -> Self) -> Self

Applies a function to all direct children of this Read more
ยง

fn universe(&self) -> VecDeque<Self>

Gets all children of a node, including itself and all children. Read more
ยง

fn children(&self) -> VecDeque<Self>

Gets the direct children (maximal substructures) of a node.
ยง

fn with_children(&self, children: VecDeque<Self>) -> Self

Reconstructs the node with the given children. Read more
ยง

fn transform(&self, f: &impl Fn(Self) -> Self) -> Self

Applies the given function to all nodes bottom up.
ยง

fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self

Rewrites by applying a rule everywhere it can.
ยง

fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T

Performs a fold-like computation on each value. Read more
ยง

fn holes(&self) -> impl Iterator<Item = (Self, impl Fn(Self))>

Returns an iterator over all direct children of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value.
ยง

fn contexts(&self) -> impl Iterator<Item = (Self, impl Fn(Self))>

Returns an iterator over the universe of the input, paired with a function that โ€œfills the holeโ€ where the child was with a new value. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Sourceยง

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

Sourceยง

fn __clone_box(&self, _: Private) -> *mut ()

ยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

ยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
ยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

ยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

impl<T> Instrument for T

ยง

fn instrument(self, span: Span) -> Instrumented<Self> โ“˜

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
ยง

fn in_current_span(self) -> Instrumented<Self> โ“˜

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

ยง

impl<T, A> IntoAst<A> for T
where T: Into<A>, A: Ast,

ยง

fn into_ast(self, _a: &A) -> A

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
ยง

impl<T> Pointable for T

ยง

const ALIGN: usize

The alignment of pointer.
ยง

type Init = T

The type for initializers.
ยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
ยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
ยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
ยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToString for T
where T: Display + ?Sized,

Sourceยง

fn to_string(&self) -> String

Converts the given value to a String. 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.
ยง

impl<T> WithSubscriber for T

ยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โ“˜
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
ยง

fn with_current_subscriber(self) -> WithDispatch<Self> โ“˜

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more

Layoutยง

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's โ€œType Layoutโ€ chapter for details on type layout guarantees.

Size: 112 bytes

Size for each variant:

  • AbstractLiteral: 87 bytes
  • Root: 79 bytes
  • Bubble: 71 bytes
  • Comprehension: 63 bytes
  • AbstractComprehension: 63 bytes
  • DominanceRelation: 63 bytes
  • FromSolution: 63 bytes
  • Metavar: 63 bytes
  • Atomic: 87 bytes
  • Active: 95 bytes
  • RecordField: 95 bytes
  • UnsafeIndex: 87 bytes
  • SafeIndex: 87 bytes
  • UnsafeSlice: 87 bytes
  • SafeSlice: 87 bytes
  • InDomain: 71 bytes
  • ToInt: 63 bytes
  • Abs: 63 bytes
  • Sum: 63 bytes
  • Product: 63 bytes
  • Min: 63 bytes
  • Max: 63 bytes
  • Not: 63 bytes
  • Or: 63 bytes
  • And: 63 bytes
  • Imply: 71 bytes
  • Iff: 71 bytes
  • Union: 71 bytes
  • In: 71 bytes
  • Intersect: 71 bytes
  • Supset: 71 bytes
  • SupsetEq: 71 bytes
  • Subset: 71 bytes
  • SubsetEq: 71 bytes
  • Eq: 71 bytes
  • Neq: 71 bytes
  • Geq: 71 bytes
  • Leq: 71 bytes
  • Gt: 71 bytes
  • Lt: 71 bytes
  • Subsequence: 71 bytes
  • Substring: 71 bytes
  • SafeDiv: 71 bytes
  • UnsafeDiv: 71 bytes
  • SafeMod: 71 bytes
  • UnsafeMod: 71 bytes
  • Neg: 63 bytes
  • Factorial: 63 bytes
  • Defined: 63 bytes
  • Range: 63 bytes
  • ToSet: 63 bytes
  • ToMSet: 63 bytes
  • ToRelation: 63 bytes
  • UnsafePow: 71 bytes
  • SafePow: 71 bytes
  • Flatten: 71 bytes
  • AllDiff: 63 bytes
  • Table: 71 bytes
  • NegativeTable: 71 bytes
  • Minus: 71 bytes
  • Apart: 71 bytes
  • Participants: 63 bytes
  • Party: 71 bytes
  • Parts: 63 bytes
  • Together: 71 bytes
  • FlatAbsEq: 71 bytes
  • FlatAllDiff: 79 bytes
  • FlatSumGeq: 111 bytes
  • FlatSumLeq: 111 bytes
  • FlatIneq: 79 bytes
  • FlatWatchedLiteral: 95 bytes
  • FlatWeightedSumLeq: 111 bytes
  • FlatWeightedSumGeq: 111 bytes
  • FlatMinusEq: 71 bytes
  • FlatProductEq: 79 bytes
  • MinionDivEqUndefZero: 79 bytes
  • MinionModuloEqUndefZero: 79 bytes
  • MinionPow: 79 bytes
  • MinionReify: 95 bytes
  • MinionReifyImply: 95 bytes
  • MinionWInIntervalSet: 111 bytes
  • MinionWInSet: 111 bytes
  • MinionElementOne: 95 bytes
  • AuxDeclaration: 71 bytes
  • SATInt: 71 bytes
  • PairwiseSum: 71 bytes
  • PairwiseProduct: 71 bytes
  • Image: 71 bytes
  • ImageSet: 71 bytes
  • PreImage: 71 bytes
  • Inverse: 71 bytes
  • Restrict: 71 bytes
  • LexLt: 71 bytes
  • LexLeq: 71 bytes
  • LexGt: 71 bytes
  • LexGeq: 71 bytes
  • FlatLexLt: 103 bytes
  • FlatLexLeq: 103 bytes
  • RelationProj: 87 bytes
  • Card: 63 bytes