Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An optimisation of underapproximation #112

Merged
merged 4 commits into from
Jan 12, 2024
Merged

An optimisation of underapproximation #112

merged 4 commits into from
Jan 12, 2024

Conversation

vhavlena
Copy link
Collaborator

@vhavlena vhavlena commented Jan 4, 2024

A minor change of co-finite check to allow a wider range of constraint to pass the underapproximation.

@vhavlena vhavlena changed the title An optimisations of underapproximation An optimisation of underapproximation Jan 4, 2024
@vhavlena vhavlena marked this pull request as ready for review January 8, 2024 18:58
@vhavlena
Copy link
Collaborator Author

vhavlena commented Jan 8, 2024

Results on all benchmarks.

# of formulae: 82972
###################################################################################
####                                   Table 1                                 ####
###################################################################################
| method                     |    max |     mean |   median |   std. dev |   TO+MO+ERR |   unknowns |
|----------------------------|--------|----------|----------|------------|-------------|------------|
| z3-noodler-482f3c0-387babd | 109.13 | 0.500252 |     0.02 |    3.69626 |        2028 |       2012 |
| cvc5-1.0.8                 | 119.36 | 0.515113 |     0.02 |    5.2351  |        1723 |          2 |
| z3-4.12.2                  | 119.29 | 1.49018  |     0.04 |    8.17615 |        2623 |        123 |
| ostrich-70d01e2d2-parikh   | 577.7  | 5.35069  |     2.47 |   11.7293  |       25162 |          0 |
| z3-noodler-feada45-a57f582 | 116.1  | 0.494545 |     0.02 |    3.67665 |        2198 |       2011 |

On kaluza 160 TOs less than devel.

kaluza

@vhavlena vhavlena requested review from jurajsic and Adda0 January 8, 2024 19:01
Copy link
Member

@jurajsic jurajsic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small stuff

Comment on lines 1386 to 1390
mata::OnTheFlyAlphabet mata_alphabet{};
for (const auto& symbol : alphabet) {
mata_alphabet.add_new_symbol(std::to_string(symbol), symbol);
}
mata::nfa::Nfa aut_compl = mata::nfa::complement(*(this->aut_ass.at(var)), mata_alphabet);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really make this a method of AutAssignment, I think I wrote such code multiple times already, and it is even used twice in this pull request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it more properly, the complement of NFA for var is computed twice here, once in is_co_finite and again here, can we reuse it somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. good point. Should be fixed now
  2. true, but I don't want to make a side effect in is_co_finite.

Copy link
Collaborator

@Adda0 Adda0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the already mentioned, seems fine to me.

@vhavlena vhavlena merged commit 0054dfc into devel Jan 12, 2024
@vhavlena vhavlena deleted the underapprox-opt branch January 12, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants