Skip to content

feat: Add support for multiple invariants in CLI commands #1662

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jesicaMao
Copy link

  • Tests added for any new code
  • Documentation added for any new functionality
  • Entries added to the respective CHANGELOG.md for any new functionality
  • Feature table on README.md updated for any listed functionality

This PR implements the feature requested in issue #1573 to support checking multiple invariants and reporting which specific ones were violated.
Changes include:
Added support for the --invariants CLI option to accept a list of invariants
Combined multiple invariants with logical AND for evaluation
Implemented detailed reporting of which specific invariants were violated
Updated documentation with examples showing how to use the feature
Added support for both simulator and verification modes

Fixes #1573

@jesicaMao
Copy link
Author

@bugarela Could you kindly check #1662 . Please let me know if I need to change anything.

Copy link
Collaborator

@bugarela bugarela left a comment

Choose a reason for hiding this comment

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

Hi, some preliminary comments. I'm getting some compilation issues, also reported by the CI. Was this working for you?

Comment on lines 325 to 326
const guessedMainModule = guessMainModule(prev)
const mainName = prev.args.main || guessedMainModule
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change is not necessary, as guessMainModule already returns prev.args.main if provided.

Suggested change
const guessedMainModule = guessMainModule(prev)
const mainName = prev.args.main || guessedMainModule
const mainName = guessMainModule(prev)

Comment on lines 521 to 522
const guessedMainModule = guessMainModule(prev)
const mainName = prev.args.main || guessedMainModule
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const guessedMainModule = guessMainModule(prev)
const mainName = prev.args.main || guessedMainModule
const mainName = guessMainModule(prev)

@jesicaMao jesicaMao force-pushed the feat/multiple-invariants-reporting branch from a7d8ca7 to 8e0c3de Compare May 21, 2025 17:33
@jesicaMao
Copy link
Author

@bugarela I have made the changes. Could you kindly check and let me know if everything is alright?

@bugarela
Copy link
Collaborator

Hi, sorry for the delay. Seems like there are still compilation issues. Are you able to successfully run npm run compile locally?

@jesicaMao
Copy link
Author

Hi @bugarela. I did run npm run compile locally after making the changes. Let me check again and I will let you know as soon as I can. Thank You.

@jesicaMao
Copy link
Author

@bugarela please check if everything is alright now.

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.

Enable checking a set of invariants and see which ones broke
2 participants