Parallel programming in ACL2(p)
Here we document support for parallel programming in ACL2(p), an experimental extension of ACL2; also see parallelism.
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
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.
Disclaimer. The parallelism primitives have been designed for executing purely functional code, but some ACL2 functions do interesting things ``under the hood'' in order to achieve their effects. For example, hons primitives such as hons-wash may not have the intended effect when executed under the parallelism primitives.