view NOTES @ 14:e1f87438e34c

Work around for lock-up when used by triserver project. By god it's ugly but it seems to work.
author samer
date Thu, 02 Feb 2012 03:01:20 +0000
parents 0dd31a8c66bd
children 89688ebc447f
line wrap: on
line source
*** Prolog Matlab interface
***
*** Authors: 
***    Samer Abdallah
***    Centre for Digital Music, 
***    Queen Mary, University of London
***
***    Christophe Rhodes
***    Centre for Computational Creativity
***    Goldsmiths College, University of London
***
*** Dec 2004--Nov 2006


PLML is a foreign interface that enables Matlab to be used as a computational
engine from within SWI Prolog. The basic idea is that instead of using
the standard is/2 operator to evaluate a certain class of terms, we can
use the ===/2 operator to get Matlab to evaluate a (much richer) class of
terms, eg 

	?- float(A)===trace(eye(3)).

	A = 3.0

We can also get Matlab to perform actions with side effects, like
making sounds and graphics; obviously these do not fit into the declartive
semantics of Prolog and have to be dealt with under the procedural semantics.
If you want to execute a Matlab command in an imperative way and see the
textual output, use the ??/1 operator, eg

	?- ??disp(`hello).

	>> hello


The interface works by using the Matlab Engine API, which starts up a Matlab
process on the end of a pipe. The Matlab process can be on another machine,
and multiple Matlab engines can be started on the same or different machines.
Matlab expressions are sent down the pipe and executed. Matlab's textual
output comes back through the pipe. In addition, Matlab variables can be
transferred directly between the Matlab engine's memory space and SWI's
memory space.

See README for further details.


RELEASE NOTES for version 0.2

	- Added option to enable Matlab's JVM
	- Now closing Matlab engines properly at halt
	- Added support for valid but non-evaluable expressions
	- Fixed bug when returning integers from Matlab
	- Errors in user's Matlab functions now generate mlerror(_,_) expections