Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scilab compiler

314 views
Skip to first unread message

steve

unread,
Jul 2, 2006, 10:17:49 AM7/2/06
to
Does anyone knows if there are plans to develop a Scilab compiler?
The Matlab compiler is a great tool, extremely useful to speed up
computations and sharing code.
I am afraid that this kind of crucial developments are not among the
main concerns of the Scilab team.
The Matlab compiler is about ten years old.
Making a compiler should be a top priority (far more useful than
launching Scilab in a Java window!)

Scilab team, please give us a answer!
A CLEAR answer will be appreciated!

Steve

Richard Owlett

unread,
Jul 2, 2006, 2:40:37 PM7/2/06
to
steve wrote:

> Does anyone knows if there are plans to develop a Scilab compiler?
> The Matlab compiler is a great tool, extremely useful to speed up
> computations and sharing code.
> I am afraid that this kind of crucial developments are not among the
> main concerns of the Scilab team.
> The Matlab compiler is about ten years old.

Is above relevant to anything??????


> Making a compiler should be a top priority (far more useful than
> launching Scilab in a Java window!)

And your proof is ... ???

And what have you *CONTRIBUTED* ?

I'm not much of a programmer.
So, I attempt to contribute by giving *USEFUL* 'bug reports'.
Are they "actually useful"? Only time will tell.

I've made an effort. HAVE YOU AND YOUR GROUSING ILK?

To Scilab Team:
THANK YOU for your time, effort, and applied skills.


Allan CORNET

unread,
Jul 2, 2006, 3:31:47 PM7/2/06
to
In article <1151849869....@m73g2000cwd.googlegroups.com>,
steve...@yahoo.com says...

Hi,


We study seriously this possibility.
A first step will be to generate C code for numeric functions.


With Scilab 4,
you can easily embed scilab with your application .
You can see some examples in examples/callsci directory.


Regards

A.C

steve

unread,
Jul 2, 2006, 5:19:38 PM7/2/06
to

To my view, this point will be a really significant step towards
Matlab.
As Scilab is moving to free GPL/LGPL software (recent post from the
Scilab team),
full C coded standalone applications could be distributed in source
code.

Is it planned for Scilab5?

Thank very much you for your answer.
Steve

Matthias Zenker

unread,
Jul 3, 2006, 3:28:42 AM7/3/06
to

Richard Owlett wrote:

> Is above relevant to anything??????

Maybe not to you, but maybe to others.

> And your proof is ... ???

He has expressed his opinion, and given arguments for it.

> And what have you *CONTRIBUTED* ?
>
> I'm not much of a programmer.
> So, I attempt to contribute by giving *USEFUL* 'bug reports'.
> Are they "actually useful"? Only time will tell.
>
> I've made an effort. HAVE YOU AND YOUR GROUSING ILK?

It is not forbidden to ask for improvements and new features even as
ordinary user.
You may have made the effort to give useful bug reports.
You could make another one and be polite.

Matthias

Andreas Kochenburger

unread,
Jul 3, 2006, 6:39:35 AM7/3/06
to
On 2 Jul 2006 07:17:49 -0700, "steve" <steve...@yahoo.com> wrote:
>Does anyone knows if there are plans to develop a Scilab compiler?
>The Matlab compiler is a great tool, extremely useful to speed up
>computations and sharing code.
>I am afraid that this kind of crucial developments are not among the
>main concerns of the Scilab team.
>The Matlab compiler is about ten years old.

For me the main reason for compiling mex files is to avoid the
expensive licenses of Mathworks. For Scilab this is of no concern.

To speed up computations it is always possible to code time-critical
functions in C or FORTRAN. BTW there are a lot of extremely fast
numerical libraries available in the net, that were compiled with
FORTRAN. For starters: http://www.fortranlib.com/freesoft.htm

Thus IMO priority should be given to Scicos.


Andreas
-------
Et ceterum censeo, TV esse delendam.

Richard Owlett

unread,
Jul 3, 2006, 2:00:01 PM7/3/06
to
Matthias Zenker wrote:


>
> It is not forbidden to ask for improvements and new features even as
> ordinary user.
> You may have made the effort to give useful bug reports.
> You could make another one and be polite.


I'll plead "GUILTY" re not being polite.
I *specifically* intended to be as sarcastic as possible.

I get frustrated with what I consider specious complaints of users of
"Free Software" [ "free" being in terms of "speech" or "beer" ]

BTW
I had an interesting exchange of emails with Richard Stallman.
He failed to convince me to become a proponent of "GNU/copyleft".
*HOWEVER*
If I find a piece of "GNU/copyleft" software useful, I'll attempt to
'pay' in "coin" author wished.

I have found Scilab software useful.
To best of my ability, I'll pay in "coin" they request.


Challenge to *ALL*
'put up' | 'SHUT up'

Gerald

unread,
Jul 4, 2006, 4:58:16 AM7/4/06
to
steve wrote:
> Does anyone knows if there are plans to develop a Scilab compiler?
> The Matlab compiler is a great tool, extremely useful to speed up
> computations and sharing code.

My question would be: is the Matlab compiler a true compiler? or is it
simply a code wrapper (minimal MatLab code and the scripts)? I am
asking because I suspect that it is not a true compiler, in the same
sense as there are currently no Java compilers (although there are
project).

If it is a true compiler, performance should be orders of magnutide
faster than ordinary script execution, in fact everybody would just run
the compiled code. But also, you would have to compile separately for
every hardware architecture.

A real compiler for SciLab would be interesting but it is *very* hard
work. One possible workaround would be a code-converter to convert
SciLab scripts to C or C++ (now that would be a nice project).

If the so-called MatLab compiler is simply a code wrapper to allow
execution of the script on machines other than the ones for which
MatLab was licensed for, then there is really not much of a point in
having this for SciLab. Nevertheless it would be useful at times to be
able to wrap several inter-dependent scripts into a single executable
package.

cheers

Gerald

Matthias Zenker

unread,
Jul 4, 2006, 8:18:40 AM7/4/06
to

Gerald wrote:
> A real compiler for SciLab would be interesting but it is *very* hard
> work. One possible workaround would be a code-converter to convert
> SciLab scripts to C or C++ (now that would be a nice project).

This is what the Matlab Compiler does.

> If the so-called MatLab compiler is simply a code wrapper to allow
> execution of the script on machines other than the ones for which
> MatLab was licensed for, then there is really not much of a point in
> having this for SciLab. Nevertheless it would be useful at times to be
> able to wrap several inter-dependent scripts into a single executable
> package.

As far as I understand, the Matlab Compiler can do both: generate C/C++
code and generate executables directly. See for example
http://www.mathworks.com/support/tech-notes/1600/1622.html#Convert_M_to_C

It would indeed be nice to have the possibility to generate a
standalone executable from a Scilab script which can be executed
without having to install the full Scilab. even if it is free, not
everybody wants to install it just for running a small demo, for
example.


Matthias

Matthias Zenker

unread,
Jul 4, 2006, 8:39:05 AM7/4/06
to

Richard Owlett wrote:

> Challenge to *ALL*
> 'put up' | 'SHUT up'

This is not the way free/open software works.
Many of the free software out there is developped by volunteers, just
because it is fun for them to do it, and they gain recognition. If they
never got any feedback from users asking for new features and
improvements, how should they know what those users would like to have?
There are others who get paid for working on software which may also be
free for different reasons. This is the case of the scilab team.
So I really don't see why only people who contribute should have the
right to ask for a new feature.

Matthias

Greg Locock

unread,
Jul 5, 2006, 8:22:29 AM7/5/06
to
"Gerald" <geral...@terra.com.br> wrote in news:1152003496.081792.231810
@b68g2000cwa.googlegroups.com:

