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

[LTL] Added overloadings for AssertProperty #4037

Merged
merged 7 commits into from
May 1, 2024

Conversation

dobios
Copy link
Member

@dobios dobios commented May 1, 2024

This PR adds two overloadings for AssertProperty, which allow for it to be used on Bools without importing Sequence._.

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • API modification

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@dobios dobios changed the title [Fornal] Added overloadings for AssertProperty [LTL] Added overloadings for AssertProperty May 1, 2024
Copy link
Member

@sequencer sequencer left a comment

Choose a reason for hiding this comment

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

Can you add a simple test?

@dobios
Copy link
Member Author

dobios commented May 1, 2024 via email

@jackkoenig jackkoenig added the Feature New feature, will be included in release notes label May 1, 2024
@jackkoenig jackkoenig added this to the 3.6.x milestone May 1, 2024
@jackkoenig
Copy link
Contributor

@dobios make sure to run formatting! https://github.com/chipsalliance/chisel/blob/main/CONTRIBUTING.md#im-failing-the-formatting-check-how-do-i-make-sure-my-code-is-formatted

Comment on lines 366 to 369
/**
* Overloads the apply method to allow for Bool expressions to be used in AssertProperty.
* This avoids having to import Sequence on the user side to get the implicit conversion.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there's really a reason to mention overloading in the ScalaDoc, from the user's perspective this is just the API they should call (I would just basically copy-paste the ScalaDoc on the main apply function although it would be good to turn those bullets into actual Scaladoc (using @param).

We also need a form that takes clock and disable. This is annoying since we can't have another apply with default arguments, but maybe just have 3, one taking the prop, one taking the prop and label, and one taking all of the arguments.

@jackkoenig
Copy link
Contributor

@sequencer commented on this pull request.
Can you add a simple test?
This is already covered by several existing tests in LTLSpec, which is why I didn't add one.

To elaborate a little, places like

were using the implicit conversion but now use the overloaded method

@jackkoenig jackkoenig enabled auto-merge (squash) May 1, 2024 20:41
@jackkoenig jackkoenig modified the milestones: 3.6.x, 6.x, 5.x May 1, 2024
@jackkoenig jackkoenig merged commit 5cf2b40 into chipsalliance:main May 1, 2024
13 checks passed
@mergify mergify bot added the Backported This PR has been backported label May 1, 2024
mergify bot pushed a commit that referenced this pull request May 1, 2024
(cherry picked from commit 5cf2b40)

# Conflicts:
#	src/main/scala/chisel3/ltl/LTL.scala
mergify bot pushed a commit that referenced this pull request May 1, 2024
chiselbot pushed a commit that referenced this pull request May 1, 2024
(cherry picked from commit 5cf2b40)

Co-authored-by: Amelia Dobis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants