Skip to content

Commit 044aa0d

Browse files
Merge pull request #90 from hbgit/chore/toolinfo-single-version
chore(benchexec): one tool version in the tool-info module
2 parents 10bcf68 + f923eec commit 044aa0d

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

‎docs/TESTCOMP-CHECKLIST.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ evidência que sustenta o estado declarado.
2424
| **H1.1** Emissor de test suite XML | ✅ | `modules/frontend/test_suite/`. `--generate-test-suite` emite `metadata.xml` + `testcase-N.xml` no formato de intercâmbio. 13 testes unitários + 12 asserções de integração. **Custo real muito abaixo das 2 pw estimadas**: o runtime já registrava os valores em ordem de consumo, faltava só serializar |
2525
| **H1.2** Conversor ktest→XML | ✅ | **Colapsou dentro do H1.1.** O log é escrito pelo binário instrumentado em tempo de execução, então já carrega os valores concretos do KLEE. Não precisou de conversor separado |
2626
| **H1.3** Vetores de entrada por caminho | ✅ | **Resolvido por outro caminho que o planejado.** O KLEE já grava um `.ktest` por caminho explorado, com os objetos simbólicos em ordem de consumo; `ktest_reader.cpp` os lê. A alternativa (o runtime gravar um log por estado) foi **medida e descartada**: levou um run de 1s/`FALSE` para 100s/`SUCCEEDED` errado, porque cada escrita é chamada externa que o KLEE executa concretamente. 16 testes unitários fixam o parse contra bytes montados à mão |
27-
| **H1.4** Empacotamento BenchExec / fm-tools | ✅ | `utils/moduleBenchExec/map2check_testcomp.py` (`BaseTool2`) + `utils/map2check-testcomp-wrapper.py`, ambos no zip de release. 15 asserções contra o benchexec real em `tests/integration/test_benchexec_toolinfo.py`. **Falta:** registrar em `fm-tools` (fora deste repositório). O `map2check.py` SV-COMP segue em `BaseTool` 1.x — obsoleto mas ainda presente no benchexec 3.35, então não está morto |
27+
| **H1.4** Empacotamento BenchExec / fm-tools | ✅ | Um módulo tool-info só, o `map2check.py` do BenchExec (cópia em `utils/moduleBenchExec/map2check.py`), estendido em sosy-lab/benchexec#1352; um wrapper só, `utils/map2check-wrapper.py`, que escolhe verificação ou geração de testes pelo arquivo de propriedade. 24 asserções contra o benchexec real em `tests/integration/test_benchexec_toolinfo.py`. Registro em fm-tools: !1245, arquivo em DOI 10.5281/zenodo.23672409 |
2828
| **H1.5** E2E no CI com TestCov | ✅ | Job `Test-Comp Validation (TestCov)`, 6/6 contra manifesto medido. Ver `tests/testcomp/` |
2929

3030
## H2 — Eficácia

‎tests/integration/test_benchexec_toolinfo.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def main():
172172

173173
silent_tool, silent_executable = fake_tool("")
174174
silent_cmd = silent_tool.cmdline(silent_executable, [], task, limits)
175-
check("a wrapper that does not tell its version gets no new options",
176-
"--budget" not in silent_cmd, silent_cmd)
175+
check("a wrapper that does not tell its version is taken as the current one",
176+
"--budget" in silent_cmd, silent_cmd)
177177

178178
# --- determine_result ----------------------------------------------------
179179
check("DONE as the last line is DONE",

‎utils/moduleBenchExec/map2check.py‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66
# SPDX-License-Identifier: Apache-2.0
77

8-
import functools
98
import os
109
import re
1110

@@ -44,7 +43,11 @@ def executable(self, tool_locator):
4443
self._version = 6
4544
except ToolNotFoundException:
4645
executable = tool_locator.find_executable("map2check-wrapper.py")
47-
self._version = 7
46+
# The Python wrapper (Map2Check 7 and later) reports the version,
47+
# e.g., "v9.0.0-Songbirds:2026-10-13". If it does not, assume the
48+
# current version.
49+
match = re.match(r"v?(\d+)\.", self._version_from_tool(executable))
50+
self._version = int(match.group(1)) if match else 9
4851

4952
return executable
5053

@@ -87,7 +90,7 @@ def cmdline(self, executable, options, task, rlimits):
8790
)
8891
elif self._version > 6:
8992
cmd = [executable] + options + ["-p", task.property_file]
90-
if _major_version(executable) >= 9:
93+
if self._version >= 9:
9194
data_model = get_data_model_from_task(
9295
task, {ILP32: "ILP32", LP64: "LP64"}
9396
)
@@ -149,11 +152,3 @@ def determine_result(self, run):
149152
status = "ERROR"
150153

151154
return status
152-
153-
154-
@functools.lru_cache
155-
def _major_version(executable):
156-
"""The major version of Map2Check, or 0 if the wrapper does not tell."""
157-
version = Tool._version_from_tool(executable)
158-
match = re.match(r"v?(\d+)\.", version)
159-
return int(match.group(1)) if match else 0

0 commit comments

Comments
 (0)