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.

CSPM to CSP₀ compiler

#2

A major new subsystem that we need is a compiler from the existing higher-level CSPM language down to the CSP₀ “assembly” language. None of the design decisions for this compiler have even been identified, let alone resolved.

Reported by Douglas Creager · April 26th, 2008 @ 12:06 AM

State: resolved
Milestone: 1.0-α3
Assigned to: Douglas Creager Douglas Creager

Activity

  1. Douglas Creager
    Douglas Creager
    • Assigned user set to Douglas Creager

    April 26th, 2008 @ 12:14 AM

  2. Douglas Creager
    Douglas Creager
    • Milestone set to 1.0-α2

    April 27th, 2008 @ 07:42 PM

  3. Douglas Creager
    Douglas Creager
    • State changed from new to open

    April 27th, 2008 @ 07:42 PM

  4. Douglas Creager
  5. Douglas Creager
    Douglas Creager
    • Tag set to csp0, cspm

    I've decided to use Haskell as the implementation language for the CSPM bits of HST. (Thanks to David Faitelson for the idea!) Since it's a lazy functional language, I can steal all of those bits from Haskell itself, and not have to reinvent anything for CSPM.

    August 25th, 2008 @ 07:11 PM

  6. Douglas Creager
    Douglas Creager

    (from [2b108c39f9179982b3d2447a980928aeb81e99d5]) Initial Haskell CSPM implementation

    This is an initial patch implementing the CSPM language in Haskell. I've chosen Haskell since, like CSPM, it's a lazy functional language. This means we don't have to “implement” any of the functional features of CSPM; rather, we can just call the appropriate Haskell functions.

    This patch includes a basic implementation of the simple non-process expressions in CSPM. It does not yet include variable references, ‘let’ bindings, or functions, since they'll all require static-scoped environments. There is a basic test suite, based on QuickCheck. I also still need to wrap everything up in a Cabal package.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    August 26th, 2008 @ 04:36 PM

  7. Douglas Creager
    Douglas Creager

    (from [6ee10a95b2524c1f021968f4e51d028c206df988]) Initial support for CSP₀ scripts

    This patch introduces support for CSP₀ scripts. It has functions for creating CSP₀ statements and scripts, but there's no functionality yet for translating CSPM into CSP₀.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    September 30th, 2008 @ 11:20 PM

  8. Douglas Creager
    Douglas Creager

    (from [893bd7eea2410221f85d076815f92f677d8c72ae]) Binding and evaluation now take place in a monad

    Once we add process terms to the CSPM language, we'll need a State monad to bind and evaluate them, since we'll need to generate new, unique process names during evaluation. This patch refactors the existing binding and evaluation code to use a State monad. Right now, the state is empty, but once we introduce processes, it will contain the list of used process names.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    September 30th, 2008 @ 11:20 PM

  9. Douglas Creager
    Douglas Creager

    (from [06628c3b6114894c0d8cac5a3f5b327a0e922acd]) Evaluate process expressions

    This patch introduces initial support for evaluating process expressions into the equivalent CSP₀ scripts. There are still several important features to implement. Process names are based on the outermost named process term. Currently, these can only be introduced by a let statement. Functions that return processes don't completely work yet, since we'll need to encode the parameters of the function into the names of the processes that are generated by the function application. Finally, there isn't yet a good test suite for these new features.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    September 30th, 2008 @ 11:20 PM

  10. Douglas Creager
    Douglas Creager

    (from [7ed2249fe1b6063e163cc121b3289f37bfdf5969]) Binding and evaluation now take place in a monad

    Once we add process terms to the CSPM language, we'll need a State monad to bind and evaluate them, since we'll need to generate new, unique process names during evaluation. This patch refactors the existing binding and evaluation code to use a State monad. Right now, the state is empty, but once we introduce processes, it will contain the list of used process names.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 6th, 2008 @ 10:04 PM

  11. Douglas Creager
    Douglas Creager

    (from [6257983d18e9ad718d8dbc9d7e528bda55098fcd]) Evaluate process expressions

    This patch introduces initial support for evaluating process expressions into the equivalent CSP₀ scripts. There are still several important features to implement. Process names are based on the outermost named process term. Currently, these can only be introduced by a let statement. Functions that return processes don't completely work yet, since we'll need to encode the parameters of the function into the names of the processes that are generated by the function application. Finally, there isn't yet a good test suite for these new features.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 6th, 2008 @ 10:04 PM

  12. Douglas Creager
    Douglas Creager

    (from [d67f471b5af179c9f0d865c425c0542dbe3fa9cd]) Adding predefined SKIP and STOP processes

    This patch introduces CSPM keywords for the predefined SKIP and STOP processes.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 6th, 2008 @ 10:04 PM

  13. Douglas Creager
    Douglas Creager

    (from [aa9d7b026e4d5b6c7d06ca08a849c33b0c680888]) Distinct process names for each application of a function

    Before, a process created by a function application would get its name based on the context in which the lambda was defined. This meant that if you called a function many times, each with different values for its parameters, you'd only get a single process definition in the output script. Ideally, we'd add to the process name some representation of the values that the function was called with. Unfortunately, that's not possible with the current design, since the parameters to a function are lazy. We bind the function application (thereby creating its process name) before evaluating the lambda's body, and we cannot evaluate any of the parameters before evaluating the lambda's body. Thus, we cannot use the parameter values to calculate the process name.

    We could probably reorganize things to get around this, but for now, we just keep track of a global counter of function applications, and append this counter to the process name created for any application. This means that if we apply a function many times with the same value, we will get distinct processes for each one.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 6th, 2008 @ 10:04 PM

  14. Douglas Creager
    Douglas Creager

    (from [449a427b153538a6bd72d9128d1f3fb9471d19ff]) Initial support for CSP₀ scripts

    This patch introduces support for CSP₀ scripts. It has functions for creating CSP₀ statements and scripts, but there's no functionality yet for translating CSPM into CSP₀.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 14th, 2008 @ 05:32 AM

  15. Douglas Creager
    Douglas Creager

    (from [449a427b153538a6bd72d9128d1f3fb9471d19ff]) Initial support for CSP₀ scripts

    This patch introduces support for CSP₀ scripts. It has functions for creating CSP₀ statements and scripts, but there's no functionality yet for translating CSPM into CSP₀.

    Lighthouse: [#2 CSPM to CSP₀ compiler] http://github.com/dcreager/hst/c...

    November 14th, 2008 @ 05:32 AM

  16. Douglas Creager
    Douglas Creager
    • State changed from open to resolved
    • Milestone set to 1.0-α3

    Version 1.0-α3 has just been released, which includes a basic CSPM to CSP₀ compiler. The README and INSTALL files contain instructions for building and using the tool. There are still several CSPM features that the compiler doesn't support, but I'll create separate tickets for those as they come up.

    November 21st, 2008 @ 02:04 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.