Skip to content

nfa: +fix Build the product map in naive inclusion only for a counterexample - #874

Merged
Adda0 merged 1 commit into
develfrom
issue-750-incl-prodmap-pr
Oct 8, 2026
Merged

Adda0 merged 1 commit into
develfrom
issue-750-incl-prodmap-pr

Conversation

@Adda0

@Adda0 Adda0 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

is_included_naive() always passed &prod_map to intersection(), but it
only reads the map to translate the counterexample path back to smaller's
states. Without a counterexample the map is filled and thrown away.

Measured on a 600 000-state / 3 591 612-transition product (Release
-O3 -DNDEBUG, GCC 16.2, pinned to one core, 3 runs): intersection() takes
536-574 ms with the map and 218-297 ms without it.

Part of #750.
Part of #726.

@Adda0
Adda0 marked this pull request as ready for review October 8, 2026 12:57
…example

`is_included_naive()` always passed `&prod_map` to `intersection()`, but it
only reads the map to translate the counterexample path back to `smaller`'s
states. Without a counterexample the map is filled and thrown away.

Measured on a 600 000-state / 3 591 612-transition product (Release
`-O3 -DNDEBUG`, GCC 16.2, pinned to one core, 3 runs): `intersection()` takes
536-574 ms with the map and 218-297 ms without it.

Part of #750.
Part of #726.
@Adda0
Adda0 force-pushed the issue-750-incl-prodmap-pr branch from 0351789 to 2e512cb Compare October 8, 2026 12:58
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Optimizes product map construction in inclusion check.

The PR appears safe to merge; it skips an unused map without changing inclusion results or counterexample paths.

What we checked:

  • Inclusion without a counterexample: product_storage tracks product states independently. Writes to product_map check for null, and is_included_naive() only reads the map when cex is non-null.
Summary

is_included_naive() now asks intersection() to fill prod_map only when the caller requests a counterexample.

  • Avoids unused map entries when cex is null.
  • Keeps counterexample path translation unchanged.
  • No actionable issues found.

Reviews (1) · Last reviewed commit: 0351789 · Reviewed by Greptile

@Adda0
Adda0 enabled auto-merge (rebase) October 8, 2026 13:03
@Adda0
Adda0 merged commit f912339 into devel Oct 8, 2026
26 checks passed
@Adda0
Adda0 deleted the issue-750-incl-prodmap-pr branch October 8, 2026 13:14
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.

1 participant