LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Bool.cpp
Go to the documentation of this file.
1//===-- Bool.cpp - Bool dialect C API implementation ------------*- C++ -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9
12
13#include "llzk-c/Dialect/Bool.h"
14
15#include <mlir/CAPI/Registration.h>
16
17using namespace llzk::boolean;
18
20
21MlirAttribute llzkFeltCmpPredicateAttrGet(MlirContext ctx, LlzkCmp cmp) {
22 return wrap(FeltCmpPredicateAttr::get(unwrap(ctx), FeltCmpPredicate(cmp)));
23}
24
25bool llzkAttributeIsAFeltCmpPredicateAttr(MlirAttribute attr) {
26 return mlir::isa<FeltCmpPredicateAttr>(unwrap(attr));
27}
MlirAttribute llzkFeltCmpPredicateAttrGet(MlirContext ctx, LlzkCmp cmp)
Returns a llzk::boolean::FeltCmpPredicateAttr attribute.
Definition Bool.cpp:21
bool llzkAttributeIsAFeltCmpPredicateAttr(MlirAttribute attr)
Definition Bool.cpp:25
LlzkCmp
Definition Bool.h:31
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Polymorphic, llzk__polymorphic, llzk::polymorphic::PolymorphicDialect) MlirType llzkTypeVarTypeGet(MlirContext ctx
ExpressionValue cmp(llvm::SMTSolverRef solver, CmpOp op, const ExpressionValue &lhs, const ExpressionValue &rhs)