123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081(**************************************************************************)(* This file is part of BINSEC. *)(* *)(* Copyright (C) 2016-2026 *)(* CEA (Commissariat à l'énergie atomique et aux énergies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file licenses/LGPLv2.1). *)(* *)(**************************************************************************)includeCli.Make(structletname="Follows a trace generated using pin"letshortname="xtrasec"end)moduleTrace_file=Builder.String_option(structletname="trace"letdoc="Input trace as output by the xtrasec tool"end)moduleOutput_smt=Builder.String_option(structletname="output-smt"letdoc="If set, output a SMT formula to this file"end)moduleConcretize_regs=structincludeBuilder.Variant_list(structtypet=[`All|`Stack|`Registerofstring]letname="concretize-regs"(* let default = [`Stack] *)letdoc="List of registers to concretize; use <stack> for stack and frame \
pointers; and <all> for all"letaccept_empty=falseletof_string=function|"all"->`All|"stack"->`Stack|r->`Registerrend)endmoduleConcretize_mem=structincludeBuilder.Variant_choice(structtypet=[`No|`Exact|`Approximateofint]letname="concretize-mem"letdefault=`Exactletdoc="How to add assertions regarding the memory addresses. Use <no> for no \
assertion; <exact> to provide the exact address; or a number to state \
that the address is in some interval."letof_string=function|"no"->`No|"exact"->`Exact|s->`Approximate(int_of_strings)letto_string=function|`No->"no"|`Exact->"exact"|`Approximatei->string_of_intiletchoices=["no";"exact";"<number>"]end)end