Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3357765.3359524acmconferencesArticle/Chapter ViewAbstractPublication PagesgpceConference Proceedingsconference-collections
research-article
Public Access

Parallel nondeterministic programming as a language extension to C (short paper)

Published: 21 October 2019 Publication History
  • Get Citation Alerts
  • Abstract

    This paper explores parallel nondeterministic programming as an extension to the C programming language; it provides constructs for specifying code containing ambiguous choice as introduced by McCarthy. A translator to plain C code was implemented as an extension to the ableC language specification. Translation involves a transformation to continuation passing style, providing lazy choice by storing continuation closures in a separate task buffer. This exploration considers various search evaluation approaches and their impact on correctness and performance. Multiple search drivers were implemented, including single-threaded depth-first search, a combined breadth- and depth-first approach, as well as two approaches to parallelism. Several benchmark applications were created using the extension, including n-Queens, SAT, and triangle peg solitaire. The simplest parallel search driver, using independent threads, showed the best performance in most cases, providing a significant speedup over the sequential versions. Adding task sharing between threads showed similar or slightly improved performance.

    Supplementary Material

    MP4 File (3357765.3359524.mp4)
    Presentation Video

    References

    [1]
    Harold Ableson, Gerald Jay Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. The MIT Press, 2 edition, 1996. Description of nondeterministic computing in section 4.3.
    [2]
    George I. Bell. Solving triangular peg solitaire. Journal of Integer Sequences, 11, November 2008.
    [3]
    Robert D. Blumofe and Charles E. Leiserson. Scheduling multithreaded computations by work stealing. Journal of the ACM, 56(5):720-748, September 1999.
    [4]
    Robert D. Blumofe and Charles E. Leiserson. Space-efficient scheduling of multithreaded computations. SIAM Journal on Computing, 27(1):202-229, July 2006.
    [5]
    Hans-Juergen Boehm. Space efficient conservative garbage collection. In Proceedings of the ACM Conference on Programming Language Design and Implementation (PLDI), pages 197-206. ACM, 1993.
    [6]
    Keith Clark and Steve Gregory. Parlog: Parallel programming in logic. ACM Transactions on Programming Languages and Systems, 8(1):1-49, January 1986.
    [7]
    Ernest Davis. Non-deterministic algorithms. cs.nyu.edu/courses/spring03/G22.2560-001/nondet.html, 2003. [Online; accessed May 3, 2018].
    [8]
    Matteo Frigo, Charles E. Leiserson, and Keith H. Randall. The implementation of the Cilk-5 multithreaded language. In Proceedings of Programming Language Design and Implementation (PLDI), pages 212-223, New York, NY, USA, 1998. ACM.
    [9]
    Ian P. Gent, Christopher Jefferson, and Peter Nightingale. Complexity of n-queens completion. Journal of Artificial Intelligence Research, 59:815 - 848, September 2017.
    [10]
    Holger H. Hoos. Satlib - benchmark problems. http://www.cs.ubc.ca/~hoos/SATLIB/benchm.html, August 2000. [Online; accessed May 3, 2018].
    [11]
    Ted Kaminski and Eric Van Wyk. Modular well-definedness analysis for attribute grammars. In Proceedings of the 5th International Conference on Software Language Engineering (SLE), volume 7745 of Lecture Notes in Computer Science, pages 352-371. Springer, September 2012.
    [12]
    Ted Kaminski, Lucas Kramer, Travis Carlson, and Eric Van Wyk. Reliable and automatic composition of language extensions to C: The ableC extensible language framework. Proceedings of the ACM on Programming Languages, 1(OOPSLA):98:1-98:29, October 2017a. ISSN 2475-1421.
    [13]
    Ted Kaminski, Lucas Kramer, Travis Carlson, and Eric Van Wyk. Reliable and automatic composition of language extensions to C -- supplemental material. Technical Report 17-009, University of Minnesota, Department of Computer Science and Engineering, 2017b. Available at https://www.cs.umn.edu/research/technical_reports/view/17-009.
    [14]
    Lucas Kramer, Ted Kaminski, and Eric Van Wyk. Reflection in attribute grammars. In Proceedings of the International Conference on Generative Programming: Concepts & Experience (GPCE). ACM, 2019.
    [15]
    Xavier Leroy. PTHREAD_COND(3) Linux User's Manual, 2003.
    [16]
    John McCarthy. A basis for a mathematical theory of computation. Computer programming and formal systems, pages 33-70, 1963.
    [17]
    Ken Naono, Keita Teranishi, John Cavazos, and Reiji Suda, editors. Software Automatic Tuning, 2010. Springer. ISBN 978-1-4419-6934-7.
    [18]
    Stephen L Olivier, Allan K Porterfield, Kyle B Wheeler, Michael Spiegel, and Jan F Prins. Openmp task scheduling strategies for multicore numa systems. The International Journal of High Performance Computing Applications, 26(2):110-124, May 2012.
    [19]
    August Schwerdfeger and Eric Van Wyk. Verifiable composition of deterministic grammars. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), pages 199-210, New York, NY, USA, June 2009. ACM.
    [20]
    Eric Van Wyk, Derek Bodin, Jimin Gao, and Lijesh Krishnan. Silver: an extensible attribute grammar system. Science of Computer Programming, 75(1-2):39-54, January 2010.

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    GPCE 2019: Proceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
    October 2019
    142 pages
    ISBN:9781450369800
    DOI:10.1145/3357765
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 October 2019

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. attribute grammars
    2. meta-programming
    3. reflection

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    GPCE '19
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 56 of 180 submissions, 31%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 198
      Total Downloads
    • Downloads (Last 12 months)71
    • Downloads (Last 6 weeks)3
    Reflects downloads up to

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media