Model transformation system implicitly outputs unwanted data to the output object

Description

Currently the transformation system allows you to output two places at once (non-explicity), once by the virtue of return value and once via the outputPath. This causes some confusion and buggy behavior. For example:

"Magnification": {
"expander": {
"type": "fluid.model.transform.round",
"input": {
"expander": {
"type": "fluid.model.transform.scaleValue",
"valuePath": "display.screenEnhancement.magnification",
"factor": 100
}
},
"outputPath": "value"
},
"dataType": {
"expander": {
"type": "fluid.model.transform.literalValue",
"value": "REG_DWORD"
}
}
}

will result in the following queuedChanges:

[
{
"path": "Magnification",
"value": 229.99999999999997,
"sequence": 0
},
{
"path": "Magnification.value",
"value": 230,
"sequence": 1
},
{
"path": "Magnification.dataType",
"value": "REG_DWORD",
"sequence": 2
}
]

Which in turn means that the end result will be:

Magnification: 229.9999999999997

Which is clearly not what is wanted.

(see also http://issues.gpii.net/browse/SP-45)

Environment

None

Activity

Kasper Galschiot MarkusSeptember 14, 2013 at 10:04 PM

Kasper Galschiot MarkusAugust 19, 2013 at 10:14 AM

Some things were still unclear/broke according to the above plans, namely arrays of expanders and their expected behavior. We discussed and resolved this on an email thread: http://lists.gpii.net/pipermail/architecture/2013-August/001247.html

Kasper Galschiot MarkusAugust 16, 2013 at 11:22 AM

Kasper Galschiot MarkusAugust 15, 2013 at 12:18 PM

Kasper Galschiot MarkusMay 29, 2013 at 8:08 AM
Edited

[5/24/13 10:54:23 AM] Kasper Galschiot Markus: I found some weirdness in the transformation framework
[5/24/13 10:54:40 AM] Antranig Basman: No doubt you had just put it there yourself earlier : P
[5/24/13 10:55:01 AM] Kasper Galschiot Markus: haha - well, I cant really argue with that
[5/24/13 10:57:43 AM] Kasper Galschiot Markus: it has to do with what changes get queued
[5/24/13 10:57:45 AM] Kasper Galschiot Markus: http://piratepad.net/GnymkjM79U
[5/24/13 10:58:04 AM] Antranig Basman: Oh dear..... that
[5/24/13 10:58:08 AM] Kasper Galschiot Markus: yeah
[5/24/13 10:58:20 AM] Kasper Galschiot Markus: I mean, I think we talked about this in SD
[5/24/13 10:58:23 AM] Antranig Basman: Yes, we did
[5/24/13 10:58:37 AM] Antranig Basman: It is quite faulty
[5/24/13 10:58:39 AM] Kasper Galschiot Markus: that we want to change it to only throw stuff on queue when explicitly requested
[5/24/13 10:59:01 AM] Antranig Basman: But what's specifically the problem here?
[5/24/13 10:59:11 AM] Antranig Basman: Other than the fact that "Magnfication" seems to be a primitive
[5/24/13 10:59:26 AM] Kasper Galschiot Markus: that's the exact problem
[5/24/13 10:59:50 AM] Kasper Galschiot Markus: Magnification gets set, I believe... but that means Magnification.value and Mangification.dataType dont
[5/24/13 10:59:50 AM] Antranig Basman: ah I see
[5/24/13 11:00:06 AM] Antranig Basman: This funny figure is the unrounded input figure before it goes in
[5/24/13 11:00:15 AM] Antranig Basman: It's so long ago I'm starting to forget what we decided
[5/24/13 11:00:19 AM] Antranig Basman: And you, damn you, never wrote it up
[5/24/13 11:00:41 AM] Antranig Basman: But I remember we came to a quite clear conclusion as we walked along the bay
[5/24/13 11:00:41 AM] Kasper Galschiot Markus: I remember that we explicitly decided that YOU should write it up
[5/24/13 11:00:42 AM] Kasper Galschiot Markus:
[5/24/13 11:00:46 AM] Antranig Basman: And you were tasked with implementing it
[5/24/13 11:01:01 AM] Kasper Galschiot Markus: yes, I agree
[5/24/13 11:01:06 AM] Antranig Basman: So
[5/24/13 11:01:11 AM] Antranig Basman: Do you at least remember what the conclusion was!
[5/24/13 11:01:33 AM] Antranig Basman: It was something about the capacity of an expander to output along two routes
[5/24/13 11:01:46 AM] Antranig Basman: One to its parent, and secondly to its current nested path position
[5/24/13 11:01:57 AM] Antranig Basman: Either we decided this should never happen, or we decided that it should always happen
[5/24/13 11:02:28 AM] Kasper Galschiot Markus: yes - I think we disagreed quite a bit on what was the best option (though I forget which one was my standpoint)
[5/24/13 11:02:53 AM] Kasper Galschiot Markus: but I believe the conclusion was that it should never happen
[5/24/13 11:03:26 AM] Kasper Galschiot Markus: but not entirely sure
[5/24/13 11:03:42 AM] Antranig Basman: If that was the conclusion, it must have been that we thought that the effect of having that could easily be had by some other means if someone wanted it
[5/24/13 11:04:11 AM] Kasper Galschiot Markus: yeah - eg. our shadow vars for example should be able to achieve that
[5/24/13 11:04:18 AM] Antranig Basman: shadow vars!
[5/24/13 11:04:22 AM] Kasper Galschiot Markus: haha
[5/24/13 11:04:25 AM] Antranig Basman: Did we decide we wanted those?
[5/24/13 11:04:29 AM] Kasper Galschiot Markus: I forget the damn name of them
[5/24/13 11:04:34 AM] Kasper Galschiot Markus: yeah, I think so
[5/24/13 11:04:39 AM] Kasper Galschiot Markus: pocket variables
[5/24/13 11:04:49 AM] Kasper Galschiot Markus: or whatever the hell we referred to them as
[5/24/13 11:05:00 AM] Kasper Galschiot Markus: temporary variable to store results
[5/24/13 11:05:17 AM] Kasper Galschiot Markus: ... actually I might totally be mixing two concepts up as well
[5/24/13 11:05:38 AM] Antranig Basman: Well, there must also have been some reasoning about why the behaviour of what is really a compact expander, "Magnification", should differ from that of the others
[5/24/13 11:06:04 AM] Antranig Basman: We spent a long time working this out
[5/24/13 11:06:17 AM] Kasper Galschiot Markus: I know - this is horrible
[5/24/13 11:07:42 AM] Antranig Basman: Oh and btw, yesterday Colin and I decided to name "expander" to "transform"
[5/24/13 11:08:26 AM] Antranig Basman: I guess the only sensible option is that double output never occurs
[5/24/13 11:08:38 AM] Antranig Basman: But there will be plenty of reasoning needed to back this up
[5/24/13 11:08:45 AM] Kasper Galschiot Markus: yes, I think that was our conclusion as well
[5/24/13 11:09:01 AM] Kasper Galschiot Markus: got dragged into a meeting now
[5/24/13 11:14:22 AM] Antranig Basman: Well, you will just have to fix it : P
[5/24/13 11:14:32 AM] Antranig Basman: But not before you have got your existing transformations pull in : P
[5/24/13 11:30:50 AM] Antranig Basman: I had a vague memory that we might have decided to make an explicit "output doubling expander" for those cases where we wanted it to happen.....
[5/24/13 11:33:25 AM] Kasper Galschiot Markus: wouldn't it be simpler to use 'local variables'
[5/24/13 11:33:43 AM] Kasper Galschiot Markus: to avoid introducing too many concepts to the user/developer
[5/24/13 11:35:12 AM] Antranig Basman: How do you plan to get reversibility working in the presence of "local variables"?
[5/24/13 11:36:39 AM] Antranig Basman: The whole purpose of our system is that it is meant primarily to WORK : P
[5/24/13 11:38:14 AM] Antranig Basman: Whether the user was familiar with the concepts involved in 2013 isn't going to be relevant if by 2033 we have been presiding over 20 years of having a working system : P
[5/24/13 11:38:40 AM] Kasper Galschiot Markus: at some point, I'm gonna sit down and think really hard and have a really clever comeback
[5/24/13 11:38:50 AM] Kasper Galschiot Markus: ... for now, I got NOTHING

Fixed

Details

Assignee

Reporter

Components

Priority

Created May 29, 2013 at 8:05 AM
Updated September 14, 2013 at 10:04 PM
Resolved September 14, 2013 at 10:04 PM