Parallaxis


Hi Pat,

I found your "HelloWorld"-page, which I like a lot.
You also listed my programming language "Parallaxis",
so I thought I'd add mine.

I made two versions: sequential and parallel

Best wishes
  Thomas

---------------------------------------------
MODULE hello; (* sequential version *)

BEGIN
  WriteString("Hello, world!");
  WriteLn;
END hello.

---------------------------------------------
MODULE hello; (* parallel version *)

CONFIGURATION list[0..9];
   (* declare 10 processors *)
CONNECTION    next: list[i] -> list[(i+1) MOD 10];
   (* connect each to its right neighbor in a ring *)

VAR i: list OF INTEGER; (* vector variable, one var. per PE *)

BEGIN
  i := ID(list);        (* get the ID-no. of each PE locally *)
  WriteString("Hello, world! from PE: ");
  WriteInt(i,3);        (* write the full vector, 3 print spaces *)

  i := MOVE.next(i);    (* move data between PEs *)
  WriteString("Hello, world! new data "); 
  WriteInt(i,3); 
END hello.


output:
Hello, world! from PE:   1   2   3   4   5   6   7   8   9  10 
Hello, world! new data  10   1   2   3   4   5   6   7   8   9 
---------------------------------------------


submitted by: Thomas Braeunl