parallel conjunction in DCGs

Fergus Henderson fjh at cs.mu.oz.au
Fri Feb 28 14:06:17 AEDT 1997


Thomas Charles CONWAY, you wrote:
> 
> In your review, you write:
> 
>  >+parse_dcg_goal_2("&", [A0, B0], Context, VarSet0, N0, Var0,
>  >+		par(A, B) - Context, VarSet, N, Var) :-
>  >+	parse_dcg_goal(A0, VarSet0, N0, Var0, A, VarSet1, N1, Var1),
>  >+	parse_dcg_goal(B0, VarSet1, N1, Var1, B, VarSet, N, Var).
> 
> I don't think parallel conjunction makes any sense in DCGs.
> 
> Certainly not in the case of independant and parallelism.

Yes, that's the case of was thinking of, since that
is what is currently implemented.

> In dependant and parallelism it makes sense, but probably isn't
> very useful.

Actually I do think it could well be useful for dependent and parallelism.
It won't help with typical uses of DCGs for parsing or I/O, but
it could be quite useful for expressing pipelining.

Given that, I suppose you might as well leave that code in there;
it doesn't do much harm, and otherwise we might forget to add it
when we add dependent and parallelism.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list