[m-rev.] for post-commit review: clarify state var documentation

Julien Fischer jfischer at opturion.com
Tue Sep 21 17:07:54 AEST 2021



On Tue, 21 Sep 2021, Zoltan Somogyi wrote:

>
> 2021-09-20 17:02 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>
>> I suspect the use of the term "logic variables" here is likely to cause
>> I suggest: s/ordinary logic variables/ordinary variables/.
>
> Done.
>
>> The diff looks fine otherwise.
>
> Thanks. Would you mind also reviewing the attached further diff?

> diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
> index f81b1a71e..ae385ef00 100644
> --- a/doc/reference_manual.texi
> +++ b/doc/reference_manual.texi
> @@ -1274,127 +1274,332 @@ There are two restrictions concerning state variables in functions,

...

> - at item @var{Head} --> @var{Body}
> + at item
> +If it does not, then it replaces @var{AtomicGoal} with
>  @example
> -transform((@var{Head} --> @var{Body}), @var{X}, @var{ThisX}, @var{NextX}) =
> -substitute(@var{Head}, @var{X}, @var{ThisX}, @var{NextX}) :- transform(@var{Body}, @var{X}, @var{ThisX}, @var{NextX})
> +substitute(@var{Call}, [!. at var{X} -> @var{CurX}]),
> + at var{NextX} = @var{CurX}
>  @end example
> + at end itemize
> +Note that !. at var{X} can occur in @var{Call} on its own
> +(i.e. without !:@var{X}).
> +Likewise, !:@var{X} can occur in @var{Call} without !. at var{X},
> +but this does not need separate handling.
> +
> +Note that @var{PredVar} in a higher order call

s/higher order/higher-order/

> +may not be a reference to a state var,
> +i.e it may not be !@var{X}, !. at var{X} or !:@var{X}.

The rest looks fine.

Julien.


More information about the reviews mailing list