Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by James Stewart, posted on November 06, 2001




Image Description, by James Stewart



This is a screenshot of a basic example program written in VPL, a visual programming language for embedded systems I developed for my final year computer engineering project.

The language supports most of the same constructs as text-based programming languages, like constants, variables, arrays, pointers, expressions, and functions with input parameters and return values.

Programs are structured into "libraries" of "components", the equivalent of functions. A library has a public interface and a private implementation. The implementation of a library can be specified independently of its interface, making it easier to port programs to different hardware systems.

VPL is a control flow based visual language, and has four objects to control program execution. The object that looks like an upside-down arrow is called a "begin", and is used to specify the start of a component. The red square object is called an "end", and is used to specify the end of a component. The pyramid-like object is called a "select", and is used to choose the path of a programs execution. Finally, the object shaped like a play-button is called an "execute", and is used to specify which objects to execute.

The language is represented on disk as a collection of XML objects, and compiles into both ANSI-C and 386 assembly source code.

If you want to contact me, email me at jbstewar@student.cowan.edu.au

James Stewart


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
locust

November 06, 2001, 02:05 PM

Wow, something good actually came out of ecu.edu.au *gd&r*

- Andrew Francis (francisa@cs.curtin.edu.au)

 
nosfy

November 06, 2001, 02:09 PM

Did you develop this editor?

Anyway, it reminds me the good old days when I was a consultant on the VisualAge development environment (Smalltalk, C++, Java and Generator). The VA environment has a Visual Programming interface for GUI and model programming and it is very cool and looks similar to this.

 
Ron Frazier

November 06, 2001, 02:15 PM

So, if the condition is true, do task A, otherwise do task B. Then end the program. Could you explain the other things in the picture? My guess is:

Blue diamond: variable or register
Blue arrows: values input into an execute, subroutine, or condition, or (coming out of execute) values that are modified.
? symbol: If input, then calculation on that input. If no imputs, a literal.
Green corner symbol: A subroutine, with blue arrows represeting input into and return value from the subroutine.

a and b I would guess are variables, i1 and i2 represent input 1 and input 2 to that block. How about the 2 blue diamonds that come out of the 2 executes. They dont specify any variable name. Is that like standard out to a screen/printer or something?

So would this be used to generate microcode for a EEPROM or something? All in all, pretty cool. I like it.

 
ReAL

November 06, 2001, 02:18 PM

cool it does look a little like smalltalk :)

 
Ron Frazier

November 06, 2001, 02:20 PM

oops, should have read better, I just saw:

>and compiles into both ANSI-C and 386 assembly source code

So you could then recompile for any programmable chip that has an ANSI-C compiler. Cool. But the other questions still stand.

 
Mitch

November 06, 2001, 02:37 PM

Looks similar to BizTalk's XLANG :)

 
Thomas Freudenberg

November 06, 2001, 02:50 PM

Look cool. How did you route the connection lines. I myself am searching for an appropriate algorithm.

Regards
Thömmi

 
fluffy

November 06, 2001, 03:27 PM

Eww, dataflow computing... :D I didn't know that was still being seriously researched anywhere.

Looks like a nice implementation, though. Mmm. recursively finding the greatest common denominator... never seen anything "nontrivial" like that done in a dataflow language before.

 
n1c_V

November 06, 2001, 03:53 PM

Finaly something intresting here. Good job!

 
FragLegs

November 06, 2001, 04:13 PM

Can we get a copy of the program? Or are you trying to sell it? If so, for how much?

FragLegs

 
cgk

November 06, 2001, 05:06 PM

do you really think that this is usefull?

 
Frez

November 06, 2001, 05:29 PM

Very nice idea !

You should look at the SCOL language and the SCS application, because they are quite similar : visual programs, and a functionnal language

 
CyberVenom

November 06, 2001, 05:31 PM

