/mobile-ambients

Mobile Ambients simulator

Primary LanguageCommon Lisp

Mobile Ambients in Common Lisp

Overview

This library provides an API for Cardelli & Gordon's Mobile Ambients. I have tried to develop the library to match as closely as possible with Cardelli & Gordon's presentation, and also to be relatively idiomatic Common Lisp. In addition, the library is extensible, allowing programmers to introduce new types of processes, capabilities, and to define transitions for them.

Documentation

The library has complete documentation (generated by CLDOC). There is also a guide that describes the system and works through a number of the examples. Slides from a short (10 minute) presentation about the library are also available.

Example Usage

A simple example of getting things up and running follows. (This is from LispWorks; other Lisps may produce slightly different output.)

CL-USER 1 > (cd "~/tayloj/mobile-ambients/")
#P"/Users/tayloj/tayloj/mobile-ambients/"

CL-USER 2 > (compile-file "mobile-ambients")
;;; Compiling file mobile-ambients ...
NIL

CL-USER 3 > (load "mobile-ambients")
; Loading fasl file /Users/tayloj/tayloj/mobile-ambients/mobile-ambients.xfasl
#P"/Users/tayloj/tayloj/mobile-ambients/mobile-ambients.xfasl"

CL-USER 4 > (in-package #:mobile-ambients-user)
#<The MOBILE-AMBIENTS-USER package, 1/16 internal, 0/16 external>

AMB-USER 5 > (run-process
              (par (open 'm (named 'P))
                   (amb 'm (named 'Q))))
; *. open M.P | M[Q]
; 0. open M.P | M[Q]
; 1. P | Q
#<P | Q>