SMOP stands for Open-Source Matlab/Octave to Python compiler and is written in Python, using Fossil for project management. SMOP is platform-independent, but is tested only on Ubuntu Linux and Windows-xp.
SMOP is work in progress. My current goal is to compile to Python the winning submissions from MATLAB Programming Contest with as little modifications of the source code as possible. Currently, I am working on the Nov 2004 problem -- "Moving Furniture". SMOP compiles runcontest.m and solver.m submitted by MATLAB team, but not yet fastsolver.m -- the winning submission by GUO. You can see these files in smop/testsuite/furniture directory.
To see SMOP in action, download the sources into smop directory, then:
$ cd smop $ smopc --version # sanity check. $ cd src/smop/testsuite/furniture $ smopc runcontest.m solver.m -o a.py # generates a.py $ more a.py # take a look $ python >>> import a >>> a.runcontest(0) # takes several minutes on slower machines ...
The MATLAB Programming Contest submissions are good for testing SMOP compiler because they are
- Reasonably non-trivial code examples,
- Focusing on the algorithmic part of the MATLAB runtime, rather than on graphics support or toolboxes
- Checking the correctness of the results
- Suitable for benchmarking
Requirements:
- Python
Comments not found