C source to Slang and/or C to Squeak translation possible?

Ed Boyce edboyce at bu.edu
Sun Aug 21 15:10:32 UTC 2005


All,

    We all know that the Squeak subset Slang maps directly INTO a class of
C constructs, but what about the other way round?

    Putting aside the obvious questions of relative performance, I'm
wondering how much of general C construct space can be mapped
(translated) into Slang?  What if you open up all of Squeak?  Can C
code be theoretically compiled into Squeak code?  (Are there many
functions in libc that Squeak can't already indirectly call through
its primatives?)

    My guess is that a C --> Slang and C--> Squeak mapping isn't possible
in the most general space of cases (abuse of pointers comes to mind),
but what restrictions on C code (or addition of primatives for Squeak)
would be necessary to make the transformations work as 1 to 1
bijections?  I.e., is a Squeak based C interpreter or a C --> Squeak
compiler possible that would allow many venerable C based utilities
(e.g. grep and gcc) to be accessible within Squeak, with their input
and output represented by Squeak objects.

    Bigger can of worms: How about C++?  (With Squeak access to C++ objects).

    Slang allows embedded C code when necessary, but what about embedded asm?

    Motivating question: Would it be utterly impossible (never mind
performance prior to hand optimizations) to translate an L4
microkernal or some other microkernel into Slang with a mostly
automated transformation process (as suggested in
<<http://minnow.cc.gatech.edu/squeak/5730>> to facilitate the
evolution of a pure Squeak/Croquet platform?

     Best Regards,

        Ed Boyce


-----------------------------------------------------
Ed Boyce
Education and Outreach Writer/Editor
Coordinator, Visualize Education Virtual Institute
Engaging People in CyberInfrastructure (EPIC) Program
http://www.eotepic.org

Boston University Center for Computational Science
3 Cummington Street, 5th Floor
Boston, Massachusetts  02215

413-245-3997
edboyce at bu.edu
------------------------------------------------------





More information about the Squeak-dev mailing list