> steve wrote:
>> Does anyone knows if there are plans to develop a Scilab compiler?
>> The Matlab compiler is a great tool, extremely useful to speed up
>> computations and sharing code.
>
> My question would be: is the Matlab compiler a true compiler? or is it
> simply a code wrapper (minimal MatLab code and the scripts)? I am
> asking because I suspect that it is not a true compiler, in the same
> sense as there are currently no Java compilers (although there are
> project).
>
> If it is a true compiler, performance should be orders of magnutide
> faster than ordinary script execution, in fact everybody would just run
> the compiled code. But also, you would have to compile separately for
> every hardware architecture.


That is /your/ definition of a compiler. Not everybody's. Matlab's compiler
is used to produce standalone run-time code for standalone processors. That
is a fact, not an opinion.

I don't know what sort of execution speed advantage I'd expect from a
compiled Matlab program- if it were executing the sort of optimised code
that Matlab is good at already, then not much.

Cheers

Greg Locock

Gerald

unread,
Jul 5, 2006, 10:49:26 AM7/5/06
to
Greg Locock wrote:
> That is /your/ definition of a compiler. Not everybody's. Matlab's compiler
> is used to produce standalone run-time code for standalone processors. That
> is a fact, not an opinion.

I'm using the word "compiler" in the sense of translating a high-level
language (MatLab or Scilab) into a low-level machine executable
language. I cannot claim to have my own definition of compiler, I go
with the most common definition: http://en.wikipedia.org/wiki/Compiler

Using this common-sense definition, the MatLab Compiler is not really a
compiler, it is rather a code-converter or code-wrapper. In that sense
this piece of code has been misnamed as compiler, hence the confusion.
There are many ways to produce stand-alone executable code which may or
may not involve a compiler.

I'm not taking away the merits of the so-called MatLab compiler and I'm
not disputing the fact that it produces a stand-alone piece of code.
Also, I'm not saying that I am in favour or against a Scilab
compiler/code-wrapper etc.

