From: John P. <joh...@na...> - 2005-05-03 23:11:25
|
Hi John, sorry i wasn't clear. I meant that "new" works now: String x = new String("bob"); will allocate a String object on the heap. Class.getInstance() does not work - someones need to implement it so it pokes into the JPF JVM and do what new does. we have not done that - apparently we have only used new to allocateo on the heap. jp Atwood, John Wesley wrote: > Jp, > > I don't quite follow "new should work just fine". Do you mean "should, > with add'l development", or "should...must be a bug"? > > I read in the source, that newInstance is "required by some braindead > IDE's..."; but the line that generates this seems fairly innocuous to > me: > String url = "blah"; > > I'll look in the papers for more background.... > > John > -----Original Message----- > From: John Penix [mailto:joh...@na...] > Sent: Tuesday, May 03, 2005 3:07 PM > To: Atwood, John Wesley > Cc: jav...@li... > Subject: Re: [Javapathfinder-user] Class.newInstance() not yet supported > > Hi John, > > new should work just fine. > > this is an example of a Javaism that we have not been using in our > "models" of NASA applications. > > The code which models java/lang/Class is in > /env/jpf/java/lang/Class.java - the 'real' class has native methods, so > we have to model it. The methods in java/lang/Class are only minimally > supported - just enough to support assertions. (see the comments at the > top) > > > supporting newInstance seems like a big deal to me. I don't know how > hard it would be to hook that in - Peter or Willem should be able to > guess. > > If anyone is feeling slightly ambitious, grab the MJI docs and go for > it. :) > > > jp > > > Atwood, John Wesley wrote: > >>JPF users, >> >>Trying to learn about JPF, I ran the jpf run-tests, and a few of the >>examples. >>Then I ran it on my own program, and get: >> Class.newInstance() not yet supported >> >>Is all dynamic object creation prohibited, and, if so, is that a >>fundamental aspect of JPF? >> >>Thanks, >> >> >>John Atwood >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: NEC IT Guy Games. >>Get your fingers limbered up and give it your best shot. 4 great >>events, 4 opportunities to win big! Highest score wins.NEC IT Guy >>Games. Play to win an NEC 61 plasma display. Visit >>http://www.necitguy.com/?r >>_______________________________________________ >>Javapathfinder-user mailing list >>Jav...@li... >>https://lists.sourceforge.net/lists/listinfo/javapathfinder-user >> > > > -- > John Penix PhD. john.penix+nasa.gov http://ase.arc.nasa.gov/jpenix/ > Robust Software Engineering Group ph:(650)604-6576 bld:N296 rm:268 > Intelligent Systems Division NASA Ames Research Center Mt.View CA > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r > _______________________________________________ > Javapathfinder-user mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/javapathfinder-user > -- John Penix PhD. john.penix+nasa.gov http://ase.arc.nasa.gov/jpenix/ Robust Software Engineering Group ph:(650)604-6576 bld:N296 rm:268 Intelligent Systems Division NASA Ames Research Center Mt.View CA |