# Constraints module

Expressing constraints on abstract expressions.

This module implements the classes used to represent arithmetical and logical constraints on abstract expressions.

## ❱ Classes

- class maat::ConstraintObject
- Constraint object representing constraints between symbolic expressions. This class should never be manipulated directly but used transparently through Constraint instances.

## ❱ Enums

## ❱ Typedefs

- using Constraint = std::shared_ptr<ConstraintObject>
- Shared pointer to an constraint object. Constraints should be manipulated only through 'Constraint' instances. Unless used in Maat's core internals, the base class ConstraintObject and its child classes should never be used directly.

## ❱ Functions

- auto operator<<(std::ostream& os, const Constraint& constr) -> std::ostream&
- Print a constraint to an out stream.
- auto operator==(Expr left, Expr right) -> Constraint
- Create equality constraint.
- auto operator==(Expr left, cst_t right) -> Constraint
- Create equality constraint.
- auto operator==(cst_t left, Expr right) -> Constraint
- Create equality constraint.
- auto operator!=(Expr left, Expr right) -> Constraint
- Create a not-equal constraint.
- auto operator!=(Expr left, cst_t right) -> Constraint
- Create a not-equal constraint.
- auto operator!=(cst_t left, Expr right) -> Constraint
- Create a not-equal constraint.
- auto operator<=(Expr left, Expr right) -> Constraint
- Create a signed less-or-equal constraint.
- auto operator<=(Expr left, cst_t right) -> Constraint
- Create a signed less-or-equal constraint.
- auto operator<=(cst_t left, Expr right) -> Constraint
- Create a signed less-or-equal constraint.
- auto operator<(Expr left, Expr right) -> Constraint
- Create a signed less-than constraint.
- auto operator<(Expr left, cst_t right) -> Constraint
- Create a signed less-than constraint.
- auto operator<(cst_t left, Expr right) -> Constraint
- Create a signed less-than constraint.
- auto operator>=(Expr left, Expr right) -> Constraint
- Create a signed greater or equal constraint.
- auto operator>=(Expr left, cst_t right) -> Constraint
- Create a signed greater or equal constraint.
- auto operator>=(cst_t left, Expr right) -> Constraint
- Create a signed greater or equal constraint.
- auto operator>(Expr left, Expr right) -> Constraint
- Create a signed greater-than constraint.
- auto operator>(Expr left, cst_t right) -> Constraint
- Create a signed greater-than constraint.
- auto operator>(cst_t left, Expr right) -> Constraint
- Create a signed greater-than constraint.
- auto ULE(Expr left, Expr right) -> Constraint
- Create an unsigned less or equal constraint.
- auto ULE(Expr left, ucst_t right) -> Constraint
- Create an unsigned less or equal constraint.
- auto ULE(ucst_t left, Expr right) -> Constraint
- Create an unsigned less or equal constraint.
- auto ULT(Expr left, Expr right) -> Constraint
- Create an unsigned less-than constraint.
- auto ULT(Expr left, ucst_t right) -> Constraint
- Create an unsigned less-than constraint.
- auto ULT(ucst_t left, Expr right) -> Constraint
- Create an unsigned less-than constraint.
- auto operator&&(Constraint left, Constraint right) -> Constraint
- Combine constraints (
*left*AND*right*) - auto operator||(Constraint left, Constraint right) -> Constraint
- Combine constraints (
*left*OR*right*)

## ❱ Enum documentation

### enum class ConstraintType

Different types of logical and arithmetic constraints.

Enumerators | |
---|---|

AND |
Logical AND. |

OR |
Logical OR. |

EQ |
Arithmetic EQUAL. |

NEQ |
Arithmetic NOT EQUAL. |

LE |
Arithmetic SIGNED LESS OR EQUAL. |

LT |
Arithmetic SIGNED LESS. |

ULE |
Arithmetic UNSIGNED LESS OR EQUAL. |

ULT |
Arithmetic UNSIGNED LESS. |