Recoder icon indicating copy to clipboard operation
Recoder copied to clipboard

Instruction to train Recoder on other languages

Open victorcwai opened this issue 3 years ago • 16 comments

Hi all,

To my understanding Recoder needs to extract the host language grammar rules. So it would be great to have instructions on how to train Recoder on other languages. Just looking at the code I can see running solvetree.py will produce a rule.pkl, is there anything else required?

Thanks.

victorcwai avatar Jan 23 '22 19:01 victorcwai

Please offer an email address for me and I will offer you the related code.

pkuzqh avatar Jan 24 '22 04:01 pkuzqh

You can contact me via [email protected]. Thank you very much!

victorcwai avatar Jan 24 '22 10:01 victorcwai

Hello @pkuzqh! Hope you're doing great! Could I also have the instructions/code for training Recoder on other programming languages? My email es [email protected]. Thank you in advance!

acchavezm avatar Aug 25 '22 02:08 acchavezm

@pkuzqh my email address is [email protected]. Can you please share the related code with me?

nashid avatar Sep 26 '22 23:09 nashid

Hi @pkuzqh , can this be trained on languages e.g. JavaScript? If so, can you please share the related code in my mail ([email protected])?

msintaha avatar Sep 26 '22 23:09 msintaha

Since our code processing the raw method is written based on the grammar of Java, it needs you to write a new script to process the code written in a new language based on the original script runsolvereplace2.py

pkuzqh avatar Sep 27 '22 02:09 pkuzqh

We also are working on transforming the implementation using tree-sitter to add support for other languages.

pkuzqh avatar Sep 27 '22 02:09 pkuzqh

@pkuzqh do you have a tentative timeline of when the tree-sitter implementation will be available?

nashid avatar Sep 27 '22 02:09 nashid

Since our code processing the raw method is written based on the grammar of Java, it needs you to write a new script to process the code written in a new language based on the original script runsolvereplace2.py

@pkuzqh unless I'm mistaken, it doesn't appear that runsolvereplace2.py is included in the repo.

nashid avatar Sep 27 '22 02:09 nashid

sorry, it is in https://disk.pku.edu.cn:443/link/37FED995C8031D4DB8212BC517ECC3A1. Maybe I need several months to change the grammar used in our tools.

pkuzqh avatar Sep 27 '22 02:09 pkuzqh

I will try my best to re-implement it as soon as possible.

pkuzqh avatar Sep 27 '22 02:09 pkuzqh

@pkuzqh we need the JS support for Recoder in the coming weeks. It appears we should look into the implementation ofrunsolvereplace2.py script and mimic the logic for JS.

That said do you think it is even realistic for us to try adding support for JavaScript within the current tool? What would you recommend?

nashid avatar Sep 27 '22 03:09 nashid

sorry, it is in https://disk.pku.edu.cn:443/link/37FED995C8031D4DB8212BC517ECC3A1. Maybe I need several months to change the grammar used in our tools.

I am trying to download newdata.zip from https://disk.pku.edu.cn:443/link/37FED995C8031D4DB8212BC517ECC3A1. However, its timing out in my first couple of attempt. I will try to download it again.

Also curious to know whether runsolvereplace2.py would be available as part of the repo?

nashid avatar Sep 27 '22 03:09 nashid

Sure. I will upload it soon.

pkuzqh avatar Sep 27 '22 03:09 pkuzqh

Emmmm. I think it is hard to implement it in JavaScript in several weeks, because it should consider several unique properties of JavaScript.

pkuzqh avatar Sep 27 '22 03:09 pkuzqh

@pkuzqh thanks for your feedback. We would wait for the tree-sitter implementation to be available. Please keep us updated!

nashid avatar Sep 27 '22 03:09 nashid