15#ifndef LLZK_C_TYPING_H
16#define LLZK_C_TYPING_H
19#include <mlir-c/Support.h>
68 intptr_t, MlirAttribute
const *lhsParams, intptr_t, MlirAttribute
const *rhsParams
73MLIR_CAPI_EXPORTED
bool
79 MlirType lhs, MlirType rhs, intptr_t nRhsReversePrefix, MlirStringRef
const *rhsReversePrefix
89 MlirType oldTy, MlirType newTy,
bool (*knownOldToNew)(MlirType, MlirType,
void *),
void *data
MLIR_CAPI_EXPORTED bool llzkIsValidType(MlirType type)
valid types: {I1, Index, String, FeltType, StructType, ArrayType, TypeVarType}
MLIR_CAPI_EXPORTED bool llzkIsValidArrayType(MlirType type)
Checks if the type is a LLZK Array and it also contains a valid LLZK type.
MLIR_CAPI_EXPORTED bool llzkTypesUnify(MlirType lhs, MlirType rhs, intptr_t nRhsReversePrefix, MlirStringRef const *rhsReversePrefix)
Return true iff the two Type instances are equivalent or could be equivalent after full instantiation...
MLIR_CAPI_EXPORTED MlirAttribute llzkForceIntAttrType(MlirAttribute attr)
Convert any IntegerAttr with a type other than IndexType to use IndexType.
MLIR_CAPI_EXPORTED bool llzkIsMoreConcreteUnification(MlirType oldTy, MlirType newTy, bool(*knownOldToNew)(MlirType, MlirType, void *), void *data)
Return true iff the types unify and newTy is "more concrete" than oldTy.
MLIR_CAPI_EXPORTED bool llzkIsValidConstReadType(MlirType type)
valid types: {I1, Index, FeltType, TypeVarType}
MLIR_CAPI_EXPORTED bool llzkHasAffineMapAttr(MlirType type)
Return true iff the given type contains an AffineMapAttr.
MLIR_CAPI_EXPORTED bool llzkIsValidArrayElemType(MlirType type)
valid types: isValidType() - {ArrayType}
MLIR_CAPI_EXPORTED bool llzkTypeParamsUnify(intptr_t, MlirAttribute const *lhsParams, intptr_t, MlirAttribute const *rhsParams)
Return true iff the two ArrayRef instances containing StructType or ArrayType parameters are equivale...
MLIR_CAPI_EXPORTED bool llzkIsValidEmitEqType(MlirType type)
valid types: isValidType() - {String, StructType} (excluded via any type parameter nesting)
MLIR_CAPI_EXPORTED bool llzkIsValidGlobalType(MlirType type)
valid types: isValidType() - {TypeVarType} - {types with variable parameters}
MLIR_CAPI_EXPORTED bool llzkArrayAttrTypeParamsUnify(MlirAttribute lhsParams, MlirAttribute rhsParams)
Return true iff the two ArrayAttr instances containing StructType or ArrayType parameters are equival...
MLIR_CAPI_EXPORTED void llzkAssertValidAttrForParamOfType(MlirAttribute attr)
This function asserts that the given Attribute kind is legal within the LLZK types that can contain A...
MLIR_CAPI_EXPORTED bool llzkIsSignalType(MlirType type)
Return true iff the given type is a StructType referencing the COMPONENT_NAME_SIGNAL struct.
MLIR_CAPI_EXPORTED bool llzkIsConcreteType(MlirType type, bool allowStructParams)
Return false iff the type contains any TypeVarType
MLIR_CAPI_EXPORTED bool llzkIsValidColumnType(MlirType type, MlirOperation op)
valid types: {FeltType, StructType (with columns), ArrayType (that contains a valid column type)}