Step 1

The first step will be to learn the proto-runtime, so that you understand the details of the code, especially the base concepts such as virtual-processor and task, and the way the proto-runtime primitives suspend those, and the way proto-runtime handles requests from them.

Code can be browsed on the repository:

The above code is for the first version of proto-runtime, which is deprecated now, but still a good starting point to learn because it's simple and easiest to learn on. The version for this project is 2.0, which allows multiple languages to interact. The code for it is more complex, but the principles are the same, so it's safe to learn the V 1.0 code above -- the concepts will still apply.

However, version 1.0 can't be used with JNI, because JNI requires a shared library to connect to. Instead, the librarified version V 2.0 is needed. This version is described on the following page:

Project that uses V2.0 in its librarified form

PR V2.0 code walk-through?

  • a project repository that gathers all the others together:
  • The page that talks about this project:

A paper that will help understand the code is: http://opensourceresearchinstitute.org/content/VMS/June_2011__Thread_replacement__Photo_Ready__LNCS.pdf

Once the above project is cloned, built, and running, then turn on the DEBUG mode and put break points inside the assembly code that performs the switching -- then you can step through the execution to understand how suspend and resume work, and how the proto-runtime is invoked from application code.

That should keep you busy for a while.. try some experiments to test your understanding, like adding a new construct to the language..

When you feel comfortable, then switch over to version 2.0, by getting and building this project: http://hg.opensourceresearchinstitute.org/cgi-bin/hgwebdir.cgi/PR/PR_Projects/PR__ML__MC_shared__Projects/VReo/VReo__Prod_Cons__ML_MC_shared__Proj/

It is a more advanced language implemented on top of V2.0 This is the working code base that will be used with the rest of the project.

Back to main Java Integration page