Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1013 Bytes

MODES.md

File metadata and controls

38 lines (25 loc) · 1013 Bytes

Evaluation Modes

Lazy Mode

Pointers represent positive-to-negative ports in polarized nets. This causes the memory format to coincide perfectly with how IC terms are written textually. It is a direct improvement of HVM1. It is implemented in this repository.

Strengths:

  • Efficient lazy evaluation
  • Lévy Optimality (minimal β-reduction)
  • Very fast single-core evaluation
  • Compiles to efficient C (often, faster than GHC)

Drawbacks:

  • WHNF may return a pending variable
  • Requires global garbage collection
  • Parallelism is still an open problem

Strict Mode

Pointers represent aux-to-main ports, resulting in a tree-like memory format. It is implemented in a separate repository, and will be merged later.

Strengths:

  • Efficient parallel evaluation
  • Does not require global garbage collection

Drawbacks:

  • Lazy evaluation is impossible

  • Not Lévy Optimal (can waste β-reductions)