pkuzqh / Recoder

MIT License
52 stars 11 forks source link

Instruction to train Recoder on other languages #5

Open victorcwai opened 2 years ago

victorcwai commented 2 years ago

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.

pkuzqh commented 2 years ago

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

victorcwai commented 2 years ago

You can contact me via victorcwai@gmail.com. Thank you very much!

acchavezm commented 2 years ago

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

nashid commented 1 year ago

@pkuzqh my email address is noor.nashid1@gmail.com. Can you please share the related code with me?

msintaha commented 1 year ago

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

pkuzqh commented 1 year ago

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 commented 1 year ago

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

nashid commented 1 year ago

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

nashid commented 1 year ago

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.

pkuzqh commented 1 year ago

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 commented 1 year ago

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

nashid commented 1 year ago

@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 commented 1 year ago

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?

pkuzqh commented 1 year ago

Sure. I will upload it soon.

pkuzqh commented 1 year ago

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

nashid commented 1 year ago

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