Skip to content
forked from ezelikman/parsel

Code for Parsel 🐍 - generate complex programs with language models

Notifications You must be signed in to change notification settings

brando90/parsel

Repository files navigation

In order to run this project, here are some example commands:

  • python parsel.py programs/problem_solving.ss will run and transpile the program in the file programs/problem_solving.ss.
  • python parsel.py programs/collatz_recursion.ss shows an example of a recursive function.
  • To run python parsel.py programs/and_commute.ss, change the mode in consts/__init__.py to lean and (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.ss you will need to use the -e flag to automatically expand / decompose it.
  • To run game_of_life_inverse_fill.ss you will need to use the -a to 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.

About

Code for Parsel 🐍 - generate complex programs with language models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.0%
  • Jupyter Notebook 15.1%
  • Scheme 5.5%
  • Lean 0.4%