Coder Social home page Coder Social logo

cs173-python's Introduction

Overall Design
--------------

Think, desugaring set to MAX. CPS is used heavily. The language we
interpret has only primitive types, primitive ops, if, let, set, seq, lambdas,
and function application.

See LANGUAGES.txt for a description of the languages (we have three - a
surface, a core, and a micro-core).

Current Status
------------------

Right now this is a skeleton. I ripped out and rewrote pretty much everything
after the first checkpoint, and so it passes NO tests currently (that I'm
aware of). The reason for this is that it was a pretty massive overhaul to get
let/cc in, and I haven't gotten around to fixing the trivial examples. It
shouldn't actually be that much work to get lots of tests working - while loops
with break/continue are working, functions / early return are almost working,
exceptions are implemented but untested. There is a file python-tests.rkt that
shows a few high-level examples, and there are various tests in code.

Bugs/Limitations
----------------

There is a bug that prevents how USet (mutation) works, so that the mutations
are trapped inside the closure environment, and since the simplistic way I'd
implemented python FunctionDefs uses mutation, they won't work (and of course,
mutation won't work). This also doesn't currently handle any python scoping
rules, though that should be a pretty easy desugar (hoist into lets with an
Unbound value, through an error if it hasn't been modified).


Implementation Notes
--------------------

1. For identifiers that should are created with desugaring, I adopt the
convention of preceeding them with a carat (^). This is a legal character
for identifiers in racket but not in python, so it will make all identifiers
not collide.


cs173-python's People

Contributors

jpolitz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.