astx
¶
Modules:
-
array– -
binary_op– -
buffer– -
classes– -
collections– -
context– -
ffi– -
iterables– -
modules– -
structs– -
symbol_table– -
system– -
templates– -
tensor– -
types–
Classes:
-
AddBinOp– -
ArrayInt32ArrayLength– -
AssertStmt– -
AssignmentBinOp– -
BaseFieldAccess– -
BaseMethodCall– -
BitAndBinOp– -
BitOrBinOp– -
BitXorBinOp– -
BufferOwnerType– -
BufferViewDescriptor– -
BufferViewIndex– -
BufferViewRelease– -
BufferViewRetain– -
BufferViewStore– -
BufferViewType– -
BufferViewWrite– -
Cast– -
ClassConstruct– -
ClassDefStmt– -
ClassType– -
CollectionContains– -
CollectionCount– -
CollectionIndex– -
CollectionIsEmpty– -
CollectionLength– -
DictComprehension– -
DivBinOp– -
EqBinOp– -
FieldAccess– -
ForInLoopStmt– -
GeBinOp– -
GeneratorType– -
GtBinOp– -
LeBinOp– -
ListAppend– -
ListCreate– -
ListIndex– -
ListLength– -
LogicalAndBinOp– -
LogicalOrBinOp– -
LtBinOp– -
MethodCall– -
ModBinOp– -
MulBinOp– -
NamespaceKind– -
NamespaceType– -
NeBinOp– -
OpaqueHandleType– -
PointerType– -
PrintExpr– -
StaticFieldAccess– -
StaticMethodCall– -
StructType– -
SubBinOp– -
TemplateParam– -
TemplateTypeVar– -
TensorByteOffset– -
TensorElementCount– -
TensorIndex– -
TensorLiteral– -
TensorNDim– -
TensorRelease– -
TensorRetain– -
TensorShape– -
TensorStore– -
TensorStride– -
TensorType– -
TensorView– -
UnionType– -
WithStmt–
Functions:
-
add_generated_template_node– -
binary_op_type_for_opcode– -
clear_generated_template_nodes– -
generated_template_nodes– -
get_template_args– -
get_template_params– -
is_template_node– -
is_template_specialization– -
mark_template_specialization– -
set_template_args– -
set_template_params– -
specialize_binary_op– -
template_specialization_name–
AddBinOp
¶
AddBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ArrayInt32ArrayLength
¶
Bases: DataType
Build an int32 array using the IRx builtin array runtime, then return its length. attributes: values: type: list[astx.AST] type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/array.py
34 35 36 37 38 39 40 41 42 43 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/array.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
AssertStmt
¶
AssertStmt(
condition: Expr,
message: Expr | None = None,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: ASTNodes[AST] | None = None,
)
Bases: StatementType
Represent one fatal assertion statement with an optional failure message. attributes: condition: type: astx.Expr message: type: astx.Expr | None loc: type: astx.SourceLocation
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/system.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/system.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
AssignmentBinOp
¶
AssignmentBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BaseFieldAccess
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BaseMethodCall
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BitAndBinOp
¶
BitAndBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BitOrBinOp
¶
BitOrBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BitXorBinOp
¶
BitXorBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferOwnerType
¶
BufferOwnerType()
Bases: OpaqueHandleType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
28 29 30 31 32 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/ffi.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewDescriptor
¶
BufferViewDescriptor(
metadata: BufferViewMetadata,
element_type: DataType | None = None,
)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewIndex
¶
Bases: DataType
Reads one scalar element by computing offset_bytes plus the sum of index*stride byte offsets over the canonical buffer view descriptor. attributes: base: type: astx.AST indices: type: list[astx.AST] type_: type: astx.DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewRelease
¶
BufferViewRelease(view: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
381 382 383 384 385 386 387 388 389 390 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewRetain
¶
BufferViewRetain(view: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
340 341 342 343 344 345 346 347 348 349 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewStore
¶
Bases: DataType
Stores one scalar element by computing the canonical descriptor element address. This is not a user-facing array mutation API. attributes: base: type: astx.AST indices: type: list[astx.AST] value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewType
¶
BufferViewType(element_type: DataType | None = None)
Bases: AnyType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
54 55 56 57 58 59 60 61 62 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/base.py
685 686 687 688 689 690 691 692 693 694 695 696 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
BufferViewWrite
¶
Bases: DataType
Writes one 8-bit integer at offset_bytes + byte_offset. This is not a generic typed element store or user-facing array mutation API. attributes: view: type: astx.AST value: type: astx.AST byte_offset: type: int type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/buffer.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/buffer.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
Cast
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/system.py
145 146 147 148 149 150 151 152 153 154 155 156 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/system.py
158 159 160 161 162 163 164 165 166 167 168 169 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ClassConstruct
¶
ClassConstruct(class_name: str)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
263 264 265 266 267 268 269 270 271 272 273 274 275 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
285 286 287 288 289 290 291 292 293 294 295 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ClassDefStmt
¶
ClassDefStmt(
name: str,
*,
bases: Iterable[ClassType] | ASTNodes[ClassType] = (),
attributes: Iterable[VariableDeclaration]
| ASTNodes[VariableDeclaration] = (),
decorators: Iterable[Expr] | ASTNodes[Expr] = (),
methods: Iterable[FunctionDef]
| ASTNodes[FunctionDef] = (),
visibility: VisibilityKind = public,
is_abstract: bool = False,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: ASTNodes[AST] | None = None,
)
Bases: StructDeclStmt
Represent one top-level class declaration with explicit base-class references and inherited struct-like member containers. attributes: bases: type: astx.ASTNodes[ClassType] is_abstract: type: bool kind: type: astx.ASTKind
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ClassType
¶
ClassType(
name: str,
*,
resolved_name: str | None = None,
module_key: str | None = None,
qualified_name: str | None = None,
ancestor_qualified_names: tuple[str, ...] = (),
)
Bases: AnyType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionContains
¶
Bases: DataType
Return whether a list, tuple, or set contains a value, or whether a dictionary contains a key. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Boolean
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionCount
¶
Bases: DataType
Return how many times a value appears in a list or tuple as an Int32 value. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
243 244 245 246 247 248 249 250 251 252 253 254 255 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionIndex
¶
Bases: DataType
Return the first zero-based index of a value in a list or tuple. The initial IRx contract returns -1 when the value is not found. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
187 188 189 190 191 192 193 194 195 196 197 198 199 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionIsEmpty
¶
CollectionIsEmpty(base: AST)
Bases: DataType
Return whether a list, tuple, set, or dictionary has no logical entries. attributes: base: type: astx.AST type_: type: astx.Boolean
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
81 82 83 84 85 86 87 88 89 90 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionLength
¶
CollectionLength(base: AST)
Bases: DataType
Return the logical length of a list, tuple, set, or dictionary as an Int32 value. attributes: base: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
35 36 37 38 39 40 41 42 43 44 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
DictComprehension
¶
DictComprehension(
key: Expr,
value: Expr,
generators: ASTNodes[ComprehensionClause]
| Iterable[ComprehensionClause] = (),
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: ASTNodes | None = None,
)
Bases: Comprehension
Represent {key: value for ...} until upstream ASTx exposes a
canonical dictionary-comprehension expression node.
attributes:
key:
type: astx.Expr
value:
type: astx.Expr
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/iterables.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/iterables.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
DivBinOp
¶
DivBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
EqBinOp
¶
EqBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
FieldAccess
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/structs.py
99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/structs.py
121 122 123 124 125 126 127 128 129 130 131 132 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ForInLoopStmt
¶
ForInLoopStmt(
target: AST,
iterable: AST,
body: Block,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: ASTNodes | None = None,
)
Bases: StatementType
Model source forms equivalent to for target in iterable: body while
preserving ASTx-compatible target, iterable, and body child nodes.
attributes:
target:
type: astx.AST
iterable:
type: astx.AST
body:
type: astx.Block
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/iterables.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/iterables.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
GeBinOp
¶
GeBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
GeneratorType
¶
GeneratorType(yield_type: DataType)
Bases: AnyType
Represent one stateful generator value that yields values of one statically known element type when iterated. attributes: yield_type: type: astx.DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/types.py
153 154 155 156 157 158 159 160 161 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/types.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
GtBinOp
¶
GtBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
LeBinOp
¶
LeBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListAppend
¶
Bases: DataType
Append one value to an existing mutable list variable or field. This node models incremental list growth and is not a user-facing collection API by itself. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/list.py
140 141 142 143 144 145 146 147 148 149 150 151 152 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/list.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListCreate
¶
ListCreate(element_type: DataType)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/list.py
34 35 36 37 38 39 40 41 42 43 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/list.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListIndex
¶
Bases: DataType
Read one element from a list-valued expression using one integer index. attributes: base: type: astx.AST index: type: astx.AST type_: type: astx.DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/list.py
83 84 85 86 87 88 89 90 91 92 93 94 95 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/list.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ListLength
¶
ListLength(base: AST)
Bases: DataType
Return the current logical length of one list-valued expression as an int32 value. The runtime stores list lengths as int64, but the current IRx language-level contract intentionally truncates that representation to Int32. attributes: base: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/list.py
195 196 197 198 199 200 201 202 203 204 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/list.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
LogicalAndBinOp
¶
LogicalAndBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
LogicalOrBinOp
¶
LogicalOrBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
LtBinOp
¶
LtBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
MethodCall
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
ModBinOp
¶
ModBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
MulBinOp
¶
MulBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
NamespaceKind
¶
NamespaceType
¶
NamespaceType(
namespace_key: str,
*,
namespace_kind: NamespaceKind = MODULE,
display_name: str | None = None,
)
Bases: AnyType
Represent one imported namespace value during semantic analysis and lowering without modeling it as a user-defined runtime aggregate. attributes: namespace_key: type: str namespace_kind: type: NamespaceKind display_name: type: str | None
Methods:
-
get_struct– -
to_json– -
to_yaml–
Attributes:
-
module_key(str) –
Source code in packages/irx/src/irx/astx/modules.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/modules.py
90 91 92 93 94 95 96 97 98 99 100 101 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
NeBinOp
¶
NeBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
OpaqueHandleType
¶
OpaqueHandleType(handle_name: str)
Bases: AnyType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/ffi.py
83 84 85 86 87 88 89 90 91 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/ffi.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
PointerType
¶
PointerType(pointee_type: DataType | None = None)
Bases: AnyType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/ffi.py
30 31 32 33 34 35 36 37 38 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/ffi.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
PrintExpr
¶
PrintExpr(message: Expr)
Bases: Expr
It would be nice to support more arguments similar to the ones supported by Python (*args, sep=' ', end='', file=None, flush=False).
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/system.py
105 106 107 108 109 110 111 112 113 114 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/system.py
116 117 118 119 120 121 122 123 124 125 126 127 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
StaticFieldAccess
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
StaticMethodCall
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/classes.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/classes.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
StructType
¶
StructType(
name: str,
*,
resolved_name: str | None = None,
module_key: str | None = None,
qualified_name: str | None = None,
)
Bases: AnyType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/structs.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/structs.py
68 69 70 71 72 73 74 75 76 77 78 79 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
SubBinOp
¶
SubBinOp(
op_code: str,
lhs: DataType,
rhs: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: Optional[ASTNodes] = None,
)
Bases: BinaryOp
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/astx/src/astx/types/operators.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/types/operators.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TemplateParam
dataclass
¶
TemplateParam(
name: str,
bound: DataType,
loc: SourceLocation = NO_SOURCE_LOCATION,
)
Describe one bounded template variable attached to a function or method declaration. attributes: name: type: str bound: type: astx.DataType loc: type: astx.SourceLocation
TemplateTypeVar
¶
Bases: AnyType
Represent one unresolved template type parameter inside function signatures or local declared types before specialization. attributes: name: type: str bound: type: astx.DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/types.py
98 99 100 101 102 103 104 105 106 107 108 109 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/types.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorByteOffset
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorElementCount
¶
TensorElementCount(base: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
500 501 502 503 504 505 506 507 508 509 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorIndex
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorLiteral
¶
TensorLiteral(
values: Sequence[AST],
*,
element_type: DataType,
shape: Sequence[int],
strides: Sequence[int] | None = None,
offset_bytes: int = 0,
)
Bases: DataType
Build one Arrow C++ tensor value from scalar values plus shape and stride metadata. attributes: values: type: list[astx.AST] element_type: type: astx.DataType shape: type: tuple[int, Ellipsis] strides: type: tuple[int, Ellipsis] | None offset_bytes: type: int type_: type: TensorType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorNDim
¶
TensorNDim(base: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
357 358 359 360 361 362 363 364 365 366 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorRelease
¶
TensorRelease(base: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
641 642 643 644 645 646 647 648 649 650 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
652 653 654 655 656 657 658 659 660 661 662 663 664 665 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorRetain
¶
TensorRetain(base: AST)
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
600 601 602 603 604 605 606 607 608 609 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
611 612 613 614 615 616 617 618 619 620 621 622 623 624 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorShape
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
401 402 403 404 405 406 407 408 409 410 411 412 413 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorStore
¶
Bases: DataType
Stores one scalar through tensor shape and stride metadata. Arrow C++ backed tensors remain readonly in this phase, but the node keeps the surface aligned with future writable views. attributes: base: type: astx.AST indices: type: list[astx.AST] value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorStride
¶
Bases: DataType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
452 453 454 455 456 457 458 459 460 461 462 463 464 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorType
¶
TensorType(element_type: DataType | None = None)
Bases: AnyType
Represent the homogeneous N-dimensional tensor abstraction while reusing the canonical buffer/view representation during lowering. attributes: element_type: type: astx.DataType | None
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
34 35 36 37 38 39 40 41 42 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/astx/src/astx/base.py
685 686 687 688 689 690 691 692 693 694 695 696 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
TensorView
¶
TensorView(
base: AST,
*,
shape: Sequence[int],
strides: Sequence[int] | None = None,
offset_bytes: int = 0,
)
Bases: DataType
Build one shallow tensor view by reusing the base storage and replacing the logical shape, strides, and offset metadata. attributes: base: type: astx.AST shape: type: tuple[int, Ellipsis] strides: type: tuple[int, Ellipsis] | None offset_bytes: type: int type_: type: TensorType
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/tensor.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/tensor.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
UnionType
¶
Bases: AnyType
Represent one union of concrete type references that semantic analysis may enumerate as a finite type domain. attributes: members: type: tuple[astx.DataType, Ellipsis] alias_name: type: str | None
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/types.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/types.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
WithStmt
¶
WithStmt(
manager: AST,
body: Block,
target: AST | None = None,
loc: SourceLocation = NO_SOURCE_LOCATION,
parent: ASTNodes | None = None,
)
Bases: StatementType
Model source forms equivalent to with manager as target: body while
keeping the manager expression, optional target, and body as regular ASTx
child nodes.
attributes:
manager:
type: astx.AST
body:
type: astx.Block
target:
type: astx.AST | None
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/context.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/context.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
add_generated_template_node
¶
Source code in packages/irx/src/irx/astx/templates.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
binary_op_type_for_opcode
¶
Source code in packages/irx/src/irx/astx/binary_op.py
156 157 158 159 160 161 162 163 164 165 166 | |
clear_generated_template_nodes
¶
clear_generated_template_nodes(module: Module) -> None
Source code in packages/irx/src/irx/astx/templates.py
185 186 187 188 189 190 191 192 193 | |
generated_template_nodes
¶
Source code in packages/irx/src/irx/astx/templates.py
196 197 198 199 200 201 202 203 204 205 206 207 | |
get_template_args
¶
Source code in packages/irx/src/irx/astx/templates.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
get_template_params
¶
get_template_params(node: AST) -> tuple[TemplateParam, ...]
Source code in packages/irx/src/irx/astx/templates.py
62 63 64 65 66 67 68 69 70 71 72 73 | |
is_template_node
¶
Source code in packages/irx/src/irx/astx/templates.py
76 77 78 79 80 81 82 83 84 85 86 | |
is_template_specialization
¶
Source code in packages/irx/src/irx/astx/templates.py
154 155 156 157 158 159 160 161 162 163 164 | |
mark_template_specialization
¶
Source code in packages/irx/src/irx/astx/templates.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
set_template_args
¶
Source code in packages/irx/src/irx/astx/templates.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
set_template_params
¶
set_template_params(
node: AST, params: Iterable[TemplateParam]
) -> None
Source code in packages/irx/src/irx/astx/templates.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
specialize_binary_op
¶
Source code in packages/irx/src/irx/astx/binary_op.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
template_specialization_name
¶
Source code in packages/irx/src/irx/astx/templates.py
140 141 142 143 144 145 146 147 148 149 150 151 | |