Page 1 of 2

Built in interpreters, VMs and runtime shells

Posted: Mon Feb 01, 2010 10:28 pm
by Folknology
I would like to no what's available as an interpreter and or shell for XS1 silicon, which is why I started this thread. This would be a good place to enumerate any you are working on or planning to avoid duplication. It would also be a good place to make suggestions about others perhaps on different platforms that make be relevant for porting.

I Already Know of DrFingersSchaefer G4 - Forth http://xcore.com/forum/viewtopic.php?f=17&t=111

The Transterpreter Project looks really intresting and would seem like a good candidate given it's concurrecy bias and its Occam_Pi origins, its already running on Arduino < 10K - Transterpreter (Its a VM I believe) http://www.transterpreter.org/ I wonder if a tight port could be squeezed into OTP..

Feedback, thoughts, ideas?

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 7:24 am
by jonathan
Folknology wrote:I would like to no what's available as an interpreter and or shell for XS1 silicon, which is why I started this thread. This would be a good place to enumerate any you are working on or planning to avoid duplication. It would also be a good place to make suggestions about others perhaps on different platforms that make be relevant for porting.

I Already Know of DrFingersSchaefer G4 - Forth http://xcore.com/forum/viewtopic.php?f=17&t=111

The Transterpreter Project looks really intresting and would seem like a good candidate given it's concurrecy bias and its Occam_Pi origins, its already running on Arduino < 10K - Transterpreter (Its a VM I believe) http://www.transterpreter.org/ I wonder if a tight port could be squeezed into OTP..

Feedback, thoughts, ideas?
Interesting suggestion. I think the main benefit of the Transterpreter was to be able to run OCCCAM programs again without a transputer - wouldn't an OCCAM/occam-pi implementation be more efficient (particularly if done through LLVM)?

I can't remember how much of the transputer link protocol was implemented in the Transterpreter. I think that would be the tricky bit.

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 10:47 am
by richard
I've always been fond of lua, although it might be a squeeze to fit it into 64K.

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 1:00 pm
by TonyD
Java VM or rather something like JavaCard which has a small memory footprint and may be persuaded to fit into 8K OTP

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 1:18 pm
by Heater
I think I said before, something like Lua or Java or even the Transterpreter for Occam would be great if we could put the byte codes into an external SRAM. The interpreter itself is free to live in the 64K core RAM. All of a sudden we would have the ability to run huge programs on an xcore for non-time critical stuff whilst having the rest of the xcores free for the hard real-time work.

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 1:39 pm
by TonyD
I agree with you. Running a VM will open up all sorts of possibilities. You could target different languages for the same VM. I'm not pushing Java, but the Java VM has several other programming languages which can be compiled to run as Java byte code such as Forth, Ruby and Python (I'm not saying these versions are any better than their original implementations).

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 2:54 pm
by jonathan
Heater wrote:I think I said before, something like Lua or Java or even the Transterpreter for Occam would be great if we could put the byte codes into an external SRAM. The interpreter itself is free to live in the 64K core RAM. All of a sudden we would have the ability to run huge programs on an xcore for non-time critical stuff whilst having the rest of the xcores free for the hard real-time work.
I think this is a great start for the "non-time critical stuff".

I think you could use it as the basis for some pretty cool interpreters.

http://xcore.com/projects/xs-1-context- ... r-vthreads

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 4:55 pm
by Folknology
The transterpreter is written in ansi c and could use context switcher threads as its under pinnings leaving most of other threads for time sensitive/critical usage in XC

I would also like to see a shell on top of such a system for interactive development work.

I think java VM is just to big, Lua sounds good but again I am not sure of size.

The thing i would like most is an XC like shell/vm in a OTP would be even better still!!

Re: Built in interpreters, VMs and runtime shells

Posted: Tue Feb 02, 2010 10:35 pm
by shawn
The nice thing about making a tm - vm. would be the inheritance of years worth of CSP provable binaries ; )
For what its worth postscript is interpeted, I don,t think I would use it for much else than making a nice browser rip. TECO, LISP,BASIC,FORSE or LAP6.... Forth,Java.. How should you choose...

Shawn

Re: Built in interpreters, VMs and runtime shells

Posted: Wed Feb 03, 2010 10:12 am
by TonyD
Folknology wrote:..
I think java VM is just to big, Lua sounds good but again I am not sure of size.

The thing i would like most is an XC like shell/vm in a OTP would be even better still!!
Yes, full fat Java is too big for the smallish memory footprint of the XS1, but the slimmer JavaCard could fit into 64K RAM + 8K OTP. Dallas Semiconductor (now Maxim) used to sell their souped up 8051 micros with an embedded JavaVM in the late 90's and there are others still doing it now: Javelin Stamp and JStamp are two that spring to mind (although JStamp has a much bigger memory footprint).