This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3096 - Are components side-effect free?
Summary: Are components side-effect free?
Status: CLOSED FIXED
Alias: None
Product: XML Processing Model
Classification: Unclassified
Component: Pipeline language (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Norman Walsh
QA Contact:
URL:
Whiteboard:
Keywords: decided
Depends on:
Blocks:
 
Reported: 2006-04-07 20:58 UTC by Norman Walsh
Modified: 2011-02-23 20:27 UTC (History)
2 users (show)

See Also:


Attachments

Description Norman Walsh 2006-04-07 20:58:30 UTC
Can implementations cache the results of evaluating a component with a particular set of inputs and parameters?

Should this be something that can be declared about individual components?
Comment 1 Innovimax 2006-04-08 17:23:43 UTC
A simple answer to the question "Are components side-effect free?" is "Not always", so we should be able to mention it.
How and where is the point of discussion for me
Comment 2 Norman Walsh 2006-04-13 15:29:24 UTC
Discussed (without resolution): http://www.w3.org/XML/XProc/2006/04/13-minutes.html
Comment 3 Alessandro Vernet 2006-04-13 16:53:42 UTC
From our call today, my understanding of the question is:

Given a pipeline that contains among other things 2 steps, both executing the same component, with the same set of inputs, should a pipeline implementation guarantee that for a given execution of that pipeline, the output documents of those two steps are always the same?

My take on it:

Will people write pipelines with two invocations of XSLT on the same input document with the same stylesheet? I don't see this as a frequent enough use case that would warrants us burdening pipeline implementations with having to guarantee that the second invocation returns the same output as the first one.

Alex
Comment 4 Innovimax 2006-04-19 15:41:51 UTC
I'm requiring a definition of what we call side effects, because it seems like some   usable side effects makes no problem in the pipeline (repeatable side effects) and that using information about date and time which aren't side effects could make some problems

In conclusion, it looks like side effects and caching are not so obviously tighted problems
Comment 5 Alessandro Vernet 2006-04-20 01:33:34 UTC
Mohamed: My understanding is the question is stated in comment #3:

Given a pipeline that contains among other things 2 steps, both executing the
same component, with the same set of inputs, should a pipeline implementation
guarantee that for a given execution of that pipeline, the output documents of
those two steps are always the same?

Norm: is this a fair way to put it?
Comment 6 Norman Walsh 2006-05-02 20:42:43 UTC
27 Apr 2006: http://www.w3.org/XML/XProc/2006/04/27-minutes.html

The following proposal was accepted:

We say that all components are non-functional. That is,
a pipeline implementation must behave as if it evaluated a component
every time it occurs. "Must behave as if" is spec-ease for
"implementations that are clever enough to determine with certainty
that a component is, in fact, functional are free to cache the
intermediate results because by golly if it is, no one will be able to
tell
Comment 7 Norman Walsh 2006-05-03 20:45:13 UTC
Implemented in langspec.xml $1.7$.