• When doing conversion via specified functions, check why the numbers of the anonymous objects are going up by ~ 30. See tests/funcConverter.S
  • Allow the .convert to be a named list of functions that we match by class name so we can handle recursive objects, e.g. hashtables.
    Not really needed as one can do it within a "closure".
  • .Java(NULL, "testBooleanArrays")
  • Vince's application that requires the new version of Antlr.
    R.Java.ROmegahatInterpreter Interfaces.NativeInterface.OmegaInterfaceManager Environment.Interpreter.InteractiveEvaluator UserClassEvaluator UtilityEvaluator BasicEvaluator In BasicEvaluator, Parse Methds and Create Parser and Imports
  • [Okay] Syncrhonization of the access to the evaluator.
    Needs more testing.
    And to work with in both directions and in all of the calls.
  • Passing NAs across the interface.
  • Exceptions
  • Method selection should throw an exception if it is ambiguous and put the options into the exception.
  • RtoJava.cweb and line 242 to pick up the primitive array converters registered as user-level converters are not getting picked up. But we have to fix the handling of arrays in this case and using the first element of the array. If it is not primitive, bad things happen!
  • char/Character conversion.
  • Free the anonymous Assignment in the RForeignReference_reval method in RReferenceCall.
  • Fix the problem regarding the typedef'ing of boolean.
    Huh?
  • Remove converter function.
  • GUIs are causing problems. Things are haning, crashing, etc.
    This seems to be Blackdown JDK 1.2 on Linux specific.
  • Check the signature material.
    Seems ok for the basics.
  • Check the conversion of data types to Java when calling R from Java via callbacks. (Tests usually involve void!)
    See TestTypes.{R,java} in the tests/ directory.
  • [Okay] Method arrays being left as arrays. Check the autoArray material.
    Back again now, but need to check everything else works.
  • [Okay] Make the .JavaConstructor understand whether a .convert is appropriate.
    By default, it is FALSE.
  • Example Errors

  • See the DataFrameViewer example in Examples.nw
  • Non-urgent Changes

  • Re-implement the .JavaConstructor with a call to .Java() (See the note in Src/R.S in the function definition.) This will fix the error handling also.(See entry further down.)
  • Functions to release the references, i.e. Manage the Omegahat databases.
    Already in the evaluator. Just have a .Java()
  • Use C++ to allow different classes of converters to be added to the linked list.
  • Allow conversion of multi-dimensional arrays by having the internal routines cmpute the number of dimensions. Then recursively compute the conversion of each sub-dimension. Not exactly clear how to convert such arrays, but lists of lists .... should be fine.
    Get the references at the R level to free un-assigned values. (i.e. arguments to .Java calls that are unassigned to a name but anonymous references or .Java() calls themselves. For example, free the results of the interior two .Java calls.
         .Java(.Java( .Java(o, "getClass"), "getSuperclass"), "getName")
    
    )
  • Ideas to be Implemented

  • Allow R calls to Java objects that are actually exported R references to call the object directly.
    This arises in a case such as the following (see dataFrameReferenceView.R in the tests or examples)
       ref <- foreignReference(mtcars)
       jdata <- .JavaConstructor("RDynamicDataFrame", ref)
       jdata$numObservations()
    
    In this case, the last call actually goes to Java which calls the method numObservations() in RDynamicDataFrame which calls R and gets the number of rows in the mtcars object stored in the foreign reference manager. This could be done with a few extensions in the following way:
           obj <- getJavaHandler()$getReference(jdata$referenceName)
           obj$numObservations()
    
  • Java Graphics device.
    We can use JNI to slide a Java graphics device into the same framework as X11(), postscript, etc. The device would have a reference to a Java component and hence allow one to embedd one or more graphics devices in different parts of a window.
  • Fixes but with Outstanding Details.

  • - Add the converter as a C routine or R function from the command line.
    See the notes at the top of Converters.cweb. Can use R functions instead of registering functional converters.
    - Visibility flag of the references is incorrect. Only true if the LDEBUG flag is on.
  • Fixes

  • Function to determine if the JVM has been started.
    Useful for examples so that we don't call .Java when it hasn't been started or get an error if it initialized.
    See isJavaInitialized().
  • Activate the eval() method in RForeignReference so that it doesn't just say "Would invoke"
  • Converting two dimensional arrays
          r <- .JavaArrayConstructor("String", dim=c(2,0))
          .Java(NULL,"identity", r)
    
    yields garbage.
    Check for two or more dimensional arrays in ConvertibleClassifier's isConvertible() and return false.
  • Add the .name to the Array functions (the set method)
  • + Not handling null's in the covertible correctly and trying to assign to anonymous database. Fixed in assignResult.
       x <- .JavaConstructor("javax.swing.JFrame")
       .Java(x,"setBounds",as.integer(10),as.integer(10),as.integer(100),as.integer(100))
       .Java(x,"setVisible",T)
    
  • + getForeignReferences should give a list of InterfaceReference objects. Need a converter for that type.
    Just add the class InterfaceReference to the BasicConvertibleClassifier contents.

    Second time around, it doesn't seem to work!

  • + Crashes when the .JavaConstructor() call fails. Problem was we were catching the exception, returning null and convertAnswer never checked for that.
  • + Allow package names for the dynamic compilation. Just us the A.B.className setup.

  • Duncan Temple Lang <duncan@research.bell-labs.com>
    Last modified: Wed Dec 14 06:46:26 PST 2005