Inspiration

Every programmer is unique in writing the code. Among all, We need one optimal program which uses less resources and gives the accurate output. So, till now there is no such tool which takes a program as an input and shoot out the optimal version of it. So, we thought we should initiate it.

What it does

Basically, we calculate the time complexity and space complexity of the given program. And try to generate a dynamic code block by block which uses less time and space than the inputted one.

How I built it

We parsed and segregated the program in different lines. Every keyword has different formula to calculate the time & space complexities. So, we should write regular expression for each and every keyword available in java to recognize the pattern in the parsed program. Then, we figure out the possible ways to optimize it.

Challenges I ran into

We were able to write the regular expression to recognize the pattern of all initializations in example program which we took as input. And we still have to write regular expressions for loops, conditions, etc. We would have developed more functionality if we have more team members. but, we are only two for now. So, one for regex and one for integration. we had hard time doing this complex project with very less number of people.

Accomplishments that I'm proud of

By end of the second day we wrote the regular expression which can recognize the any type of initialization irrespective of data type, data, variable name even it's a thousand lines of code.

What I learned

We actually went through all types of regex formations, so now I hope we can write regex for all keywords in less time which actually takes a major share in whole project.

What's next for Source code optimization tool

If we can generate the optimized code out of given code, yes we would love to expand this to multiple languages.

Built With

Share this project:

Updates