Comment by LightMachine

2 years ago

I love WASM - who doesn't? Maintaining a WASM target was included on HOC's current fundraise, and is essential to our JIT plans. I don't know much about typed assembly, but I guess it would enable optimizations that aren't possible without types, as well as increased safety - although I wonder if that's relevant, if the source language is already typed?

In general though, I think we should move away from procedural instructions towards "interactional" instructions. HVM's AST can be seen as an assembly language with high-level instructions like LAM-APP (lambda application) and FUN-CTR (pattern-matching), and that's possible precisely because beta reduction is O(1) on interaction nets. A hardware with HVM's interactional instructions could make let us break out of the Von Neumann bottleneck and make processors much faster. Here is a table of HVM's core instructions:

    .-----------------------------------------------------.
    | Opcode    | Effect                          | Cost  |
    |-----------|---------------------------------|-------|
    | APP-LAM   | applies a lambda                | 2     |
    | APP-SUP   | applies a superposition         | 4     |
    | OP2-NUM   | operates on a number            | 2     |
    | OP2-SUP   | operates on a superposition     | 4     |
    | FUN-CTR   | pattern-matches a constructor   | 2 + M |
    | FUN-SUP   | pattern-matches a superposition | 2 + A |
    | DUP-LAM   | clones a lambda                 | 4     |
    | DUP-NUM   | clones a number                 | 2     |
    | DUP-CTR   | clones a constructor            | 2 + A |
    | DUP-SUP-0 | clones a superposition          | 4     |
    | DUP-SUP-1 | undoes a superposition          | 2     |
    | DUP-ERA   | clones an erasure               | 2     |
    |-----------------------------------------------------|

I think BlueSpec is impressive and a good direction in the (arguably messy) hardware language domain. It is likely that we'll consider using it in our research and projects.

The slowing of Moore’s Law was going to eventually lead to the loosening of the stranglehold that Von Nuemann machine design has on the industry. I’m glad to see things like this!