ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
preprocessor.ast_utils_mixin.AstUtilsMixin Class Reference
Inheritance diagram for preprocessor.ast_utils_mixin.AstUtilsMixin:
[legend]

Public Member Functions

 ensure_all_locations (self, node, source_node=None, line=1, col=0)
 create_name_node (self, name_id, ctx, source_node=None)
 create_constant_node (self, value, source_node=None)
 generate_variable_copy (self, qualified_name, arg_node, default_node)

Static Public Member Functions

 subscripts_name (node, name)

Public Attributes

 old_name = old_name
 new_name = new_name

Protected Member Functions

 _rename_loads (self, node, old_name, new_name)
 _bound_target_names (self, target)
 _create_bool_ann_assign (self, target_name, value, source_node)

Static Protected Member Functions

 _sanitize_identifier_fragment (fragment)
 _body_has_node_shallow (body_stmts, node_type)

Member Function Documentation

◆ _body_has_node_shallow()

preprocessor.ast_utils_mixin.AstUtilsMixin._body_has_node_shallow ( body_stmts,
node_type )
staticprotected
Return True if node_type appears in body_stmts without nested defs/lambdas.

◆ _bound_target_names()

preprocessor.ast_utils_mixin.AstUtilsMixin._bound_target_names ( self,
target )
protected

◆ _create_bool_ann_assign()

preprocessor.ast_utils_mixin.AstUtilsMixin._create_bool_ann_assign ( self,
target_name,
value,
source_node )
protected

◆ _rename_loads()

preprocessor.ast_utils_mixin.AstUtilsMixin._rename_loads ( self,
node,
old_name,
new_name )
protected

◆ _sanitize_identifier_fragment()

preprocessor.ast_utils_mixin.AstUtilsMixin._sanitize_identifier_fragment ( fragment)
staticprotected

◆ create_constant_node()

preprocessor.ast_utils_mixin.AstUtilsMixin.create_constant_node ( self,
value,
source_node = None )
Create a Constant node with proper location info.

◆ create_name_node()

preprocessor.ast_utils_mixin.AstUtilsMixin.create_name_node ( self,
name_id,
ctx,
source_node = None )
Create a Name node with proper location info.

◆ ensure_all_locations()

preprocessor.ast_utils_mixin.AstUtilsMixin.ensure_all_locations ( self,
node,
source_node = None,
line = 1,
col = 0 )
Recursively ensure all nodes in an AST tree have location information.

◆ generate_variable_copy()

preprocessor.ast_utils_mixin.AstUtilsMixin.generate_variable_copy ( self,
qualified_name,
arg_node,
default_node )
Materialize a default value into a stable temporary variable, evaluated
once where the function is defined. Python evaluates defaults at
definition time and shares the resulting object across calls, so a
container default must be hoisted rather than rebuilt per call site.

◆ subscripts_name()

preprocessor.ast_utils_mixin.AstUtilsMixin.subscripts_name ( node,
name )
static
True when ``node`` contains a subscript of the bare name ``name``.

Member Data Documentation

◆ new_name

preprocessor.ast_utils_mixin.AstUtilsMixin.new_name = new_name

◆ old_name

preprocessor.ast_utils_mixin.AstUtilsMixin.old_name = old_name

The documentation for this class was generated from the following file: