[PLUG] Converting C to java

Rich Shepard rshepard at appl-ecosys.com
Mon Jun 9 21:07:01 UTC 2003


On Mon, 9 Jun 2003, Kyle Hayes wrote:

> As previously noted, SWIG does a fair job.  Java has the Java Native Interface 
> API.  This is really pretty much a Java-to-C API (and vice versa I think).  
> Never used it myself, but I have a book on it :-)  Look up JNI online at the 
> main Sun Java site.  I seem to remember it being quite thorough.

Kyle,

  When I looked at the SWIG Web site I saw a section on JNI. I'll get to
reading more about this, I'm sure.
 
> If you're going to be doing some heavy lifting in the math world, then you 
> should look around and make sure that someone hasn't already done the work of 
> wrapping highly optimized libraries for you.  I keep hearing about scientific 
> computing projects that use Java, so someone's done some wrapping.

  Aside from a couple of folks working for private companies or offering
highly-specialized soluttions doing the type of modeling I'll be doing,
there's only one person in the country actively producing work in this
field. The other one with a very high degree of knowledge is the retired
head of the Department of Biological Mathematics at the University of
Alabama/Birmingham. He's 83 years old now and I'm drafting the agreements
that will allow me to buy his code and expertise. I'm talking about fuzzy
system models that use fuzzy sets to describe linguistic variables and are
manipulated using the mathematics of fuzzy logic (t-norms, anyone?). Ergo,
nothing's available.

  Well, let me modify that. NASA wrote a expert system modeling tool and Sandia Labs
translated it from C to java. A unit of the Canadian government made fuzzy
modules for each. Other than the original NASA code (in the public domain)
use of the others costs big bucks: $15,000 and up. Also, they are neither
complete nor well written systems and the fuzzy portions are designed more
for control than for decision support systems.

  My friend and mentor would let me use his code but he signed it over to
his new company (he's started four software companies over the past few
decades and sold three of them; one to IBM for a figure comfortably in 9
digits -- to the left of the decimal point. His advice is to buy the source
code that I'm working on getting.
 
> Code translators will give you code that works, but a good way to do
> things in C may not be a good way to do things in Java and vice versa. 
> I've never used any of the tools, so I'm not going to guess how long it
> will take.

  True; very true. But, if I can get working code in java by wrapping or
hand porting the core functions and re-creating the UI in pure java then
I'll have a working system sooner rather than later. As time permits and my
knowledge and skill with java increase I can working on optimizing
performance.

Many thanks for the thoughts,

Rich
 

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com/





More information about the PLUG mailing list