Menu

#1 Oracles and Functions - The Java Serialization Format

open
nobody
None
5
2003-06-27
2003-06-27
No

I would like to use datascript to parse the Java
serialization format produced by
java.io.ObjectOutputStream. I think, it is not possible to
specify this format with the current datascript
language. The main problems are the following:

1. The parse process needs data that is not read from the
stream, but provided by the application context.

2. The parse process needs to extract information from
already parsed data to proceed.

The latter problem could be solved by adding user-defined
functions to the datascript specification that do the
extraction of the information from the context. Functions
are required to be state-less.

Examples are the getType(), getElementType() and
getInheritanceDepth() functions in the attached
serialization format definition.

The first problem could be solved by adding oracles to the
datascript language. Oracles are like functions, but they
are not required to be state-less. An oracle acts as an
additional data-source for data that is not parsed, but
provided by the application. Oracles are required to be
asked by the datascript parser in exacly the same order,
whether data is read selectively or not.

Examples are the newHandle() and doReset() oracles in
the attached serialization format definition.

Discussion

  • Bernhard Haumacher

    Example format definition for parsing Java serialization format

     
  • Bernhard Haumacher

    Parser fix plus build definitions for the serialization example

     
  • Bernhard Haumacher

    Logged In: YES
    user_id=29238

    The (striped) serialization format does no longer compile
    with the current CVS version, because of a
    NullPointerException. It does compile with the version

    cvs update -D "2003/06/12"

    if the parser patch that fixes the
    StringIndexOutOfBoundsException is applied. The atached file
    serialization.patch does include this and additionally
    provides build.xml definitions for the serialization example.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.