From 9fc48e377ca96d381de20536e5e240e269a94ec6 Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Mon, 28 Jan 2019 15:51:38 +0100 Subject: [PATCH] rename expressions to conditions as this is the correct term to use --- mythril/laser/smt/independence_solver.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mythril/laser/smt/independence_solver.py b/mythril/laser/smt/independence_solver.py index 01552410..59a1bfab 100644 --- a/mythril/laser/smt/independence_solver.py +++ b/mythril/laser/smt/independence_solver.py @@ -22,14 +22,14 @@ def _get_expr_variables(expression: z3.ExprRef): class DependenceBucket: """ Bucket object to contain a set of conditions that are dependent on each other """ - def __init__(self, variables=None, condition=None): + def __init__(self, variables=None, conditions=None): """ Initializes a DependenceBucket object - :param variables: Variables contained in the expressions - :param expressions: The expressions that are dependent on each other + :param variables: Variables contained in the conditions + :param conditions: The conditions that are dependent on each other """ self.variables = variables or [] - self.expressions = condition or [] + self.conditions = conditions or [] class DependenceMap: @@ -67,13 +67,13 @@ class DependenceMap: def merge_buckets(self, bucket_list: List[DependenceBucket]): """ Merges the buckets in bucket list """ variables = [] - expressions = [] + conditions = [] for bucket in bucket_list: self.buckets.remove(bucket) variables += bucket.variables - expressions += bucket.expressions + conditions += bucket.conditions - new_bucket = DependenceBucket(variables, expressions) + new_bucket = DependenceBucket(variables, conditions) self.buckets.append(new_bucket) return new_bucket @@ -126,7 +126,7 @@ class IndependenceSolver: self.models = [] for bucket in dependence_map.buckets: self.raw.reset() - self.raw.append(*bucket.expressions) + self.raw.append(*bucket.conditions) check_result = self.raw.check() if check_result == z3.unsat: return z3.unsat