Skip to content

kirin.dialects.py.unary

unary

kirin.dialects.py.unary

The unary dialect for Python.

This module contains the dialect for unary semantics in Python, including:

  • The UnaryOp base class for unary operations.
  • The UAdd, USub, Not, and Invert statement classes.
  • The lowering pass for unary operations.
  • The concrete implementation of unary operations.
  • The type inference implementation of unary operations.
  • The constant propagation implementation of unary operations.
  • The Julia emitter for unary operations.

This dialect maps ast.UnaryOp nodes to the UAdd, USub, Not, and Invert statements.

Attributes

NameTypeDefaultDescription
dialect—ir.Dialect('py.unary')