Skip to content


Subversion checkout URL

You can clone with
Download ZIP
LuaPi: Concurrent programming made simple
Lua Shell
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
cmake Updated cmake macros
doc Import to git
examples Import to git
lib Import to git
.travis.yml Updated travis hook
AUTHORS Import to git
CMakeLists.txt Updated cmake macros
COPYRIGHT Import to git
HISTORY Import to git
README Import to git
VERSION Import to git Import to git Import to git


LuaPi: Concurrent programming made simple

(C) 2007-2009 by Frederic Peschanski under the MIT Licence
(see COPYRIGHT file)


Frederic Peschanski
Assistant Professor
University of Paris 6 - Pierre et Marie Curie



LuaPi is a concise and efficient implementation of the Pi-calculus and broadcast-Pi semantics
The metaphor employed is that of communicating systems. A LuaPi agent (there should generally
 be one LuaPi agent per lua instance) runs a set of LuaPi processes in parallel.
Processes communicate through send/receive or broadcast primitives using communication channels. 
A higher-level and quite expressive choice construct allows to implement guarded commands, 
select-like behaviors and much more.

From a practical point of view, LuaPi greatly simplifies the thinking and programming of concurrent
 behaviors, here in the Lua language. A more Lua-specific aspect is that LuaPi offers an expressive
(but thin) layer above the coroutine mechanism so that programmers do not have to deal with the 
low-level stuff. It also provides an implicit cooperation model so that explicit yield are barely needed.

From a scientific point of view, LuaPi is an outcome of our (long-term) research effort of providing 
integrated modeling, verification and programming techniques for day-to-day programmers (see LINKS).
For example, LuaPi programs (well, the concurrent parts) can be converted to the Promela syntax and thus 
verified using Spin (see the doc/spin/ subdirectory for a tutorial example)


There is no installation procedure per-se. The only "difficult" part is in expanding
the archive, which may look like the following one any Linux/Unix/Mingw/Cygwin/MacOSX environment:

> tar xvzf LuaPi-<VERSION>.tar.gz

To check the library, you can try the (few) provided examples:

> source ./
> lua examples/cs.lua
> lua examples/rdv.lua
> (etc.)

Most examples are (or will be) thoroughly commented, and further documentation should happen
at some point.

LuaPi-<VERSION>/  :  main directory
   README : this file
   HISTORY : the history of versions
   COPYRIGHT : our rights (and few duties)
   VERSION : the current version
   AUTHORS : the authors of the software
   doc/ : tutorial and reference documentation
   lib/ : the library file(s)
   lib/pi.lua : the main LuaPi module
   examples/ : largely commented examples : to test LuaContractor (see INSTALLATION just above)


LuaPi tutorial:
see doc/tutorial/LuaPiTut-<VERSION>.pdf


Please use the project page on LuaForge (or author homepage)


- LuaPi home page:

- Lua home page:
- LuaForge projects:

- Personal home page:
  - research work:
Something went wrong with that request. Please try again.