PARALLEL-PROGRAMMING.html -- ACL2 Version 6.3

## PARALLEL-PROGRAMMING

parallel programming in ACL2(p)

    Major Section:  PARALLELISM

Here we document support for parallel programming in ACL2(p), an experimental extension of ACL2; also see parallelism.

## Some Related Topics

- ### DEFLOCK -- define a wrapper macro that provides mutual exclusion in ACL2(p)

- ### EARLY-TERMINATION -- early termination for `pand` and `por`.

- ### ERROR-TRIPLES-AND-PARALLELISM -- how to avoid error triples in ACL2(p)

- ### GRANULARITY -- limit the amount of parallelism

- ### PAND -- parallel, Boolean version of `and`

- ### PARALLEL-EXECUTION -- for ACL2(p): configure parallel execution

- ### PARALLELISM-AT-THE-TOP-LEVEL -- parallel execution in the ACL2 top-level loop

- ### PARALLELISM-PERFORMANCE -- performance issues for parallel execution

- ### PARALLELISM-TUTORIAL -- a tutorial on how to use the parallelism library.

- ### PARGS -- parallel evaluation of arguments in a function call

- ### PLET -- parallel version of `let`

- ### POR -- parallel, Boolean version of `or`

- ### SET-PARALLEL-EXECUTION -- for ACL2(p): enabling parallel execution for four parallelism primitives

- ### SET-TOTAL-PARALLELISM-WORK-LIMIT -- for ACL2(p): set thread limit for parallelism primitives

- ### SPEC-MV-LET -- modification of `mv-let` supporting speculative and parallel execution

- ### WITH-OUTPUT-LOCK -- provides a mutual-exclusion mechanism for performing output in parallel

One of ACL2's strengths lies in its ability to execute industrial models efficiently. The ACL2 source code provides an experimental parallel execution capability that can increase the speed of explicit evaluation, including simulator runs using such models, and it can also decrease the time required for proofs that make heavy use of the evaluation of ground terms.

The parallelism primitives are `plet`, `pargs`, `pand`, `por`, and `spec-mv-let`. `Pand` and `por` terminate early when an argument is found to evaluate to `nil` or non-`nil`, respectively, thus potentially improving on the efficiency of lazy evaluation. `Spec-mv-let` is a modification of `mv-let` that supports speculative and parallel execution.

Of the above five parallelism primitives, all but `spec-mv-let` allow for limiting parallel execution (spawning of so-called ``threads'') depending on resource availability. Specifically, the primitives allow specification of a size condition to control the granularity under which threads are allowed to spawn. You can use such granularity declarations in recursively-defined functions to implement data-dependent parallelism in their execution.

We recommend that in order to learn to use the parallelism primitives, you begin by reading examples: see parallelism-tutorial. That section will direct you to further documentation topics.

In addition to providing parallel programming primitives, ACL2(p) also provides the ability to execute the main ACL2 proof process in parallel. See set-waterfall-parallelism for further details.