Join Java

Join Java

Join Java is a programming language that extends the standard Java programming language with the Join Semantics of the Join Calculus. It was written at the University of South Australia within the Reconfigurable Computing Lab by Dr. Von Itzstein.

Language characteristics

The Join Java extension introduces three new language constructs:
* Join methods
* Asynchronous methods
* Order class modifiers for determining the order that patterns are matched

Concurrency in most popular programming languages is implemented using constructs such as semaphores and monitors. Libraries are emerging (such as the Java concurrency library JSR-166) that provide higher-level concurrency semantics. Communicating Sequential Processes (CSP), Calculus of Communicating Systems (CCS) and Pi have higher-level synchronization behaviours defined implicitly through the composition of events at the interfaces of concurrent processes. Join calculus, in contrast, has explicit synchronization based on a localized conjunction of events defined as reduction rules. Join semantics try to provide explicit expressions of synchronization without breaching the object-oriented idea of modularization, including dynamic creation and destruction of processes and channels.

The Join Java language can express virtually all published concurrency patterns without explicit recourse to low-level monitor calls. In general, Join Java programs are more concise than their Java equivalents. The overhead introduced in Join Java by the higher-level expressions derived from the Join calculus is manageable. The synchronization expressions associated with monitors (wait and notify) which are normally located in the body of methods can be replaced by Join Java expressions (the Join methods) which form part of the method signature.

Join methods

A Join method is defined by two or more Join fragments. A Join method willexecute once all the fragments of the Join pattern have been called.If the return type is a standard Java type then the leading fragment willblock the caller until the Join pattern is complete and the method hasexecuted. If the return type is of type signal then theleading fragment will return immediately. All trailing fragments areasynchronous so will not block the caller.

Example:

class JoinExample { int fragment1() & fragment2(int x) { //will return value of x //to caller of fragment1 return x; } }

Ordering modifiers

Join fragments can be repeated in multiple Join patterns so there can bea case when multiple Join patterns are completed when a fragment is called.Such a case could occur in the example below if B(), C() and D() then A() arecalled. The final A() fragment completes three of the patterns so there arethree possible methods that may be called. The ordered classmodifier is used here to determine which Join method will be called.The default and when using the unordered class modifier isto pick one of the methods at random. With the orderedmodifier the methods are prioritised according to the order they are declared.

Example:

class ordered SimpleJoinPattern { void A() & B() { } void A() & C() { } void A() & D() { } signal D() & E() { } }

Asynchronous methods

Asynchronous methods are defined by using the signalreturn type. This has the same characteristics as the voidtype except that the method will return immediately. When an asynchronousmethod is called a new thread is created to execute the body of the method.

Example:

class ThreadExample { signal thread(SomeObject x) { //this code will execute in a new thread } }

Related languages

Polyphonic C sharp is the closest related language.

Hardware Join Java language further extended Join Java to implement Hardware semantics. This language extended the semantics of Join Java to FPGA applications.

References

* von Itzstein, G, Stewart. and Jasiunas, M (2003). On Implementing High Level Concurrency in Java. Advances in Computer Systems Architecture 2003, Aizu Japan, Springer Verlag.
* von Itzstein, G, Stewart. and D. Kearney (2002). Applications of Join Java. Proceedings of the Seventh Asia Pacific Computer Systems Architecture Conference ACSAC'2002. Melbourne, Australia, Australian Computer Society: 1-20.
* von Itzstein, G, Stewart. and D. Kearney (2004). The Expression of Common Concurrency Patterns in Join Java. International Conference on Parallel and Distributed Processing Techniques and Applications, Las Vegas.
* Hopf, J., von Itzstein, G, Stewart, et al. (2002). Hardware Join Java: A High Level Language For Reconfigurable Hardware Development. International Conference on Field Programmable Technology, Hong Kong.

See also

* Java programming language

External links

* [http://joinjava.unisa.edu.au/ Website]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Join-calculus — The join calculus is a process calculus developed at INRIA. The join calculus was developed to provide a formal basis for the design of distributed programming languages, and therefore intentionally avoids communications constructs found in other …   Wikipedia

  • Java (programming language) — infobox programming language name = Java paradigm = Object oriented, structured, imperative year = 1995 designer = Sun Microsystems latest release version = Java Standard Edition 6 (1.6.0) latest release date = latest test version = latest test… …   Wikipedia

  • Java Persistence Query Language — Испытал влияние: SQL Java Persistence Query Language (JPQL)  платформо независимый объектно ориентированный язык запросов являющийся частью Java Persistence API спецификации. JPQL используется для написания запросов к сущностям, хранящимся в …   Википедия

  • Java (software platform) — Not to be confused with JavaScript. Java Original author(s) Oracle Corporation Developer(s) James Gosling / Sun Microsystems …   Wikipedia

  • Java performance — Programs written in Java have had a reputation for being slower and requiring more memory than those written in natively compiled languages such as C or C++ (see e.g. [cite web url=http://www.jelovic.com/articles/why java is slow.htm title=Why… …   Wikipedia

  • Java Database Connectivity — Содержание 1 История 2 Интерфейсы 3 Преимущества 4 Примеры …   Википедия

  • Lenguaje de programación Java — Saltar a navegación, búsqueda Java Paradigma: Orientado a objetos Apareció en: 1991 Diseñado por: Sun Microsystems Tipo de dato: Fuerte, Estático Implementacion …   Wikipedia Español

  • Comparison of C Sharp and Java — The correct title of this article is Comparison of C# and Java. The substitution or omission of the # sign is because of technical restrictions. Programming language comparisons General comparison Basic syntax Basic instructions …   Wikipedia

  • Comparison of the Java and .NET platforms — Contents 1 Legal issues 1.1 Standardization 1.2 License 1.2.1 Java 1.2.2 .NET …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”