I have been wanting to see a true visual language for a while. I haven't seen SmallTalk, but I have seen VB and VC++ from MS and don't like the concept much. I would rather have an all-visual or all-code IDE, not some combination of the two. Yours looks to be approaching the all-visual approach I imagined, and it is very cool that it would compile into ANSI C. Something that I think would be very useful would be the ability to define an interface to C libraries (like header files) so that anything linkable to the C source could be represented visually. That would allow integration with all sorts of outside code like the Windows API or TK or OpenGL or whatever. I would also be interested in trying out the language, so posting a link would be helpful. (please?)

 
phk

November 06, 2001, 05:59 PM

Yes, this stuff could be really usefull.

For my day job I do embedded systems programming, where a large portion of the code can be described via
state diagrams or flow charts. In fact, many design documents contain these types of diagrams. The goal is
to have a tool that allows enough detail to be put directly into the diagrams so you can actually generate code
from it. The problem is that the diagrams often look like a crappy representation of code rather than a detailed
representation of the requirements. I wanted to try something similar, but for me the hardest part was doing the
block diagram editor cleanly (all that auto routing of connection lines), so I never tried it.

Imagine a tool where the blocks are actually programs and the connections are pipes and the "output" is Perl...
Kinda make you say "cool" and want to puke at the same time.

-PHK

 
gregs

November 06, 2001, 06:28 PM

Looks interesting.

How does it compare to other mathematical languages such as matlab/simulink or vissim?

 
TheMadGoblin

November 06, 2001, 08:39 PM

Who would've imagined somebody in such great movies would be a programmer as well.

Certainly not I!

 
Khrob

November 06, 2001, 10:04 PM

Teehee!

Not that I can talk... coming from the other side of the river! :)

 
henry ludemann

November 06, 2001, 10:57 PM

lol ;-)
curtin.edu.au

 
JStewart

November 06, 2001, 11:33 PM

Hi,

I'll try and get a copy of the program and its manual etc up, but its really up to my project supervisor. I dont think he'll have a problem with it though. Ive got exams coming up, so I wont be able to do anything until the end of the month. In answer to your questions:

nosfy: I developed the editor, but it wasnt really the focus of the project, so it isnt too advanced.

Ron Frazier: The blue diamonds with the arrow going into them are references to the input parameters of a component. For example, the gcd component looks like this as a C prototype: INT32 gcd(INT32 a, INT32 b);. The blue arrows are just used to show the start and end of a connection. Your right, a and b are variables. The ? object is an expression object. If the expression has any inputs, they are labeled i1..in, where n is the number of inputs. The two blue diamonds that come out of the execute are references to the output of the component. Attatching them to the output of the execute is equivalent to returning a value from a function in C.

Thomas Freudenberg: The connections lines are routed very simply. All i do is figure out where connection1 is, where connection2 is, and then draw a horizontal line from connection1 to halfway, a vertical line up or down, and a horizontal line from halfway to connection2. The routing could be vastly improved, but I think the best way would probably be to let the user change them manually.

fluffy: Its not really dataflow, its just basic control flow. Because objects only have 1 output, I dont need to mess around waiting for values to arrive at inputs. Its just a more concise way of representing dataflow operations.

cgk: Maybe, maybe not :)

gregs: In a math-based situation, those languages are better, but then again, VPL is more of a general purpose language.

 
JStewart

November 06, 2001, 11:45 PM

I didnt think curtin students could read, let alone navigate the internet :) Hey, at least ecu isnt as bad as murdoch ;)

 
Khrob

November 07, 2001, 12:18 AM

Murdoch? Where's that? ;)

Does Notre Dame even have a cs department?

 
JStewart

November 07, 2001, 02:14 AM

Programming is just something to fall back on in case my career as a movie star goes down the toilet :)

 
Pants

November 07, 2001, 04:44 AM

Great program. Very interesting.

VPL means Visible Panty Line where I come from though... ;-)

Pete

 
This thread contains 23 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.