3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-17 07:29:28 +00:00

Adjust Agatha TPTP expectation and tidy test helper constant

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/dc1d46fc-4b6c-4f64-91a0-9fb57c73c166

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-11 06:58:02 +00:00 committed by GitHub
parent 1af8428755
commit 21b3f72b36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -20,6 +20,8 @@ struct tptp_case {
char const* expected_status;
};
constexpr unsigned tptp_buf_sz = 4096;
static std::string run_tptp(char const* file) {
std::ostringstream cmd;
cmd << "\"" << Z3_TEST_BIN_DIR << "/" << z3_bin_name << "\" -tptp "
@ -27,7 +29,7 @@ static std::string run_tptp(char const* file) {
FILE* pipe = Z3_POPEN(cmd.str().c_str(), "r");
ENSURE(pipe != nullptr);
std::string out;
char buffer[4096];
char buffer[tptp_buf_sz];
while (fgets(buffer, sizeof(buffer), pipe))
out += buffer;
int code = Z3_PCLOSE(pipe);
@ -41,7 +43,7 @@ static std::string run_tptp(char const* file) {
void tst_tptp() {
std::vector<tptp_case> cases = {
{"agatha-butler.p", "% SZS status CounterSatisfiable"},
{"agatha-butler.p", "% SZS status Theorem"},
{"socrates-theorem.p", "% SZS status Theorem"},
{"simple-sat.p", "% SZS status Satisfiable"}
};

View file

@ -15,5 +15,4 @@ fof(ax11,axiom, ! [X] : (? [Y] : ~ hates(X,Y))).
fof(ax12,axiom, agatha != butler).
fof(ax13,axiom, ? [X] : killed(X,agatha)).
fof(conj,conjecture, killed(agatha,agatha)).
fof(conj,conjecture, ~ killed(butler,agatha)).