Archive for category Projects
My B.tech major project was to implement a ‘Scheme-to-Python Compiler for Android’ where the language used was Scheme (a variant of lisp ).The project aimed at developing a compiler which would translate application program written in Scheme to Python which in turn can be run on Android platform. Here I used the concept of ‘Meta-circular Evaluator’ from SICP (“Structure and Interpretation of Computer Program“ ) the ‘wizard book’, to recognize each expression and then ,instead of evaluating it, my program generated the corresponding the Python expression.
The Python program generated was stored in the SDcard of Android SDK.
Now for Python programs to be supported on Android platform, SL4A was to be installed on Android SDK . This platform enabled python generated program to be run on the SDK providing many of the API’s provided to a full-fledged Android applications . I demonstrated my project by using a “text-to-speech” API available to Python which would process the text message to generate the corresponding speech.
- The first button when pressed invokes the ‘DrScheme’ with the Scheme code in it.The code in scheme can be checked for correctness and run with it.
- The second button when pressed invokes the ‘Compiler code‘,proceeses the input scheme program and generates the correspoding python program.
- The third button when pressed invokes ‘IDLE’ ( a python IDE) for validating the generated python code.
- The fourth button with an icon of ‘Android’ copies the generated python code into the SDCard s(memory card) and starts the Android SDK.
The source code for the above project can be downloaded from my git hub => firstname.lastname@example.org:rohitnjan88/S-T-A.git
The application in Android SDK can be invoked by clicking on the SL4A icon in the menu.