Reference: Abstract Syntax Trees

Added in version 2014.1.

Symbolic Constants

class islpy.ast_expr_op_type
access = islpy._isl.ast_expr_op_type.access
add = islpy._isl.ast_expr_op_type.add
address_of = islpy._isl.ast_expr_op_type.address_of
and_ = islpy._isl.ast_expr_op_type.and_
and_then = islpy._isl.ast_expr_op_type.and_then
call = islpy._isl.ast_expr_op_type.call
cond = islpy._isl.ast_expr_op_type.cond
div = islpy._isl.ast_expr_op_type.div
eq = islpy._isl.ast_expr_op_type.eq
error = islpy._isl.ast_expr_op_type.error
fdiv_q = islpy._isl.ast_expr_op_type.fdiv_q
ge = islpy._isl.ast_expr_op_type.ge
gt = islpy._isl.ast_expr_op_type.gt
le = islpy._isl.ast_expr_op_type.le
lt = islpy._isl.ast_expr_op_type.lt
max = islpy._isl.ast_expr_op_type.max
member = islpy._isl.ast_expr_op_type.member
min = islpy._isl.ast_expr_op_type.min
minus = islpy._isl.ast_expr_op_type.minus
mul = islpy._isl.ast_expr_op_type.mul
or_ = islpy._isl.ast_expr_op_type.or_
or_else = islpy._isl.ast_expr_op_type.or_else
pdiv_q = islpy._isl.ast_expr_op_type.pdiv_q
pdiv_r = islpy._isl.ast_expr_op_type.pdiv_r
select = islpy._isl.ast_expr_op_type.select
sub = islpy._isl.ast_expr_op_type.sub
zdiv_r = islpy._isl.ast_expr_op_type.zdiv_r
class islpy.ast_expr_type
error = islpy._isl.ast_expr_type.error
id = islpy._isl.ast_expr_type.id
int = islpy._isl.ast_expr_type.int
op = islpy._isl.ast_expr_type.op
class islpy.ast_node_type
block = islpy._isl.ast_node_type.block
error = islpy._isl.ast_node_type.error
for_ = islpy._isl.ast_node_type.for_
if_ = islpy._isl.ast_node_type.if_
mark = islpy._isl.ast_node_type.mark
user = islpy._isl.ast_node_type.user
class islpy.ast_loop_type
atomic = islpy._isl.ast_loop_type.atomic
default = islpy._isl.ast_loop_type.default
error = islpy._isl.ast_loop_type.error
separate = islpy._isl.ast_loop_type.separate
unroll = islpy._isl.ast_loop_type.unroll

AST Expression

class islpy.AstExpr
__eq__(other)

Return self==value.

__hash__()

Return hash(self).

__ne__(other)

Return self!=value.

access(self, indices)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

