- * Use: Tests an initial number for primality by computing its
- * residue modulo various small prime numbers. This is fairly
- * quick, but not particularly certain. If a @PGEN_MAYBE@
- * result is returned, perform Rabin-Miller tests to confirm.
+ * Two types of functions are defined: steppers and testers, but their
+ * interfaces are substantially similar. Each is given a request code, a
+ * context block and an event block. It is meant to update its context and
+ * the event block and return an event code.
+ *
+ * A call with a request of @PGEN_BEGIN@ asks the stepper or tester to
+ * initialize itself using the information in its event block and context. A
+ * return of @PGEN_FAIL@ reports an immediate failure; @PGEN_ABORT@ reports a
+ * fatal problem; @PGEN_DONE@ reports immediate success. @PGEN_TRY@ reports
+ * successful initialization and requests test iterations.
+ *
+ * A call to a stepper with a request of @PGEN_TRY@ asks it to step to the
+ * next possible candidate, replacing the value @m@ in the event block with
+ * the new candidate. A call to a tester with a request of @PGEN_TRY@
+ * runs one pass of the test. It should return @PGEN_FAIL@ to report a
+ * failure, @PGEN_PASS@ to report a success and request another iteration,
+ * @PGEN_DONE@ to report final acceptance and @PGEN_ABORT@ to terminate the
+ * search unsuccessfully. Note that even if the search is aborted, a
+ * shutdown request is still made.
+ *
+ * A call with a request of @PGEN_DONE@ closes down the stepper or tester.
+ * After a successful initialization (i.e., a return of something other than
+ * @PGEN_ABORT@), a shutdown call is guaranteed. The return code is ignored.