mirror of
https://github.com/Z3Prover/z3
synced 2026-05-25 11:26:21 +00:00
Polish TPTP parser diagnostics
Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/ca1df142-d992-4e45-a8b3-859fa70a5222 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
2bfb8d80db
commit
aac0a49c5b
2 changed files with 7 additions and 5 deletions
|
|
@ -1182,7 +1182,7 @@ class tptp_parser {
|
|||
if (let_consts.size() == 1) {
|
||||
replacer.insert(let_consts[0], value.get());
|
||||
} else {
|
||||
throw parse_error("tuple $let destructuring is not supported");
|
||||
throw parse_error("tuple $let destructuring is not supported; use single-variable $let bindings instead");
|
||||
}
|
||||
expr_ref result(m);
|
||||
replacer(body, result);
|
||||
|
|
@ -1257,7 +1257,7 @@ class tptp_parser {
|
|||
|
||||
// Tuple/list in formula position: [t1, t2, ...] — return first element for simplicity
|
||||
if (accept(token_kind::lbrack)) {
|
||||
throw parse_error("tuple/list formulas are not supported");
|
||||
throw parse_error("tuple/list formulas are not supported in formula position; split them into separate formulas instead");
|
||||
}
|
||||
|
||||
std::string n = parse_name();
|
||||
|
|
@ -1433,9 +1433,9 @@ class tptp_parser {
|
|||
func_decl* f = mk_modal_op(mod_name);
|
||||
return expr_ref(m.mk_app(f, sub.get()), m);
|
||||
}
|
||||
throw parse_error("tuple/list formulas are not supported");
|
||||
throw parse_error("tuple/list formulas are not supported in formula position; split them into separate formulas instead");
|
||||
}
|
||||
throw parse_error("tuple/list formulas are not supported");
|
||||
throw parse_error("tuple/list formulas are not supported in formula position; split them into separate formulas instead");
|
||||
}
|
||||
|
||||
// Diamond modality: <.>, <name>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include <atomic>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
|
@ -64,7 +66,7 @@ public:
|
|||
}
|
||||
~scoped_temp_file() {
|
||||
if (!m_path.empty() && std::remove(m_path.c_str()) != 0)
|
||||
std::cerr << "failed to remove temporary file: " << m_path << "\n";
|
||||
std::cerr << "failed to remove temporary file '" << m_path << "': " << std::strerror(errno) << "\n";
|
||||
}
|
||||
std::string const& path() const { return m_path; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue