samer@0: *** Prolog Matlab interface samer@0: *** samer@0: *** Authors: samer@0: *** Samer Abdallah samer@0: *** Centre for Digital Music, samer@0: *** Queen Mary, University of London samer@0: *** samer@0: *** Christophe Rhodes samer@0: *** Centre for Computational Creativity samer@0: *** Goldsmiths College, University of London samer@0: *** samer@0: *** Dec 2004--Nov 2006 samer@0: samer@0: samer@37: NB. This repository is deprecated. Code is now maintained on GitHub at samer@37: https://github.com/samer--/plml samer@37: samer@0: PLML is a foreign interface that enables Matlab to be used as a computational samer@0: engine from within SWI Prolog. The basic idea is that instead of using samer@0: the standard is/2 operator to evaluate a certain class of terms, we can samer@0: use the ===/2 operator to get Matlab to evaluate a (much richer) class of samer@0: terms, eg samer@0: samer@0: ?- float(A)===trace(eye(3)). samer@0: samer@0: A = 3.0 samer@0: samer@0: We can also get Matlab to perform actions with side effects, like samer@0: making sounds and graphics; obviously these do not fit into the declartive samer@0: semantics of Prolog and have to be dealt with under the procedural semantics. samer@0: If you want to execute a Matlab command in an imperative way and see the samer@0: textual output, use the ??/1 operator, eg samer@0: samer@0: ?- ??disp(`hello). samer@0: samer@0: >> hello samer@0: samer@0: samer@0: The interface works by using the Matlab Engine API, which starts up a Matlab samer@0: process on the end of a pipe. The Matlab process can be on another machine, samer@0: and multiple Matlab engines can be started on the same or different machines. samer@0: Matlab expressions are sent down the pipe and executed. Matlab's textual samer@0: output comes back through the pipe. In addition, Matlab variables can be samer@0: transferred directly between the Matlab engine's memory space and SWI's samer@0: memory space. samer@0: samer@0: See README for further details. samer@0: samer@0: samer@0: RELEASE NOTES for version 0.2 samer@0: samer@0: - Added option to enable Matlab's JVM samer@0: - Now closing Matlab engines properly at halt samer@0: - Added support for valid but non-evaluable expressions samer@0: - Fixed bug when returning integers from Matlab samer@0: - Errors in user's Matlab functions now generate mlerror(_,_) expections samer@0: