In order to run this project, here are some example commands:
python parsel.py programs/problem_solving.sswill run and transpile the program in the fileprograms/problem_solving.ss.python parsel.py programs/collatz_recursion.ssshows an example of a recursive function.- To run
python parsel.py programs/and_commute.ss, change the mode inconsts/__init__.pytoleanand (assuming you have Lean installed), it will generate a Lean file in the same directory as the input file. - To run
game_of_life_inverse_expand.ssyou will need to use the-eflag to automatically expand / decompose it. - To run
game_of_life_inverse_fill.ssyou will need to use the-ato autofill the program with functions that are called but not used.
In general, to configure Parsel for a new target programming, you'll need to create a new file in consts/ and add it to consts/__init__.py. In addition, to use the OpenAI models, you'll need to create a keys/codex_key.txt file in the format organization_id:api_key.