docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
Logical Operations

Functions for building and evaluating logical conditions. More...

Functions

Condition sdfg::symbolic::And (const Condition lhs, const Condition rhs)
 Logical AND of two conditions.
Condition sdfg::symbolic::Or (const Condition lhs, const Condition rhs)
 Logical OR of two conditions.
Condition sdfg::symbolic::Not (const Condition expr)
 Logical NOT (negation) of a condition.
bool sdfg::symbolic::is_true (const Expression expr)
 Tests if an expression evaluates to true.
bool sdfg::symbolic::is_false (const Expression expr)
 Tests if an expression evaluates to false.

Detailed Description

Functions for building and evaluating logical conditions.

These functions construct boolean conditions used in control flow (if-else statements) and loop guards. They follow standard boolean logic semantics.

Function Documentation

◆ And()

Condition sdfg::symbolic::And ( const Condition lhs,
const Condition rhs )

Logical AND of two conditions.

Parameters
lhsLeft-hand side condition
rhsRight-hand side condition
Returns
A condition representing (lhs AND rhs)
auto cond = symbolic::And(symbolic::Ge(x, zero()), symbolic::Lt(x, integer(10)));
// Represents: x >= 0 AND x < 10
Condition Lt(const Expression lhs, const Expression rhs)
Less-than comparison.
Condition Ge(const Expression lhs, const Expression rhs)
Greater-than-or-equal comparison.
Integer integer(int64_t value)
Creates an integer constant.
Integer zero()
Creates the integer constant 0.
Condition And(const Condition lhs, const Condition rhs)
Logical AND of two conditions.

◆ is_false()

bool sdfg::symbolic::is_false ( const Expression expr)

Tests if an expression evaluates to false.

Parameters
exprExpression to test
Returns
true if expr is the constant false value

◆ is_true()

bool sdfg::symbolic::is_true ( const Expression expr)

Tests if an expression evaluates to true.

Parameters
exprExpression to test
Returns
true if expr is the constant true value

◆ Not()

Condition sdfg::symbolic::Not ( const Condition expr)

Logical NOT (negation) of a condition.

Parameters
exprCondition to negate
Returns
A condition representing NOT expr

◆ Or()

Condition sdfg::symbolic::Or ( const Condition lhs,
const Condition rhs )

Logical OR of two conditions.

Parameters
lhsLeft-hand side condition
rhsRight-hand side condition
Returns
A condition representing (lhs OR rhs)