However, I think it helps to understand what we are talking about.
Asking for a compiler (in it's strictest sense) is one thing, asking
for a code-wrapper is something entirely different.

What I said was that writing a *true* Scilab compiler is very
difficult. So difficult in fact that there is not even a *true* MatLab
compiler but a workaround that does a job that in some ways resembles
that of a compiler.

What was also said in the posts was the origin of the MatLab compiler:
to provide a way to run a program on another machine for which you have
no MatLab license (although you need to pay the license for the
"compiler"). Since for Scilab there is no license problem (you can run
as many copies of Scilab as you like) there is less motivation for
having a similar piece of code.

Putting it differently, if you have a SciLab script and you want to run
it on another machine you have to install SciLab on that machine too
(if it is not there already) and that's it. If this machine has a
differences, e.g. location of folders are different, you can quickly
change you script to adapt to the new conditions.

If you have a MatLab script you have to buy a license for a piece of
software that packs your code and allows you to run it elsewhere. Only
then you can move your script to the new location. I don't know if you
could then modify the code on the new machine or if any change would
have to be done on the original machine, and then "compile" again etc.
The process may have it advantages but it also appears to have its
inconveniences. Alternatively, you would have to pay yet another full
license to install MatLab on each target machine.

The remaining motivation would be that of convenience, being able to
pack a collection of scripts into a single program or that of
efficiency by translating the interpreted script into a language that
can be compiled. I think both are interesting in their own ways and
could be accomplished differently.

What I don't know is if these motivations are strong enough to motivate
anybody to develop a specific piece of code for that.

best wishes

Gerald

Nicolas

unread,
Jul 6, 2006, 6:01:38 AM7/6/06
to
To my mind there are 2 different issues :
- Optimizing execution speed by means of a compiler
- Build some black boxes (for example to provide them to other entities
without telling them how you manage to do them)

You all spoke about the first one so I wont do it myself

Concerning the second point, that is really needed in the industrial
world and maybe much more than the first issue.

doo...@gmail.com

unread,
Jul 6, 2006, 4:15:08 PM7/6/06
to

Nicolas wrote:
> To my mind there are 2 different issues :
> - Optimizing execution speed by means of a compiler

This one is very difficult to achieve, because both Matlab and Scilab
are interpreted language without typing and dimensionning.
To improve efficiency it is necessary to be able to get rid of all the
decision tree used to determine which piece of code as to be generated
for the argument or operand types.
This requires specifying types and dimension of the function arguments
and then infer the type and arguments of all computed variables.
A european projet deals with this kind of development.

> - Build some black boxes (for example to provide them to other entities
> without telling them how you manage to do them)
>
> You all spoke about the first one so I wont do it myself
>
> Concerning the second point, that is really needed in the industrial
> world and maybe much more than the first issue.

This point can be reached with Scilab using the scilab computational
engine to make specific closed executables (see the examples/callsci
examples)

Serge Steer
Scilab Team

Matthias Zenker

unread,
Jul 7, 2006, 3:52:24 AM7/7/06
to

doo...@gmail.com wrote:

> Nicolas wrote:
> > - Build some black boxes (for example to provide them to other entities
> > without telling them how you manage to do them)

... and running without an installed scilab?

> > Concerning the second point, that is really needed in the industrial
> > world and maybe much more than the first issue.

I agree.

> This point can be reached with Scilab using the scilab computational
> engine to make specific closed executables (see the examples/callsci
> examples)

As far as I understand, the callsci examples are about calling scilab
from a C/C++/FORTRAN/java application, and an installed scilab is
needed for the resulting application to run (correct me if I'm wrong).

What if I have a scilab script, and I want to build a small standalone
executable out of it which I can distribute to others whithout them
having to install the full scilab? That would require compiling my
script and (statically) linking the requires scilab parts to it. Is
this possible, and if not, is it planned? Should I put a request in the
bugzilla database?

Matthias

Matthias Zenker

unread,
Jul 7, 2006, 3:55:50 AM7/7/06
to

I have just seen that the development roadmap has been updated at
last...

Matthias

Guillaume Dutilleux

unread,
Jul 8, 2006, 5:08:37 PM7/8/06
to

There is a third issue I think :
The interpreted nature of Scilab makes it quite easy to test ideas. In
time, some ideas tend to turn into quite large Scilab programs whose
development and debugging would highly benefit from a compiler for
checking undefined symbols and type mismatches BEFORE runtime.
A compiler is maybe not the only way to address this problem. The use
strict; directive in perl might be an idea to borrow from.

Kamil

unread,
Jul 13, 2006, 4:23:09 PM7/13/06
to
Matthias Zenker wrote:
> What if I have a scilab script, and I want to build a small standalone
> executable out of it which I can distribute to others whithout them
> having to install the full scilab? That would require compiling my
> script and (statically) linking the requires scilab parts to it. Is
> this possible, and if not, is it planned? Should I put a request in the
> bugzilla database?

so is there or if not, is it planned to be able to make such
executables? i dont think anyone answered this question yet and I am
very interested in it.

thanks
Kamil

johnjohn

unread,
Jul 14, 2006, 11:36:53 AM7/14/06
to
There is already a Scilab compiler!

function z=f(x,y)
z=x.*y;
endfunction

src=sci2for(f,"f",list(list("1","n","1"),list("1","n","1")))

Drawbacks:
It produces Fortran77 code (you need a compiler).
The code is generally not efficient.
This is due to the old Fortran technology of Scilab.
Variables are copied into a large working array that the user must
allocate by himself.
Moreover the code produced is often bugged.

John

Matthias Zenker

unread,
Jul 17, 2006, 5:42:12 AM7/17/06
to

johnjohn wrote:
> There is already a Scilab compiler!
>
> function z=f(x,y)
> z=x.*y;
> endfunction
>
> src=sci2for(f,"f",list(list("1","n","1"),list("1","n","1")))
>
> Drawbacks:
> It produces Fortran77 code (you need a compiler).

So I need a compiler for the compiler? ;)

A true scilab compiler would include the compilation step and produce
an executable file directly.

Matthias

Matthias Zenker

unread,
Jul 18, 2006, 10:51:55 AM7/18/06
to
It's now request #308.

Matthias

0 new messages