From 29f2465ebfe9072b671b4a5b52c1fab0d76d7e78 Mon Sep 17 00:00:00 2001 From: Peter Goodman Date: Tue, 21 Nov 2017 13:01:32 -0500 Subject: [PATCH] Fixes issue with logger. Fixes issue where we weren't get the minimum value SATed. --- bin/deepstate/common.py | 4 +++- bin/deepstate/main_manticore.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/deepstate/common.py b/bin/deepstate/common.py index e6ff2ef..995c46d 100644 --- a/bin/deepstate/common.py +++ b/bin/deepstate/common.py @@ -12,9 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging +logging.basicConfig() + import argparse import collections -import logging import md5 import os import struct diff --git a/bin/deepstate/main_manticore.py b/bin/deepstate/main_manticore.py index c11afc0..9ac417b 100644 --- a/bin/deepstate/main_manticore.py +++ b/bin/deepstate/main_manticore.py @@ -13,8 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import collections import logging +logging.basicConfig() + +import collections import manticore import multiprocessing import sys @@ -99,7 +101,7 @@ class DeepManticore(DeepState): def concretize_min(self, val, constrain=False): if isinstance(val, (int, long)): return val - concrete_val = self.state.solve_n(val) + concrete_val = min(self.state.concretize(val, policy='MINMAX')) if constrain: self.add_constraint(val == concrete_val) return concrete_val