Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

Add a warning when selected no methods for inclusion#1707

Merged
feliam merged 2 commits into
masterfrom
dev-filters
May 19, 2020
Merged

Add a warning when selected no methods for inclusion#1707
feliam merged 2 commits into
masterfrom
dev-filters

Conversation

@feliam

@feliam feliam commented May 14, 2020

Copy link
Copy Markdown
Contributor

No description provided.

logger.warning("No functions selected, adding False to path constraint.")
# constrain the input so it can take only the interesting values
constraint = reduce(Operators.OR, (tx.data[:4] == x for x in selected_functions))
constraint = reduce(Operators.OR, (tx.data[:4] == x for x in selected_functions), False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This unconditionally adds False to the path constraint, right? Not just if there aren't any functions selected, as the log message would seem to imply. Is the problem that constraint is empty otherwise?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Per dev meeting, False is needed here so that the reduce isn't empty when selected_functions is empty.

@ehennenfent ehennenfent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clarification questions answered; LGTM!

logger.warning("No functions selected, adding False to path constraint.")
# constrain the input so it can take only the interesting values
constraint = reduce(Operators.OR, (tx.data[:4] == x for x in selected_functions))
constraint = reduce(Operators.OR, (tx.data[:4] == x for x in selected_functions), False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Per dev meeting, False is needed here so that the reduce isn't empty when selected_functions is empty.

@feliam
feliam merged commit c2b847a into master May 19, 2020
@feliam
feliam deleted the dev-filters branch May 19, 2020 17:05
ekilmer added a commit that referenced this pull request Jun 15, 2020
* master:
  Symbolic model for strcpy (#1681)
  Rollback to support yices again (#1714)
  Fix default output space when workspace is in mem: (#1724)
  VMTests tests for istanbul (#1676)
  Snapshots & is_main (#1710)
  Fix Black (#1718)
  Use CoverageRC, Make CodeCov Less Aggressive (#1705)
  Fix plugin enable/disable magic (#1708)
  Add a warning when selected no methods for inclusion (#1707)
  Remove duplicated entries (#1709)
  Blacken (#1711)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants