Michael-F-Bryan / static-analyser-in-rust

An experiment in using literate programming to write a static analysis tool in Rust
https://michael-f-bryan.github.io/static-analyser-in-rust/
MIT License
18 stars 3 forks source link

Will be there futher development? #2

Open XVilka opened 5 years ago

XVilka commented 5 years ago

This project looks quite interesting, would be awesome to see it working one day.

Michael-F-Bryan commented 5 years ago

I haven't worked on this project in ages, but if there's interest I might get started again. Since I originally wrote this I've learner tons about compilers, so I'm curious to see how I'd do things differently.

Would you be interested in collaborating to develop/explore this further? What interests you about the project idea?

XVilka commented 5 years ago

Good, idea is to make a tool for conversion from old Delphi/Pascal codebases to Rust. Like https://github.com/immunant/c2rust

On Sat, Jun 1, 2019, 1:36 PM Michael Bryan notifications@github.com wrote:

I haven't worked on this project in ages, but if there's interest I might get started again. Since I originally wrote this I've learner tons about compilers, so I'm curious to see how I'd do things differently.

Would you be interested in collaborating to develop/explore this further? What interests you about the project idea?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Michael-F-Bryan/static-analyser-in-rust/issues/2?email_source=notifications&email_token=AABRT7NYCEVXQJW6F4XRL6DPYIDHPA5CNFSM4HRUKJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWWZLAA#issuecomment-497915264, or mute the thread https://github.com/notifications/unsubscribe-auth/AABRT7KRIC3LUGLHZFDCHVDPYIDHPANCNFSM4HRUKJEA .

Michael-F-Bryan commented 5 years ago

You might have a hard time of that... Delphi isn't particularly compatible with Rust's way of doing things.

Like C, Delphi has shared mutable pointers all over the place, but it's also big on inheritance and Rust doesn't provide an easy way to do inheritance.

... That said, I reckon writing a program to port Delphi code to unsafe Rust would be a very educational exercise. It's. It not a small job, but having a compiler frontend/static analyser would be the first step in that direction.

XVilka commented 5 years ago

@Michael-F-Bryan well, aforementioned c2rust apparently solved this problem, moreover, aside of the transpiler itself, it offers a set of resulting Rust code refactoring tools: image

So after implementing transpiler, the rest of c2rust tools can be reused as is, with maybe a slight modifications, and these modifications even can be pushed upstream. At least this is what I have in mind.

blaumeise20 commented 2 years ago

Please implement the type checker and static analysis! I really want to learn more about this.