add(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

address_of(self)
Parameters:

selfAstExpr

Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

and_(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

and_then(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

call(self, arguments)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

copy(self)
Parameters:

selfAstExpr

Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

div(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

dump(self)
Parameters:

selfAstExpr

Returns:

None

Warning

This function is not part of the officially public isl API. Use at your own risk.

eq(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

from_id = <nanobind.nb_func object>
from_val = <nanobind.nb_func object>
ge(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_ctx(self)
Parameters:

selfAstExpr

Returns:

Context

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_id(self)
Parameters:

selfAstExpr

Returns:

Id

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_op_arg(self, pos)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_op_n_arg(self)
Parameters:

selfAstExpr

Returns:

isl_size

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_op_type(self)
Parameters:

selfAstExpr

Returns:

isl_ast_expr_op_type

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_type(self)
Parameters:

selfAstExpr

Returns:

isl_ast_expr_type

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_val(self)
Parameters:

selfAstExpr

Returns:

Val

Warning

This function is not part of the officially public isl API. Use at your own risk.

gt(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

id_get_id(self)
Parameters:

selfAstExpr

Returns:

Id

int_get_val(self)
Parameters:

selfAstExpr

Returns:

Val

is_equal(self, expr2)
Parameters:
Returns:

bool

Warning

This function is not part of the officially public isl API. Use at your own risk.

le(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

lt(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

mul(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

neg(self)
Parameters:

selfAstExpr

Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

op_get_arg(self, pos)
Parameters:
Returns:

AstExpr

op_get_n_arg(self)
Parameters:

selfAstExpr

Returns:

isl_size

op_get_type(self)
Parameters:

selfAstExpr

Returns:

isl_ast_expr_op_type

Warning

This function is not part of the officially public isl API. Use at your own risk.

op_type_print_macro(self, p)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

op_type_set_print_name = <nanobind.nb_func object>
or_(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

or_else(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

pdiv_q(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

pdiv_r(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

print_macros(self, p)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_op_arg(self, pos, arg)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

sub(self, expr2)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

substitute_ids(self, id2expr)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

to_C_str(self)
Parameters:

selfAstExpr

Returns:

string

to_list(self)
Parameters:

selfAstExpr

Returns:

AstExprList

Warning

This function is not part of the officially public isl API. Use at your own risk.

to_str(self)
Parameters:

selfAstExpr

Returns:

string

Warning

This function is not part of the officially public isl API. Use at your own risk.

AST Node

class islpy.AstNode
__eq__(value, /)

Return self==value.

__hash__()

Return hash(self).

__ne__(value, /)

Return self!=value.

alloc_user = <nanobind.nb_func object>
block_from_children(self)
Parameters:

selfAstNodeList

Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

block_get_children(self)
Parameters:

selfAstNode

Returns:

AstNodeList

copy(self)
Parameters:

selfAstNode

Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

dump(self)
Parameters:

selfAstNode

Returns:

None

Warning

This function is not part of the officially public isl API. Use at your own risk.

for_get_body(self)
Parameters:

selfAstNode

Returns:

AstNode

for_get_cond(self)
Parameters:

selfAstNode

Returns:

AstExpr

for_get_inc(self)
Parameters:

selfAstNode

Returns:

AstExpr

for_get_init(self)
Parameters:

selfAstNode

Returns:

AstExpr

for_get_iterator(self)
Parameters:

selfAstNode

Returns:

AstExpr

for_is_degenerate(self)
Parameters:

selfAstNode

Returns:

bool

for_print(self, p, options)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

foreach_descendant_top_down(self, fn)
Parameters:
  • selfAstNode

  • fn – callback(node)

Returns:

isl_stat

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_annotation(self)
Parameters:

selfAstNode

Returns:

Id

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_ctx(self)
Parameters:

selfAstNode

Returns:

Context

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_type(self)
Parameters:

selfAstNode

Returns:

isl_ast_node_type

Warning

This function is not part of the officially public isl API. Use at your own risk.

if_get_cond(self)
Parameters:

selfAstNode

Returns:

AstExpr

if_get_else(self)
Parameters:

selfAstNode

Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

if_get_else_node(self)
Parameters:

selfAstNode

Returns:

AstNode

if_get_then(self)
Parameters:

selfAstNode

Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

if_get_then_node(self)
Parameters:

selfAstNode

Returns:

AstNode

if_has_else(self)
Parameters:

selfAstNode

Returns:

bool

Warning

This function is not part of the officially public isl API. Use at your own risk.

if_has_else_node(self)
Parameters:

selfAstNode

Returns:

bool

if_print(self, p, options)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

map_descendant_bottom_up(self, fn)
Parameters:
  • selfAstNode

  • fn – callback(node)

Returns:

AstNode

mark_get_id(self)
Parameters:

selfAstNode

Returns:

Id

mark_get_node(self)
Parameters:

selfAstNode

Returns:

AstNode

print_(self, p, options)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

print_macros(self, p)
Parameters:
Returns:

Printer

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_annotation(self, annotation)
Parameters:
Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

to_C_str(self)
Parameters:

selfAstNode

Returns:

string

to_list(self)
Parameters:

selfAstNode

Returns:

AstNodeList

to_str(self)
Parameters:

selfAstNode

Returns:

string

Warning

This function is not part of the officially public isl API. Use at your own risk.

user_from_expr = <nanobind.nb_func object>
user_get_expr(self)
Parameters:

selfAstNode

Returns:

AstExpr

AST Build

class islpy.AstBuild
__eq__(value, /)

Return self==value.

__hash__()

Return hash(self).

__ne__(value, /)

Return self!=value.

access_from_multi_pw_aff(self, mpa)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

access_from_pw_multi_aff(self, pma)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

alloc = <nanobind.nb_func object>
ast_from_schedule(self, schedule)
Parameters:
Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

call_from_multi_pw_aff(self, mpa)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

call_from_pw_multi_aff(self, pma)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

copy(self)
Parameters:

selfAstBuild

Returns:

AstBuild

Warning

This function is not part of the officially public isl API. Use at your own risk.

expr_from_pw_aff(self, pa)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

expr_from_set(self, set)
Parameters:
Returns:

AstExpr

Warning

This function is not part of the officially public isl API. Use at your own risk.

from_context = <nanobind.nb_func object>
get_ctx(self)
Parameters:

selfAstBuild

Returns:

Context

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_schedule(self)
Parameters:

selfAstBuild

Returns:

UnionMap

get_schedule_space(self)
Parameters:

selfAstBuild

Returns:

Space

Warning

This function is not part of the officially public isl API. Use at your own risk.

node_from_schedule(self, schedule)
Parameters:
Returns:

AstNode

Warning

This function is not part of the officially public isl API. Use at your own risk.

node_from_schedule_map(self, schedule)
Parameters:
Returns:

AstNode

restrict(self, set)
Parameters:
Returns:

AstBuild

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_after_each_for(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(node, build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_after_each_mark(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(node, build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_at_each_domain(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(node, build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

set_before_each_for(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_before_each_mark(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(mark, build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_create_leaf(self, fn)
Parameters:
  • selfAstBuild

  • fn – callback(build)

Returns:

tuple: (AstBuild, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_iterators(self, iterators)
Parameters:
Returns:

AstBuild

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_options(self, options)
Parameters:
Returns:

AstBuild

Warning

This function is not part of the officially public isl API. Use at your own risk.

AST Print Options

class islpy.AstPrintOptions
__eq__(value, /)

Return self==value.

__hash__()

Return hash(self).

__ne__(value, /)

Return self!=value.

alloc = <nanobind.nb_func object>
copy(self)
Parameters:

selfAstPrintOptions

Returns:

AstPrintOptions

Warning

This function is not part of the officially public isl API. Use at your own risk.

get_ctx(self)
Parameters:

selfAstPrintOptions

Returns:

Context

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_print_for(self, print_for)
Parameters:
Returns:

tuple: (AstPrintOptions, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

set_print_user(self, print_user)
Parameters:
Returns:

tuple: (AstPrintOptions, (opaque handle to manage callback lifetime))

Warning

This function is not part of the officially public isl API. Use at your own risk.

Canonical Names for Internal Module

class islpy._isl.ast_expr_op_type

See islpy.ast_expr_op_type.

class islpy._isl.ast_expr_type

See islpy.ast_expr_type.

class islpy._isl.ast_node_type

See islpy.ast_node_type.

class islpy._isl.ast_loop_type

See islpy.ast_loop_type.

class islpy._isl.AstExpr

See islpy.AstExpr.

class islpy._isl.AstNode

See islpy.AstNode.

class islpy._isl.AstBuild

See islpy.AstBuild.

class islpy._isl.AstPrintOptions

See islpy.AstPrintOptions.