cairo_lang_sierra/extensions/
core.rs1use super::ap_tracking::ApTrackingLibfunc;
2use super::array::{ArrayLibfunc, ArrayType};
3use super::bitwise::BitwiseType;
4use super::boolean::BoolLibfunc;
5use super::bounded_int::{BoundedIntLibfunc, BoundedIntType};
6use super::branch_align::BranchAlignLibfunc;
7use super::bytes31::{Bytes31Libfunc, Bytes31Type};
8use super::casts::CastLibfunc;
9use super::circuit::{CircuitLibFunc, CircuitType};
10use super::const_type::{ConstLibfunc, ConstType};
11use super::coupon::{CouponLibfunc, CouponType};
12use super::debug::DebugLibfunc;
13use super::drop::DropLibfunc;
14use super::duplicate::DupLibfunc;
15use super::ec::{EcLibfunc, EcOpType, EcPointType, EcStateType};
16use super::enm::{EnumLibfunc, EnumType};
17use super::felt252_dict::{
18 Felt252DictEntryLibfunc, Felt252DictEntryType, Felt252DictLibfunc, Felt252DictType,
19};
20use super::function_call::CouponCallLibfunc;
21use super::gas::BuiltinCostsType;
22use super::int::signed::{
23 Sint8Libfunc, Sint8Type, Sint16Libfunc, Sint16Type, Sint32Libfunc, Sint32Type, Sint64Libfunc,
24 Sint64Type,
25};
26use super::int::signed128::{Sint128Libfunc, Sint128Type};
27use super::int::unsigned::{
28 Uint8Libfunc, Uint8Type, Uint16Libfunc, Uint16Type, Uint32Libfunc, Uint32Type, Uint64Libfunc,
29 Uint64Type,
30};
31use super::int::unsigned128::{U128MulGuaranteeType, Uint128Libfunc, Uint128Type};
32use super::int::unsigned256::Uint256Libfunc;
33use super::int::unsigned512::Uint512Libfunc;
34use super::modules::boxing::{BoxLibfunc, BoxType};
35use super::modules::felt252::{Felt252Libfunc, Felt252Type};
36use super::modules::function_call::FunctionCallLibfunc;
37use super::modules::gas::{GasBuiltinType, GasLibfunc};
38use super::modules::mem::MemLibfunc;
39use super::modules::non_zero::{NonZeroType, UnwrapNonZeroLibfunc};
40use super::modules::unconditional_jump::UnconditionalJumpLibfunc;
41use super::nullable::{NullableLibfunc, NullableType};
42use super::pedersen::{PedersenLibfunc, PedersenType};
43use super::poseidon::{PoseidonLibfunc, PoseidonType};
44use super::range::{IntRangeLibfunc, IntRangeType};
45use super::range_check::{RangeCheck96Type, RangeCheckType};
46use super::segment_arena::SegmentArenaType;
47use super::snapshot::{SnapshotTakeLibfunc, SnapshotType};
48use super::span::SpanType;
49use super::squashed_felt252_dict::SquashedFelt252DictType;
50use super::starknet::{StarkNetLibfunc, StarkNetType};
51use super::structure::{StructLibfunc, StructType};
52use super::uninitialized::UninitializedType;
53use crate::{define_libfunc_hierarchy, define_type_hierarchy};
54
55define_type_hierarchy! {
56 pub enum CoreType {
57 Array(ArrayType),
58 Coupon(CouponType),
59 Bitwise(BitwiseType),
60 Box(BoxType),
61 Circuit(CircuitType),
62 Const(ConstType),
63 EcOp(EcOpType),
64 EcPoint(EcPointType),
65 EcState(EcStateType),
66 Felt252(Felt252Type),
67 GasBuiltin(GasBuiltinType),
68 IntRange(IntRangeType),
69 BuiltinCosts(BuiltinCostsType),
70 Uint8(Uint8Type),
71 Uint16(Uint16Type),
72 Uint32(Uint32Type),
73 Uint64(Uint64Type),
74 Uint128(Uint128Type),
75 Uint128MulGuarantee(U128MulGuaranteeType),
76 Sint8(Sint8Type),
77 Sint16(Sint16Type),
78 Sint32(Sint32Type),
79 Sint64(Sint64Type),
80 Sint128(Sint128Type),
81 NonZero(NonZeroType),
82 Nullable(NullableType),
83 RangeCheck(RangeCheckType),
84 RangeCheck96(RangeCheck96Type),
85 Uninitialized(UninitializedType),
86 Enum(EnumType),
87 Struct(StructType),
88 Felt252Dict(Felt252DictType),
89 Felt252DictEntry(Felt252DictEntryType),
90 SquashedFelt252Dict(SquashedFelt252DictType),
91 Pedersen(PedersenType),
92 Poseidon(PoseidonType),
93 Span(SpanType),
94 StarkNet(StarkNetType),
95 SegmentArena(SegmentArenaType),
96 Snapshot(SnapshotType),
97 Bytes31(Bytes31Type),
98 BoundedInt(BoundedIntType),
99 }, CoreTypeConcrete
100}
101
102define_libfunc_hierarchy! {
103 pub enum CoreLibfunc {
104 ApTracking(ApTrackingLibfunc),
105 Array(ArrayLibfunc),
106 BranchAlign(BranchAlignLibfunc),
107 Bool(BoolLibfunc),
108 Box(BoxLibfunc),
109 Cast(CastLibfunc),
110 Circuit(CircuitLibFunc),
111 Coupon(CouponLibfunc),
112 CouponCall(CouponCallLibfunc),
113 Drop(DropLibfunc),
114 Dup(DupLibfunc),
115 Ec(EcLibfunc),
116 Felt252(Felt252Libfunc),
117 Const(ConstLibfunc),
118 FunctionCall(FunctionCallLibfunc),
119 Gas(GasLibfunc),
120 IntRange(IntRangeLibfunc),
121 Uint8(Uint8Libfunc),
122 Uint16(Uint16Libfunc),
123 Uint32(Uint32Libfunc),
124 Uint64(Uint64Libfunc),
125 Uint128(Uint128Libfunc),
126 Uint256(Uint256Libfunc),
127 Uint512(Uint512Libfunc),
128 Sint8(Sint8Libfunc),
129 Sint16(Sint16Libfunc),
130 Sint32(Sint32Libfunc),
131 Sint64(Sint64Libfunc),
132 Sint128(Sint128Libfunc),
133 Mem(MemLibfunc),
134 Nullable(NullableLibfunc),
135 UnwrapNonZero(UnwrapNonZeroLibfunc),
136 UnconditionalJump(UnconditionalJumpLibfunc),
137 Enum(EnumLibfunc),
138 Struct(StructLibfunc),
139 Felt252Dict(Felt252DictLibfunc),
140 Felt252DictEntry(Felt252DictEntryLibfunc),
141 Pedersen(PedersenLibfunc),
142 Poseidon(PoseidonLibfunc),
143 StarkNet(StarkNetLibfunc),
144 Debug(DebugLibfunc),
145 SnapshotTake(SnapshotTakeLibfunc),
146 Bytes31(Bytes31Libfunc),
147 BoundedInt(BoundedIntLibfunc),
148 }, CoreConcreteLibfunc
149}