-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat: added swap-in mutator #646
Conversation
Codecov Report
@@ Coverage Diff @@
## main #646 +/- ##
==========================================
- Coverage 68.22% 67.50% -0.72%
==========================================
Files 62 62
Lines 8062 8208 +146
Branches 1812 1775 -37
==========================================
+ Hits 5500 5541 +41
- Misses 2482 2660 +178
+ Partials 80 7 -73
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great to me! Just a minor point about finding IDs of the same type below.
Hopefully the refactored version made things easier to implement :D.
✔️ Deploy Preview for penrose-saurus ready! 🔨 Explore the source changes: 4b52b0d 🔍 Inspect the deploy log: https://app.netlify.com/sites/penrose-saurus/deploys/61f81a829296ac0007a64d46 😎 Browse the preview: https://deploy-preview-646--penrose-saurus.netlify.app |
Deploying with Cloudflare Pages
|
… a statement before picking an argument to swap-in, addressed feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new changes look good to me! Please feel free to merge whenever you think this is ready.
Description
Added a new mutator to the synthesizer called the swap-in mutator. For any predicate, function, or constructor, this mutator will replace one of the statement's arguments with another random variable of the same type that is in scope. For instance:
A valid Swap-in mutation would be
IsSubset(B, A) -> IsSubset(B, C)
. Note thatIsSubset(B, B)
is not a valid swap because the argument is already included.Implementation strategy and design decisions
Builds upon Nimo's refactor of the synthesis module.
Examples with steps to reproduce them
yarn start
from rootyarn set-example
frompackages/synthesizer
yarn generate-site
frompackages/automator
index.html
in your browserChecklist
yarn test
yarn docs
and there were no errors when generating the HTML siteOpen questions