skip to main content
research-article
Public Access

Parallel type-checking with haskell using saturating LVars and stream generators

Published:27 February 2016Publication History
Skip Abstract Section

Abstract

Given the sophistication of recent type systems, unification-based type-checking and inference can be a time-consuming phase of compilation---especially when union types are combined with subtyping. It is natural to consider improving performance through parallelism, but these algorithms are challenging to parallelize due to complicated control structure and difficulties representing data in a way that is both efficient and supports concurrency. We provide techniques that address these problems based on the LVish approach to deterministic-by-default parallel programming. We extend LVish with Saturating LVars, the first LVars implemented to release memory during the object's lifetime. Our design allows us to achieve a parallel speedup on worst-case (exponential) inputs of Hindley-Milner inference, and on the Typed Racket type-checking algorithm, which yields up an 8.46× parallel speedup on 14 cores for type-checking examples drawn from the Racket repository.

References

  1. Ceylon language website. http://ceylon-lang.org/,.Google ScholarGoogle Scholar
  2. Erlang dializer type checker. http://www.erlang.org/doc/man/dialyzer.html,.Google ScholarGoogle Scholar
  3. Facebook flow project website. https://code.facebook.com/projects/1524880081090726/,.Google ScholarGoogle Scholar
  4. Typescript project website. http://www.typescriptlang.org/,.Google ScholarGoogle Scholar
  5. L. Allison. Continuations implement generators and streams. Comp. J, 33(5):460--465, 1990. doi: 10.1093/comjnl/33.5.460. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Arvind, R. S. Nikhil, and K. K. Pingali. I-structures: Data structures for parallel computing. TOPLAS, 11:598--632, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. L. Bocchino Jr, V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel Java. In OOPSLA, pages 97--116, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Brady. Idris, a general-purpose dependently typed programming language: Design and implementation. JFP, 23(05):552--593, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  9. K. Claessen, M. Sheeran, and B. J. Svensson. Expressive array constructs in an embedded GPU kernel programming language. In DAMP, pages 21--30, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. V. S. Costa, D. H. D. Warren, and R. Yang. Andorra I: A Parallel Prolog System That Transparently Exploits Both And-and Or-parallelism, volume 26 of PPOPP '91. ACM, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. I. I. CPLEX. V12. 1: User's Manual for CPLEX. International Business Machines Corporation, 46(53):157, 2009.Google ScholarGoogle Scholar
  12. L. Damas and R. Milner. Principal type-schemes for functional programs. In POPL, pages 207--212, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Flatt and PLT. Reference: Racket. Technical report, PLT Design, Inc., 2010. http://racket-lang.org/tr1/.Google ScholarGoogle Scholar
  14. Gecode Team. Gecode: Generic constraint development environment, 2006. Available from http://www.gecode.org.Google ScholarGoogle Scholar
  15. I. P. Gent, C. Jefferson, I. Miguel, N. Moore, P. Nightingale, P. Prosser, and C. Unsworth. A preliminary review of literature on parallel constraint solving. In PMCS. Citeseer, 2011.Google ScholarGoogle Scholar
  16. R. E. Griswold and M. T. Griswold. History of Programming languages---II. chapter History of the Icon Programming Language, pages 599--624. ACM, New York, NY, USA, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. Gupta and V. S. Costa. And-or parallelism in full Prolog with paged Binding Arrays. In PARLE'92, pages 617--632. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Y. Hamadi, S. Jabbour, and L. Sais. Manysat: A Parallel SAT Solver. JSAT, 6(4):245--262, 2009.Google ScholarGoogle Scholar
  19. Y. Hamadi, S. Jabbour, and J. Sais. Control-based clause sharing in parallel SAT solving. In Autonomous Search, pages 245--267. 2012.Google ScholarGoogle ScholarCross RefCross Ref
  20. K. T. Herley, A. Pietracaprina, and G. Pucci. Deterministic parallel backtrack search. TCS, 270(1):309--324, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Jhala. Refinement types for Haskell. In PLPV, pages 27--28, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. Kuper and R. R. Newton. LVars: Lattice-based data structures for deterministic parallelism. In FHPC, pages 71--84. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. L. Kuper, A. Turon, N. R. Krishnaswami, and R. R. Newton. Freeze after writing: Quasi-deterministic parallel programming with LVars. In POPL, pages 257--270, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Launchbury and S. L. Peyton Jones. Lazy functional state threads. In PLDI, pages 24--35, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. B. Liskov. A History of CLU. SIGPLAN Not., 28(3):133--147, Mar. 1993. ISSN 0362-1340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Marlow. Parallel and concurrent programming in Haskell. In Central European Functional Programming School, pages 339--401. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. Marlow, R. Newton, and S. Peyton Jones. Amonad for deterministic parallelism. In Haskell '11, pages 71--82. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Peyton Jones, A. Reid, F. Henderson, T. Hoare, and S. Marlow. A semantics for imprecise exceptions. In PLDI, pages 25--36, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. C. Pierce and D. N. Turner. Local Type Inference. ACM Trans. Program. Lang. Syst., 22(1):1--44, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. T. Prabhu, S. Ramalingam, M. Might, and M. Hall. EigenCFA: Accelerating Flow Analysis with GPUs. POPL '11, pages 511--522, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. A. Saraswat and M. Rinard. Concurrent constraint programming. In POPL, pages 232--245. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Shaw, W. A. Wulf, and R. L. London. Abstraction and Verification in Alphard: Defining and Specifying Iteration and Generators. Commun. ACM, 20(8):553--564, Aug. 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. G. Siek and W. Taha. Gradual typing for functional languages. In Scheme and FP, pages 81--92, 2006.Google ScholarGoogle Scholar
  34. V. St-Amour, S. Tobin-Hochstadt, M. Flatt, and M. Felleisen. Typing the numeric tower. In PADL, pages 289--303, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. T. S. Strickland, S. Tobin-Hochstadt, and M. Felleisen. Practical variable-arity polymorphism. In ESOP, pages 32--46, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. S. Tobin-Hochstadt and M. Felleisen. Interlanguage migration: From scripts to programs. In OOPSLA, pages 964--974, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. S. Tobin-Hochstadt and M. Felleisen. The design and implementation of Typed Scheme. In POPL, pages 395--406, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In ICFP, pages 117--128, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Van Hentenryck, V. Saraswat, and Y. Deville. Design, implementation, and evaluation of the constraint language cc (FD). J. Logic Prog., 37(1-3):139--164, 1998.Google ScholarGoogle ScholarCross RefCross Ref
  40. A. Zobel. Program structure as basis for parallelizing global register allocation. In Computer Languages, pages 262--271, Apr 1992. doi: 10.1109/ICCL.1992.185490.Google ScholarGoogle ScholarCross RefCross Ref

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 51, Issue 8
    PPoPP '16
    August 2016
    405 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3016078
    Issue’s Table of Contents
    • cover image ACM Conferences
      PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
      February 2016
      420 pages
      ISBN:9781450340922
      DOI:10.1145/2851141

    Copyright © 2016 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 27 February 2016

    Check for updates

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!