1 / 9

microScheme Advanced Programming: Notions, Algorithms, and Environment

Explore advanced topics in microScheme programming, including input processing algorithms, environment notion extensions, and command patterns. Learn about recursion, type matching, and expression parser. Dive into self-evaluating expressions and symbol evaluation. Discover the use of internal environments and exception handling in microScheme. No push and pop operations to ensure previous environments are retained.

Télécharger la présentation

microScheme Advanced Programming: Notions, Algorithms, and Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MScheme Advanced Programming 2009/2010 – Group 23 Rui Sebastião 56939 José Duarte Lourenço 58515 Sofia Teixeira 58600

  2. Agenda • Architecture • Input Processing • Algorithm • Environment Notion • Extensions • microScheme Reference

  3. Architecture • Command pattern • Recursion

  4. Input Processing • Main Expression Parser • If-else structure • String matching with the language reference… • … Or Type Matching with language types

  5. Input Processing – Algorithm 1/2 • Check the car of incoming cons • If it is a known command, execute it with our eval nodes • Inside each eval node: • Evaluate recursively with Expression Parser the car of the expression received until it is of a known type

  6. Input Processing – Algorithm 2/2 • If it is of a known type, perform adequate evaluation • Self evaluating expressions • Cons expressions • Symbols that are Functions and must evaluate again on Expression Parser

  7. EnvironmentNotion • At the beginning of the program, an initial environment is set with the known symbols and keywords • On each let, let*,letrec instruction and lambda a new internal environment is pushed into our List of Environments • At the end of its execution, the stack pointer returns to the global environment • No push and pop operations: we don’t want to lose previous environments!

  8. Extensions • Exception handling • Approaching our types to the ones in Scheme • JFields

  9. microSchemeReference

More Related