xproc / Vnext

Assembly point for all issues for a next version of XProc
1 stars 0 forks source link

Re-discuss what is an atomic step #41

Open xatapult opened 11 months ago

xatapult commented 11 months ago

Andy Carver (andy.carver@yahoo.com) sent me a mail about the definition of an atomic step. This needs at least some discussion.

I want to bring to your attention a very possible misalignment between Erik's XProc 3.0 book and the spec, with regard to definition of the term "atomic step". This is to indicate something that might need adjustment, come time for a new edition.

I had no problem with Erik's definition of the term -- which aligned with my o understanding of the term's usage in XProc 1.0 -- when I came to it on p. 85. But later, I came across Gerrit's raising of the question of that term's ambiguity, as used in the 1.0 spec (see Inconsistent use of “atomic step” · Issue #1030 · xproc/3.0-specification · GitHub); and then, Norm's seeming resolution of the matter, in favor of a different sense for the term than what Erik presents on p. 85 (see Attempt to resolve issues 1030 and 1029 by ndw · Pull Request #1046 · xproc/3.0-specification · GitHub).

In short, it seems that what Norm settled on, for the sense of "atomic step" which Erik uses on p. 85, was to coin a new term, "external step" (though the definition he gives under Issue 1046 falls right back into the 1.0 ambiguity, by defining it as simply "steps that do not contain a subpipeline" -- whereas I think he intended, "steps that do not contain a subpipeline in their declaration" -- which is the sense for "atomic step" Erik gives on p. 85).

ndw commented 10 months ago

My copy of Erik's book is inaccessible at the moment, so I'm flying a little blind here. I don't think "external step" is meant to replace or define "atomic step". An external step is simply an atomic step provided by the implementation. The p:identity step is atomic. If my implementation supports an equivalent step named cx:identity, that's an atomic step and an external step.

The spec says:

[Definition: An atomic step is a step that does not contain a subpipline when it is invoked.] The built-in steps described in [Steps 3.0] are atomic. Steps like p:for-each and p:try that always have a subpipline are not atomic.

Steps declared with p:declare-step are atomic when they are invoked. It is implementation-dependent whether or not atomic steps can be defined through some other means.

Which part of that is incorrect or needs changing?

The whole area is a bit confusing because most user-defined steps are defined with a subpipline but are atomic when invoked.