World Library  
Flag as Inappropriate
Email this Article

Ateji PX

Ateji PX
Paradigm(s) object-oriented, pi calculus
Typing discipline strong, static
Influenced by Java
License commercial, free 30 day Premium Trial & free Edition

Ateji PX is an object-oriented programming language extension for Java. It is intended to facilliate parallel computing on multi-core processors, GPU, Grid and Cloud.

Ateji PX can be integrated with the Eclipse IDE, requires minimal learning of the additional parallel constructs and does not alter the development process.


  • Code examples 1
    • Hello World 1.1
    • Data parallelism 1.2
    • Task parallelism 1.3
    • Message-passing 1.4
    • Data-flow 1.5
  • External links 2

Code examples

Hello World

public class HelloWorld {
  public static void main(String[] args) {
      || System.out.println("Hello");
      || System.out.println("World");

Each || symbol introduces a parallel branch. Running this program will print either




depending on how the parallel branches happen to be scheduled.

Data parallelism

  || (int i : array.length) array[i]++;

The quantification (int i : N) creates one parallel branch for each value of i. The effect of this code is to increment all elements of array in parallel. This code is equivalent to

  || array[0]++;
  || array[1]++;
  || array[array.length-1]++;

More complex quantifications are possible. The following example quantifies over the upper left triangle of a square matrix:

|| (int i:N, int j:N, if i+j

Code that performs a similar and typically small operation on a large collection of elements is called data parallel, and appears often in high-performance scientific applications. A typical representative of data-parallel languages for the C/C++ or Fortran ecosystems is OpenMP.

Data parallelism features can also be implemented by libraries using dedicated data structures, such as parallel arrays.

Task parallelism

The term task parallelism is used when work can conceptually be decomposed into a number of logical tasks. In this example, tasks are created recursively:

int fib(int n) {
  if(n <= 1) return 1;
  int fib1, fib2;
  // recursively create parallel branches
    || fib1 = fib(n-1);
    || fib2 = fib(n-2);
  return fib1 + fib2;

Task parallelism is implemented in languages such as Cilk, and in libraries similar to the fork/join pair of Unix system calls.


Parallel branches have two ways of communicating; either by concurrently reading and writing shared variables, or by sending explicit messages. The operators ! and ? respectively send and receive a message on a channel.

In this example, two parallel branches communicate via explicit message passing:

Chan chan = new Chan();
  // branch 1 sends a value over the channel
  || chan ! "Hello";

  // branch 2 receives a value from the channel and prints it
  || chan ? s; System.out.println(s);


A program is said to be data-flow when computation is initiated and synchronized by the availability of data in a flow. A typical example is an adder: it has two inputs, one output, and whenever the two inputs are ready, it sends their sum on the output.

void adder(Chan in1, Chan in2, Chan out) {
  for(;;) {
    int value1, value2;
    [ in1 ? value1; || in2 ? value2; ];
    out ! value1 + value2;

Note the parallel read [ in1 ? value1; || in2 ? value2; ]. It means that the two input values can come in any order. Without it, the code may deadlock if values were coming in the wrong order. This shows that parallel primitives in a programming language are not only about performance, but also about the behavior of programs.

The adder by itself doesn't do anything, since it reacts on input data. It needs to be put in a context where other parts feed input values and read output values. The way to express this is to compose all pieces in a large parallel block:

  || source(c1); // generates values on c1
  || source(c2); // generates values on c2
  || adder(c1, c2, c3);
  || sink(c3); // read values from c3

Anything that can be thought of as a combination of logical gates or electrical circuits can readily be expressed in this way as a data-flow program.

External links

  • The Ateji PX white-paper A gentle introduction to the language features
  • The Ateji PX language manual
  • Think Parallel, Think Java article at Dr. Dobbs
  • French Firm Brews Parallel Java Offering
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.