- JCSP
In
computer science andsoftware engineering , JCSP is an implementation of Communicating Sequential Processes (CSP) for theJava programming language .cite web|author= Abhijit Belapurkar |title=CSP for Java programmers | url= http://www-128.ibm.com/developerworks/java/library/j-csp1.html |work=IBM developerWorks|accessdate=2007-04-20|date=21 June 2005]Although CSP is a mathematical system, JCSP does not require in-depth mathematical skill, allowing instead that programmers can achieve well-behaved software just by following simple rules.
There are four ways in which multi-threaded programs can fail untestablyFact|date=April 2007http://www-128.ibm.com/developerworks/java/library/j-csp1.html:
* race conditions - shared variables may have indeterminate state because several threads access them concurrently without sufficient locking;
* deadlock - two or more threads reach a stalemate when they try to acquire locks or other resources in a conflicting way;
* livelock - similar to deadlock but resulting in endless wastage of CPU time;
* starvation - one or more threads fail ever to get any work done, compromising the intended outcome of the software algorithms.Generally, it is not possible to prove the absence of these four hazards merely by rigorous testing. Instead it is necessary to have a design that can demonstrate these four hazards don't exist. CSP allows this to be done using mathematics and JCSP allows it to be done pragmatically in Java programs.
Note that the CSP term "process" is used essentially as a synonym for "thread" in Java parlance; a "process" in CSP is a lightweight unit of execution that interacts with the outside world via events and is an active component that encapsulates the data structures on which it operates.
Other versions JCSP
JCSP re : Communicating Sequential Processes for Java Robot Edition.JCSP re is a highly reduced version of the JCSP packages that were developed at the Napier University Edinburgh. Research into JCSP for robotics environments and JCSP for mobile environments is an active area of research at Napier University Edinburgh. Current research by Professor Jon Kerridge, Alex Panayotopoulos and Patrick Lismore at Napier University Edinburgh has resulted in a working implementation of '
JCSP re ' a reduced version of JCSP that allows the development of the same concurrent software for robots, in particular the robots targeted for this research were the Lego Mindstorms NXT's because they can run the popularLeJOS NXJ virtual machine that executes Java source code.#REDIRECT
JCSP re References
External links
* [http://www.jcsp.org/ Official JCSP website]
* [http://www.cs.kent.ac.uk/projects/ofa/jcsp/ JCSP project] at the University of Kent
* [http://www.patricklismore.com/jcspre/ JCSP re] early beta release
Wikimedia Foundation. 2010.