3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

add get-info :rlimit option to cmd-context to facilitate timeout based repros

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-03-24 12:57:08 -07:00
parent dc0e9c1919
commit cdc89b6193

View file

@ -629,6 +629,7 @@ class get_info_cmd : public cmd {
symbol m_reason_unknown;
symbol m_all_statistics;
symbol m_assertion_stack_levels;
symbol m_rlimit;
public:
get_info_cmd():
cmd("get-info"),
@ -639,7 +640,8 @@ public:
m_status(":status"),
m_reason_unknown(":reason-unknown"),
m_all_statistics(":all-statistics"),
m_assertion_stack_levels(":assertion-stack-levels") {
m_assertion_stack_levels(":assertion-stack-levels"),
m_rlimit(":rlimit") {
}
char const * get_usage() const override { return "<keyword>"; }
char const * get_descr(cmd_context & ctx) const override { return "get information."; }
@ -671,6 +673,9 @@ public:
else if (opt == m_reason_unknown) {
ctx.regular_stream() << "(:reason-unknown \"" << escaped(ctx.reason_unknown().c_str()) << "\")" << std::endl;
}
else if (opt == m_rlimit) {
ctx.regular_stream() << "(:rlimit " << ctx.m().limit().count() << ")" << std::endl;
}
else if (opt == m_all_statistics) {
ctx.display_statistics();
}