tvm
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
tvm::tirx::StructuralMutatorWithConstraintContextObj Class Reference

Mutates values using their structural mutation behavior while maintaining the constraint context relevant to each callback. Constraints use the resulting expressions and bindings. This semantic base contains only context state; concrete structural engines own the identity-remap environment. More...

#include <structural_mutate_with_constraint_context.h>

Inheritance diagram for tvm::tirx::StructuralMutatorWithConstraintContextObj:
Collaboration diagram for tvm::tirx::StructuralMutatorWithConstraintContextObj:

Public Types

using MutatorObjType = StructuralMutatorWithConstraintContextObj
 
using StateTupleType = std::tuple< const sym::ConstraintContext & >
 

Public Member Functions

void AppendConstraint (const sym::Constraint &constraint)
 Add a fact to the current scope, creating its child context on the first append.
 
template<typename F >
auto WithConstraintScope (F &&f) -> decltype(f())
 Run an Expected-returning callback in a constraint scope. Use AppendConstraint to add facts. Scopes without facts keep the incoming context. Success and visit interrupts restore the incoming position. Terminal errors propagate without restoration; discard the traversal context after failure.
 
ffi::Expected< ffi::UnchangedOr< ffi::Any > > DefaultMutateExpected (ffi::AnyView value, ffi::InplaceMode mode=ffi::InplaceMode::kDisallow) noexcept
 Default path, bypassing this node's engine callback.
 
 TVM_FFI_DECLARE_OBJECT_INFO ("tirx.StructuralMutatorWithConstraintContext", StructuralMutatorWithConstraintContextObj, ffi::StructuralMutatorObj)
 

Public Attributes

sym::ConstraintContext constraints
 Active effective premises. Consumers must not append during traversal. Retain this handle and constraints->LocalSize() for a stable position, or use constraints->ToArray() for an independent sequence of handles. The context itself remains live.
 

Protected Member Functions

 StructuralMutatorWithConstraintContextObj (const ffi::StructuralMutatorVTable *vtable)
 
StateTupleType StateTuple () const noexcept
 

Detailed Description

Mutates values using their structural mutation behavior while maintaining the constraint context relevant to each callback. Constraints use the resulting expressions and bindings. This semantic base contains only context state; concrete structural engines own the identity-remap environment.

See also
ffi::StructuralMutator, sym::ConstraintContext

Member Typedef Documentation

◆ MutatorObjType

◆ StateTupleType

Constructor & Destructor Documentation

◆ StructuralMutatorWithConstraintContextObj()

tvm::tirx::StructuralMutatorWithConstraintContextObj::StructuralMutatorWithConstraintContextObj ( const ffi::StructuralMutatorVTable *  vtable)
inlineexplicitprotected

Member Function Documentation

◆ AppendConstraint()

void tvm::tirx::StructuralMutatorWithConstraintContextObj::AppendConstraint ( const sym::Constraint &  constraint)
inline

Add a fact to the current scope, creating its child context on the first append.

Parameters
constraintBinding, range, or predicate valid in the current scope.

◆ DefaultMutateExpected()

ffi::Expected< ffi::UnchangedOr< ffi::Any > > tvm::tirx::StructuralMutatorWithConstraintContextObj::DefaultMutateExpected ( ffi::AnyView  value,
ffi::InplaceMode  mode = ffi::InplaceMode::kDisallow 
)
inlinenoexcept

Default path, bypassing this node's engine callback.

◆ StateTuple()

StateTupleType tvm::tirx::StructuralMutatorWithConstraintContextObj::StateTuple ( ) const
inlineprotectednoexcept

◆ TVM_FFI_DECLARE_OBJECT_INFO()

tvm::tirx::StructuralMutatorWithConstraintContextObj::TVM_FFI_DECLARE_OBJECT_INFO ( "tirx.StructuralMutatorWithConstraintContext"  ,
StructuralMutatorWithConstraintContextObj  ,
ffi::StructuralMutatorObj   
)

◆ WithConstraintScope()

template<typename F >
auto tvm::tirx::StructuralMutatorWithConstraintContextObj::WithConstraintScope ( F &&  f) -> decltype(f())
inline

Run an Expected-returning callback in a constraint scope. Use AppendConstraint to add facts. Scopes without facts keep the incoming context. Success and visit interrupts restore the incoming position. Terminal errors propagate without restoration; discard the traversal context after failure.

Member Data Documentation

◆ constraints

sym::ConstraintContext tvm::tirx::StructuralMutatorWithConstraintContextObj::constraints

Active effective premises. Consumers must not append during traversal. Retain this handle and constraints->LocalSize() for a stable position, or use constraints->ToArray() for an independent sequence of handles. The context itself remains live.


The documentation for this class was generated from the following file: