mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
extended calculation of info for regexes (#4656)
* extended calculation of info for regexes, updated tracing of state_graph with regex info * took care of PR comments and fixed some info calculation bugs * fix rlimit for clang-10 (#4658) * merge Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * extended calculation of info for regexes, updated tracing of state_graph with regex info * took care of PR comments and fixed some info calculation bugs * added missing return statements, reordered def of compl to match declaration order of methods * fixed loop lower bound bug in loop info and default nullable value in invalid_info * fixed type bug: bool to lbool * trying to remove invisible control characters * renamed compl method (compl is a reserved c++ keyword) to complement Co-authored-by: Arie Gurfinkel <arie.gurfinkel@uwaterloo.ca> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
db65381f33
3 changed files with 281 additions and 32 deletions
|
@ -793,11 +793,12 @@ namespace smt {
|
|||
}
|
||||
STRACE("seq_regex", tout << "Updating state graph for regex "
|
||||
<< mk_pp(r, m) << ") ";);
|
||||
if (!m_state_graph.is_seen(r_id))
|
||||
STRACE("state_graph", tout << std::endl << "state(" << r_id << ") = " << seq_util::rex::pp(re(), r) << std::endl;);
|
||||
|
||||
STRACE("state_graph",
|
||||
if (!m_state_graph.is_seen(r_id))
|
||||
tout << std::endl << "state(" << r_id << ") = " << seq_util::rex::pp(re(), r) << std::endl << "info(" << r_id << ") = " << re().get_info(r) << std::endl;);
|
||||
// Add state
|
||||
m_state_graph.add_state(r_id);
|
||||
STRACE("state_graph", tout << "regex(" << r_id << ") = " << mk_pp(r, m) << std::endl;);
|
||||
STRACE("seq_regex", tout << "Updating state graph for regex "
|
||||
<< mk_pp(r, m) << ") " << std::endl;);
|
||||
STRACE("seq_regex_brief", tout << std::endl << "USG("
|
||||
|
@ -815,12 +816,12 @@ namespace smt {
|
|||
for (auto const& dr: derivatives) {
|
||||
unsigned dr_id = get_state_id(dr);
|
||||
STRACE("seq_regex_verbose", tout
|
||||
<< std::endl << " traversing deriv: " << dr_id << " ";);
|
||||
if (!m_state_graph.is_seen(dr_id))
|
||||
STRACE("state_graph", tout << "state(" << dr_id << ") = " << seq_util::rex::pp(re(), dr) << std::endl;);
|
||||
<< std::endl << " traversing deriv: " << dr_id << " ";);
|
||||
STRACE("state_graph",
|
||||
if (!m_state_graph.is_seen(dr_id))
|
||||
tout << "state(" << dr_id << ") = " << seq_util::rex::pp(re(), dr) << std::endl << "info(" << dr_id << ") = " << re().get_info(dr) << std::endl;);
|
||||
// Add state
|
||||
m_state_graph.add_state(dr_id);
|
||||
STRACE("state_graph", tout << "regex(" << dr_id << ") = " << mk_pp(dr, m) << std::endl;);
|
||||
bool maybecycle = can_be_in_cycle(r, dr);
|
||||
m_state_graph.add_edge(r_id, dr_id, maybecycle);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue