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

feat(spoon-smpl): initial support for the semantic patch language (Credits: Mikael Forsberg) #3282

Merged
merged 344 commits into from
Mar 8, 2021

Conversation

mkforsb
Copy link
Contributor

@mkforsb mkforsb commented Mar 4, 2020

Early work in progress for #1918. Draft PR suggested by @monperrus.

More info: https://github.com/mkforsb/spoon/tree/smpl/spoon-smpl

  • add CI
  • checkstyle
  • add spoon-smpl.md in docs for the end user

@mkforsb mkforsb changed the title spoon-smpl WIP: spoon-smpl Mar 4, 2020
@monperrus
Copy link
Collaborator

Nice!

We need to add some lines in travis-extra.sh to make sure that CI compiles and runs the tests of spoon-smpl.

@monperrus monperrus changed the title WIP: spoon-smpl WIP(spoon-smpl): support for semantic patch language Mar 5, 2020
mkforsb added 25 commits April 20, 2020 18:53
…ng a CtMethod, remove no-longer-relevant tests
@nharrand nharrand marked this pull request as ready for review February 3, 2021 13:53
@nharrand nharrand changed the title WIP feature(spoon-smpl): support for semantic patch language feat(spoon-smpl): support for semantic patch language Feb 3, 2021
@monperrus
Copy link
Collaborator

Hi all,

Mikael @mkforsb has finished his master thesis about SmPL for Java based on Spoon.

Mikael's thesis is at http://www.csc.kth.se/~ann/exjobb/mikael_forsberg.pdf

This PR is ready, and we've spent two hours sharing and documenting the key architectural facts of this advanced piece of code. The code is well designed, well tested, well documented.

Mikael would be happy to provide support to early adopters of Spoon SmPL.

So all in all, I propose to merge it.

@mkforsb
Copy link
Contributor Author

mkforsb commented Feb 7, 2021

Preview of the new end user docs page: spoonsmpldoc.pdf

@gordonwoodhull
Copy link

Thank you for releasing this. SmPL is very powerful and the implementation looks like it will scale well.

I had trouble with formatting in the GUI (black on black text etc) when copying and pasting on MacOS, so I changed the text editors to plain text:

diff --git a/spoon-smpl/tools/smplgui.py b/spoon-smpl/tools/smplgui.py
index 2eba323b..e70ac69a 100755
--- a/spoon-smpl/tools/smplgui.py
+++ b/spoon-smpl/tools/smplgui.py
@@ -55,14 +55,16 @@ class Main(QMainWindow):
     def initUI(self):
         self.box_left = QHBoxLayout()
         self.box_main = QVBoxLayout()
+
+        self.mono_font = QFont("Courier", 16)
         
-        self.smpl_text = QTextEdit()
-        self.smpl_text.setStyleSheet("font: normal 12pt monospace")
+        self.smpl_text = QPlainTextEdit()
+        self.smpl_text.setFont(self.mono_font)
         self.smpl_text.setTabStopWidth(12)
         self.smpl_text.keyPressEvent
         
-        self.java_text = QTextEdit()
-        self.java_text.setStyleSheet("font: normal 12pt monospace")
+        self.java_text = QPlainTextEdit()
+        self.java_text.setFont(self.mono_font)
         self.java_text.setTabStopWidth(12)
         
         if os.path.exists("/tmp/smplgui_py_smpl_text.cocci"):

@monperrus monperrus changed the title feat(spoon-smpl): support for semantic patch language feat(spoon-smpl): initial support for the semantic patch language (Credits: Mikael Forsberg) Mar 8, 2021
@monperrus monperrus merged commit a81e473 into INRIA:master Mar 8, 2021
@monperrus
Copy link
Collaborator

@mkforsb You're now live on master! Congratulations again on your excellent master's thesis work!

@monperrus
Copy link
Collaborator

@gordonwoodhull all documentation improvements and bug fixes are welcome as pull-requests to master here in this repository.

woutersmeenk pushed a commit to woutersmeenk/spoon that referenced this pull request Aug 29, 2021
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.

4 participants