diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2024-02-19 16:26:22 +0100 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2024-02-19 16:26:22 +0100 |
| commit | 67dbe17ec3dff6f4c9a508ace3f1d25cb5e9f9c8 (patch) | |
| tree | 5f3281228e39c072daee10dd6aea2267e4612f57 /tools/capture_transforms.py | |
| parent | 86b42b57d322837c18a47daa917a597c79ad2bbb (diff) | |
| download | focaccia-67dbe17ec3dff6f4c9a508ace3f1d25cb5e9f9c8.tar.gz focaccia-67dbe17ec3dff6f4c9a508ace3f1d25cb5e9f9c8.zip | |
Make symbolic equations more symbolic
Reduce the impact of concrete guidance on the process of calculating an instruction's symbolic equation. The resulting equations will contain less assumptions about the concrete state and thus be more generic.
Diffstat (limited to '')
| -rwxr-xr-x | tools/capture_transforms.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/capture_transforms.py b/tools/capture_transforms.py index 5439b05..5a104c0 100755 --- a/tools/capture_transforms.py +++ b/tools/capture_transforms.py @@ -2,9 +2,11 @@ import argparse import logging +import os from focaccia import parser from focaccia.symbolic import collect_symbolic_trace +from focaccia.trace import Trace, TraceEnvironment def main(): prog = argparse.ArgumentParser() @@ -19,7 +21,10 @@ def main(): args = prog.parse_args() logging.disable(logging.CRITICAL) - trace = collect_symbolic_trace(args.binary, args.args, None) + env = TraceEnvironment(args.binary, + args.args, + [f'{k}={v}' for k, v in os.environ.items()]) + trace = collect_symbolic_trace(env, None) with open(args.output, 'w') as file: parser.serialize_transformations(trace, file) |