Giter VIP home page Giter VIP logo

cs251's Introduction

Overview
========
Our interpreter is interactive, and possesses a minimal library of scheme functions. 
All functions specified in the assignment are implemented, as are some not specified. 
Our error handling is primitive (it distinguishes only between syntax and runtime 
errors) as no further specifications were published for error handling. While we do 
not implement full garbage collection, we do implement reference counting for some 
objects (specifically, those used in the Parser and therefore likely to be lost). 
Thus, our memory leaks, while not eliminated, have been substantially reduced. Our 
interpreter does load files specified by command line arguments.

Specific Notes
--------------
append  - The append function does not conform to racket specifications. In particular,
	  it will turn all non-list arguments passed to it into lists. So, while
	  (append (1) 2 (3) 4) would crash in racket, in our interpretation it will
	  return the list (1 2 3 4).

modulo  - Although not specified in the assignment, modulo is implemented. It also does
	  not conform to racket specifications exactly. In particular, in racket, 
	  passing in (modulo 2.0 3.0) will return 2.0, whereas our implementation will
	  crash if given non-integer arguments (even if they are integral).

range   - The published range test works for our program, but it fails when provided
	  with too large an argument because of stack overflow. Our testing indicates
	  that this happens somewhere between 13000 and 14000, and that DrRacket also
	  requires more memory to evaluate the same code.

tests   - Our test files are in the Scheme directory, labelled test.input.xx


Build Instructions
==================
    1.  Install CMake 2.8.x (http://www.cmake.org/)

    2.  cd to this directory

    3.  To produce a makefile and executables, run:
            mkdir build
            cd build
            cmake ..
            make

    4.  To run the interpreted, run:
	    ./interpreter

    5.  To run the automated test suite, run:
            ./test


Testing Insructions
===================
To run both the parser and tokenizer against all tests at once, use the
RunTests.sh script in the Other folder.  You will need CMake installed.



Coding Standards
================

    File Layout
    ===========
        - 2 blank lines after preprocessor directive at top of file.
        - 2 blank lines before #endif at end of header files.
        - Header files contain all struct definitions, then all function definitions.
        - 2 blank lines after struct declarations.
        - 1 blank line after function declarations.
        - 2 blank lines after function definitions.

    Commenting
    ==========
        Rules:
            - Comments should wrap at 80 characters.
            - But try to keep them on a single line if possible.
            - Doxygen style comments for structs and function declarations.
            - No comment necessary for function definitions.
            - Try to paraphrase the struct or function name rather than repeating it.

        Examples:
            +------------------------------------------------------------------+
            |  /// Perform a surprise operation on a location in memory        |
            |  void doSomething (void* object);                                |
            +------------------------------------------------------------------+

            +------------------------------------------------------------------+
            |  /// Some very mysterious information                            |
            |  struct                                                          |
            |  {                                                               |
            |      void* something;                                            |
            |  }                                                               |
            |  typedef Data;                                                   |
            +------------------------------------------------------------------+

cs251's People

Contributors

calder avatar knipec avatar maegereg avatar

Watchers

 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.