|
Authored by: Anonymous on Tuesday, May 08 2012 @ 09:29 PM EDT |
Or the phrase "this sucks" with respect to Oracle Weblogic. [ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Tuesday, May 08 2012 @ 10:04 PM EDT |
There's a real problem with Oracle's argument, though. The patent calls
out
the use of symbolic references in *generated code*. Oracle's lawyers say
"the
source code will show you that Google do this." That's complete
nonsense. The
source code isn't the generated (compiled) code.
The standard mechanism
for lookups is a symbol table. A symbol table
maps identifiers (which may be
names or may be something else, but are
always unique within the scope of the
potential lookup) to addresses (which
are determined upon loading the symbols
into memory). Here, "symbols" (for
Java virtual machines and presumably for
Dalvik) means classes, methods,
and fields. The alternative to symbol tables
is faster to execute, but slower to
load: as each collection of symbols (each
class or collection of classes) is
loaded, you look through what's already
loaded and replace the identifiers
with the addresses. In fact, this is part
of what the Java JIT (just-in-time
compiler) does.
The drawback to
using direct addressing rather than symbol tables is that
you have to keep
everything in memory. That's less of a challenge these
days, but used to be
pretty serious. You can run out.
Anyway, the point here is that no
amount of examination of the source
code is going to tell you damn-all about
the result of compiling it. The result
of compilation has to be compatible
with what the interpreter (for a byte-code
language, like Java or Dalvik)
expects (for C and similar lower-level languages,
the output of the compiler
probably includes a symbol table, but it's written in
such a way that it's
compatible with the CPU instructions; C compiles to
"machine code", rather than
a portable "byte code" representation that
requires the mediation of an
interpreter). If you want to see whether Dalvik
contains symbolic references,
you've got to have witnesses who can interpret
the byte code generated for
Dalvik (which won't run on a JVM). What's in the
source code simply doesn't
matter, and if someone told Oracle's lawyers that
it does, they provided poor
guidance.
Amy! [ Reply to This | Parent | # ]
|
|
Authored by: celtic_hackr on Wednesday, May 09 2012 @ 03:43 AM EDT |
I have a book on Assembly Language, by, I think von Neumann. I'll bet I can find
dynamic linking in there. I know I have it in an old Pascal book, from 1986.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Wednesday, May 09 2012 @ 05:14 AM EDT |
Here is a practical real world example of how symbolic references can be
resolved during run time in C:
#include
<dlfcn.h>
#include <string.h>
#include
<errno.h>
/* This is a generic result = f(x,y)
function,
* with plugin library and function name both
*
specified as strings (non-numeric symbols).
* The function returns
NULL if success, an error string otherwise.
*/
const char
*plugin_function(const char *const plugin, const char *const function, double
*const result, const double x, const double y)
{
double
(*func)(double, double);
const char *err;
void *lib;
if (!plugin || !*plugin || !function ||
!*function || !result)
return
strerror(EINVAL);
lib = dlopen(plugin,
RTLD_NOW | RTLD_GLOBAL);
if (!lib)
return dlerror();
dlerror();
*(void **)(&func) = dlsym(lib, function);
err =
dlerror();
if (err) {
dlclose(lib);
return err;
}
*result = func(x,y);
dlclose(lib);
return NULL;
}
The
above code follows the POSIX.1-2001 standard, but is of much older origin. The
man page states the interface originates, funnily enough, from SunOS.
I
believe the above code is what the symbolic linking patent tries to cover. I do
believe software patents are patents on mathematics and ideas, and will never
respect them, and will never admit to reading them, but I think the above is
basically what is patented.
According to Google, Dalvik uses a different
approach: instead of looking up the symbol in run time, their bytecode
transformation tool replaces the above function with structures similar
to
struct dynamic_function {
const char
*const library;
const char *const function;
union {
double (*in_d_d_out_d)(double,
double);
/* Other prototypes ... */
&bnbsp;} pointer;
};
/* One of these for each dynamic
function used: */
struct dynamic_function plugin_function =
{
.library = "library name",
.function =
"function name"
};
/* Code use:
z
= plugin_function.pointer.in_d_d_out_d(x,
y);
*/
Note that the union means that
while there may be different prototypes (needed in C, so that the compiler can
supply the correct parameters and understands the result value correctly), they
all use the same pointer; only one of them is valid.
When a new
Dalvik binary is installed, another tool fills in the pointers in the structure;
the pointer values themselves depending on what libraries are installed on that
Dalvik virtual machine. The tool is only run when something is installed, not
when an application is started; this "linking" is simply an installation
step.
It should be obvious that the first model does a lot of unnecessary
work, and is certainly obvious to anyone competent in dynamic library
programming in C. In all real-world use cases I've seen, the code uses a variant
of the latter approach, where the pointers are filled early during program
startup, i.e. when the program "scans" for libraries and plugins. (This is
essentially what happens when e.g. Gimp scans for plugins. Not exactly, but in
the general sense.)
Not only is the patent blatantly obvious, but I think
there should be tons of prior art, too. Furthermore, Oracle claims that the
Dalvik symbol lookup should be considered to be "runtime" (and thus fall under
the patent claims), simply because the tool that does the transformation is
itself a Dalvik binary. It does not seem to matter that the tool is completely
separate, and operates on the applications as if the applications are purely
data; the applications are not executed at that point.
I'm
seriously losing my faith in humanity. A lot of people I've met, many with
relevant university degrees, believe they have the right to bar others from
using ideas like the above, simply because they think they were the first to
have the idea, and should therefore have the right to profit from it. [ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, May 11 2012 @ 10:58 PM EDT |
I take exception to "the prehistory of computers (e.g. the
seventies)."
As someone who learned to program in 1964, I believe the "prehistory of
computers" belongs to Babbage, Lovelace, the Bletchley Park crew (where I
really only know the name Turing, but there are certain to be many more),
Konrad Zeus, Atansoff, Eckert, Mauchly, von Neumann, et al. Said prehistory
ended with commercialization (let's say 1948 or so), where we begin to have a
better idea of who did what.
Well, I can take solace in the fact that if I am a dinosaur, I may get to choose
the
breed. Watch out for velociraptor![ Reply to This | Parent | # ]
|
|
|
|
|