Hacker News new | past | comments | ask | show | jobs | submit login
Coccinelle's Semantic Patches (lip6.fr)
40 points by vmorgulis on Jan 20, 2016 | hide | past | favorite | 3 comments



Google's Refaster is a similar idea: http://research.google.com/pubs/pub41876.html


As is the much older Jackpot (https://bitbucket.org/jlahoda/jackpot30/wiki/RulesLanguage). I believe James Gosling worked on the project, which is now integrated with NetBeans.

What's cool is that you can distribute the rules file alongside your new version of a library with its API changes, and NetBeans will automatically detect the rules if the user updates the dependency, and ask the user if they want to apply them. The downside is that not many people use NetBeans (or Jackpot for that matter).


Here's the dream; do a refactoring and submit patches for code review. The reviewers first ask "does this (unintentionally) change the behavior of the code?" They look at the semantic patch/run a semantic diff and see that it gives no output. So then they know that it is truly a refactoring and can review it as such without having to bother with any regression testing or anything like that.

Also, I want to have an option/convention to say that "this commit is best viewed with line-based diff/word-based diff, AST diff, semantic diff, ...".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: