LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"reversed dataflow" programming language

Hi all,

First of all, this mail does not fit nicely in this newsgroup but I guess
it's the best fit compared to all newsgroups available.

In order not to have to reinvent the wheel, I'm looking for a programming
language that has the following structure:
Execute task A that needs parameters A1 and A2.
In order to get parameter A1 execute task B and in order to get parameter A2
execute task C.
These tasks (B and C) can have parameters themselves again which nests this
procedure deeper (and deeper) untill a point is reached where the parameters
are known or no parameters are needed.
Perhaps a programming language is too big of a word as the only thing you
would have to do is enter an intitial task and make a list of
parameter/
task.

It seems to me that this is more or less a "reversed dataflow" approach as
the data is not "inserted" into the system but actively pulled upon demand.

I know that labview works with the concept of dataflow but that's about it.
Is the described approach possible in labview and is it well supported?
And/or is there a programming language that is more suited for such a type
of problem?

Thanx,

Corno
0 Kudos
Message 1 of 4
(2,451 Views)
You are correct that Labview is a dataflow language , but you would have to
write your code from B and C up. If your task is to derive an unknown at
the bottom of this tree of tasks then I expect, simpler labview programming
techniques will disappoint you. Each portion of a Labview program waits
until all the data required for it's execution is present. It seems that you
need the data not to be present to execute . If you are trying to derive an
unknown ? This begs the question, how do you know that the correct unknown
is not present ?
You can have previous loops derive the number of executions of following
loops, but I expect you would need to invert the logic of your iteration
process. There is nothing so go around again approach.


"Corno Schraverus" wrote in message
news:9pk8sp$2ni$1@reader05.wxs.nl...
> Hi all,
>
> First of all, this mail does not fit nicely in this newsgroup but I guess
> it's the best fit compared to all newsgroups available.
>
> In order not to have to reinvent the wheel, I'm looking for a programming
> language that has the following structure:
> Execute task A that needs parameters A1 and A2.
> In order to get parameter A1 execute task B and in order to get parameter
A2
> execute task C.
> These tasks (B and C) can have parameters themselves again which nests
this
> procedure deeper (and deeper) untill a point is reached where the
parameters
> are known or no parameters are needed.
> Perhaps a programming language is too big of a word as the only thing you
> would have to do is enter an intitial task and make a list of
> parameter/task.
>
> It seems to me that this is more or less a "reversed dataflow" approach as
> the data is not "inserted" into the system but actively pulled upon
demand.
>
> I know that labview works with the concept of dataflow but that's about
it.
> Is the described approach possible in labview and is it well supported?
> And/or is there a programming language that is more suited for such a type
> of problem?
>
> Thanx,
>
> Corno
>
>
0 Kudos
Message 2 of 4
(2,451 Views)
Hi Corno,
Let's take this from the end (I will say "output A1 for task B" instead of "parameter/input A1 for task A" and so on, which I'm assuming that is correct).
You have the LAST task (Z) with known parameters. Executing task Z, you get output Y1 in order to use it as an input for task Y. Doing the same thing FORWARD, you will have task B executed and its output A1 is exactly what you need for task A.
This could be more complicated (to implement) if you have to choose dynamically some of those tasks. Anyway, the dataflow is the same and LabVIEW(G) is a good choice. Still, you can use other languages to do the same thing.
Hope I understood your problem.
0 Kudos
Message 3 of 4
(2,451 Views)
Corno,

First of all, I think I speak for a few people when I ask why you want this approach.

Second, I have started to work on solving your problem. Without an understanding of the reason for this, I am having trouble with the implementation.

It is quite easy to apply the concept, as I think I understand it in LabVIEW. Yes, dataflow can be ignored, and even reversed in LabVIEW. It is not how the language was designed, but it can be done. The implementation I came up with was to use VI server or possibly shift registers to handle your parameters. A flag can be set (or a null value used) to determine if the parameters have been calculated when they are needed.

The problem that you have with this is that you don't know what the memory allocation or ti
ming will be. You can know the maximum amount of memory that will be needed, but timing of the program execution will be dependent on whether or not parameters are 'filled' and when.

I guess if those items aren't critical, then you won't have a problem.

The other idea here is that your processor or operating system may not efficiently support such a notion. For example, I have heard that IBM created a supercomputer long ago that specialized in recursion. Hardly a common need, but this computer was really good at it.

If you could provide some more detail as to why you need this, I am sure that someone here can either offer a solution, or an alternative.

For now, give the VI server a try.

Good luck
Message 4 of 4
(2,451 Views)