Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Staticly scoped environments

#11

Identifier references in CSPM are staticly scoped. Before implementing let bindings, λ abstractions, and variable references, I'll have to create an implementation of staticly scoped environments.

Reported by Douglas Creager · August 25th, 2008 @ 07:14 PM

State: resolved
Milestone: none
Assigned to: Douglas Creager Douglas Creager

Activity

  1. Douglas Creager
    Douglas Creager

    (from [2a3f31e387e7b41c1856ff79a47ad5bfebdea5cc]) CSPM environments

    An environment is the symbol table that hold CSPM definitions. They provide a standard mapping between identifiers and the expressions that define them. Environments can also have an optional parent, which allows nested scoping; if an identifier is not found in the current environment, we then proceed to look for it in the containing environment.

    This patch introduces the basic API for creating and using environments, but does not extend the evaluation rules to use them.

    Lighthouse: [#11 Staticly scoped environments] http://github.com/dcreager/hst/c...

    September 2nd, 2008 @ 07:10 PM

  2. Douglas Creager
    Douglas Creager

    (from [37739ef6e867fa53cb039c707bf15d4e1affd1ba]) Flattening the Expression type

    Before, we had separate datatypes for each “class” of expression; for instance, a Number type for any expression that always evaluates to a number. The Expression type was then defined as a sum type across all of these subtypes.

    This patch flattens things so that there's only a single Expression type. This simplifies things by removing a level of indirection in the type definitions, and also will make it easier to define “bound expressions” as we implement static-scoped environments.

    Lighthouse: [#11 Staticly scoped environments] http://github.com/dcreager/hst/c...

    September 2nd, 2008 @ 07:11 PM

  3. Douglas Creager
    Douglas Creager

    (from [260a78539f5808c2553f028caf28fc47e57ddb0c]) Let bindings

    This patch introduces evaluation rules for let bindings and variable references. Currently, this is the only way to define the value for a variable.

    Lighthouse: [#11 Staticly scoped environments] http://github.com/dcreager/hst/c...

    September 2nd, 2008 @ 07:11 PM

  4. Douglas Creager
    Douglas Creager
    • State changed from new to resolved

    (from [5767f91d2daf37310ef12fbfd1c7f0617780cc46]) Evaluation rules for lambdas

    This patch introduces lambdas and application statements. This requires carrying around bound expressions as regular expressions, since the actual parameters to an application are already bound, but we need to add those actual parameters to the environment created for evaluating the lambda body.

    Lighthouse: [#11 Staticly scoped environments state:resolved] http://github.com/dcreager/hst/c...

    September 2nd, 2008 @ 07:12 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.