wmpy.core.weights.WeightConverterSkeleton¶
- class WeightConverterSkeleton(env)[source]¶
Bases:
TreeWalkerThis internal class implements the conversion of a weight function into a weight skeleton, as described in “Enhancing SMT-based Weighted Model Integration by structure awareness” (Spallitta et al., 2024).
Methods
convertnew_cond_labelOverrides the default walking function for each of the specified node_types with the given function
Associate in cls the given function to the given node_types.
Call the correct walk_* function of cls for the given formula.
Generic walk method, will apply the function defined by the map self.functions.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
walk_no_conditionsDefault function for a node that is not handled by the Walker.
walk_operatorDefault function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function to skip a node and process the children
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
walk_thresholdDefault function for a node that is not handled by the Walker.
Default function for a node that is not handled by the Walker.
- set_function(function, *node_types)¶
Overrides the default walking function for each of the specified node_types with the given function
- classmethod set_handler(function, *node_types)¶
Associate in cls the given function to the given node_types.
- classmethod super(self, formula, *args, **kwargs)¶
Call the correct walk_* function of cls for the given formula.
- walk(formula, threshold=None)¶
Generic walk method, will apply the function defined by the map self.functions.
If threshold parameter is specified, the walk_threshold function will be called for all nodes with depth >= threshold.
- walk_algebraic_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_and(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_array_select(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_array_store(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_array_value(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bool_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_bv_add(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_and(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_ashr(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_comp(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_concat(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_bv_extract(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_lshl(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_lshr(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_mul(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_neg(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_not(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_or(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_rol(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_ror(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_sdiv(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_sext(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_sle(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_slt(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_srem(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_sub(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_tonatural(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_udiv(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_ule(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_ult(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_urem(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_xor(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_bv_zext(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_div(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_equals(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_error(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_exists(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_forall(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_function(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_iff(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_implies(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_int_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_int_to_str(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_ite(formula)[source]¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_le(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_lt(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_minus(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_not(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_or(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_plus(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_pow(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_real_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_skip(formula)¶
Default function to skip a node and process the children
- walk_str_charat(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_concat(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_constant(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_str_contains(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_indexof(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_length(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_prefixof(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_replace(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_substr(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_suffixof(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_str_to_int(formula, **kwargs)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- walk_symbol(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.
- Return type:
- walk_times(formula)¶
Default function for a node that is not handled by the Walker.
This tries to handle the node using the Dynamic Walker Function information from the environment. If this fails, then an UnsupportedOperatorError exception is given.