Java Supercompiler Help

Being called without arguments, jscp.exe returns the following text.


Java Supercompiler. Version 0.1.99 alpha. Copyright (c) 1999-2008 Supercompilers, LLC.

Usage:

   jscp [[-s[ourcedir] <directory>] [<filename>[.java]...]]...
        [-classpath <directory list>] [-cp <directory list>] [-a[utoclasspath]]
        [-sourcepath <directory list>] [-sp <directory list>]
        [-d[estdir] <directory>] [-raw]
        [-log <filename>] [-logxml[s] <directory>] [-graph[n]]
        [-all[m[ethods]]]
        [-m[method] <method identifier>]
        [-c[lass] <class identifier>]
        [-u[nit]<compilation unit number>]
        [-exceptMethod <method identifier> | -xm <method identifier>]
        [-exceptClass <class identifier>   | -xc <class identifier>]
        [-exceptUnit<unit number>          | -xu<unit number>]
        [-[no]dynamicLoading               | -[no]dl]
        [-verboseElaborator<digit>         | -ve<digit>]
        [-t[race]<digit>]
        [-e[nvironment] <environment variable>]
        [-dia[logue]] [-nodia[logue]]
        [-q[uiet]] [-h[elp]] [-?] [-- <comment>]
        [@<file name>]

        [-i[nvoke]<number>]
        [-r[ecur]<number>]
        [-l[oop]<number>]
        [-join                     | -j   ]
        [-joinIf                   | -ji  ]
        [-joinLoop                 | -jl  ]
        [-joinLabeled              | -jla ]
        [-unrollLoopEmpty          | -ule   | -ul1 ]
        [-unrollLoopLinear         | -ull   | -ul2 ]
        [-unrollLoopNoBreak        | -ulnb  | -ul3 ]
        [-unrollLoopNoRegularBreak | -ulnrb | -ul4 ]
        [-unrollLoopAlways         | -ula   | -ul6 ]
        [-[no]defaultFields                 | -[no]df   ]
        [-[no]defaultArrayElements          | -[no]dae  ]
        [-[no]finalInitializedArrayElements | -[no]fiae ]
        [-[no]multiplyZeroFP                | -[no]mzfp ]
        [-[no]changeAccessOrder             | -[no]cao  ]
        [-cons[ervative] | -aggr[essive]]

General options:

    -h[elp] or -? shows this help

    @<file-name>
        supplies a list of arguments in a file

    -e[nvironment] <environment variable>
        substitutes the value of the environment variable here;
        the variable value is considered a list of arguments

    --      means the rest of arguments is ignored, a comment

Options to control communication with user:

    -q[uiet]
        quiet mode: no title; verbose and trace levels are reset

    -verboseElaborator<digit>, -ve<digit>
        sets verbose level to show elaborated Java program:
        0 - no Java program members are output (default)
        1 - minimum output: only member headers
        2 - standard output, library classes w/o code are not shown
        3 - standard output with attributes: method dispatch tables etc
        4 - the same plus library classes are shown without attributes
        5 - all classes and interfaces are shown with attributes

    -t[race]<digit>
        sets trace level (default is 0)

    -dia[logue]
        enter dialogue mode instead of exiting JScp
    -nodia[logue]
        do not enter dialogue even in case of errors
        Default: enter dialogue mode in case of errors

    -[no]beep
        enable sound beep on dialogue prompt
        Default: -noBeep

    -heapshowlimit<number>, -hsl<number>
        print at most n (preferably latest) items of the heap.
        Use this option to avoid too large dumps
        Default: no limit

Options to define source .java and .class files:

    <filename>[.java]...
        .java files used for supercompilation

    -s[ourcedir] <directory>
        the directory is prepended to each filename that follows it

    -[no]dynamicLoading, -[no]dl
        load on demand available .java files unspecified explicitly
        Default: -noDynamicLoading

    -sourcepath <directory list>, -sp <directory list>
        the directories searched for dynamically loaded .java files
        Default: -sourcepath .

    -classpath <directory list>, -cp <directory list>
        this argument is passed to 'javac' and 'javap'

    -a[utoclasspath]
        root directory of each file package is appended to classpath

Options to define output:

    -d[estination] <directory>, -d[estdir] <directory>
        modified .java files with supercompiled methods are put
        to <directory>, in its subdirectories reflecting the
        package names. If this option is absent, the result of
        supercompilation goes only to stdout.

    -raw    output resulting code without post-processing.
        Use this option to localize an error or for curiosity.

    -log <filename>
        copy standard output to specified file

    -logxml[s] <directory>
        output task in xml format to the directory

    -graph[n]
        output graph of the last residual method to file graph.dot
        in the format of Graph Visualization Software by GraphViz.org
        n - detail level (default n=1):
        n mod 2 = 0 - no boxes with basic blocks (n < 8)
        n mod 2 = 1 - with boxes with basic blocks
        n <= 1 - no text in nodes (except 'try')
        n >= 2 - text of the method header, 'return' and 'throw'
        n >= 4 - edge labels 'true', 'false' and 'case ...'
        n >= 6 - text of statement headers
        n >= 8 - text of basic block statements
        n  = 9 - 'new' expressions are commented with constructor code

Options to define compilation units, classes and methods to be supercompiled:

    -all[m[ethods]]
        supercompile all methods from compilation units and classes
        defined by -m, -xm, -c, -xc, -u, -xu, or from all .java files

    -m[ethod] <method identifier>
        supercompile methods with a given identifier from classes
        and compilation units defined by -c, -xc, -u, -xu
        Several -excludeMethod options unite.

    -exceptMethod <method identifier>, -xm <method identifier>
        exclude methods with a given identifier from supercompilation
        Several -excludeMethod options may be given.

    -c[lass] <class identifier>
        supercompile methods from top level classes with a given
        identifier found in compilation units defined by -u and -xu

    -exceptClass <class identifier>, -xc <class identifier>
        exclude classes with a given identifier from supercompilation
        Several -excludeClass options may be given.

    -u[nit]<number>
        supercompile methods from <number>th compilation unit
        in the order of file names given.
        Several -unit<number> options may be given.

    -exceptUnit<number>, -xu<number>
        exclude classes with a given identifier from supercompilation
        Several -excludeClass options may be given.

    Notes . Several -m, -xm, -c, -xc, -u, -xu options may be supplied.
        Names and unit numbers define 6 sets corresponding to options.
        The order of options matters: names or numbers are deleted
        from opposite options sets defined by previous options.
          . If no option -all, -m, -xm, -c, -xc, -u, -xu is present, JScp
        enters the dialogue mode after .java files has been elaborated.

Options to control supercompilation:

    -i[nvoke][<number>]
        invoke <number> times and residualize <number>+1-th invocation
        where initial method invocation to be supercompiled is 1th;
        -invoke (without number) -- no limit of method invocations
        Default: -invoke1

    -r[ecur][<number>]
        recur <number> times and residualize <number>+1-th
        recursive invocation of the same method
        -recur (without number) -- no limit of method invocations
        -recur0 = invoke0
        Default: -recur1

    -recurObject[<number>], -ro[<number>]
        recur <number> times and residualize <number>+1-th
        recursive invocation of the same method on the same object
        -recurObject (without number) -- no limit of method invocations
        -recurObject0 = invoke0
        Default: -recurObject1

    -l[oop][<number>]
        unconditionally unroll each loop <number> times and
        only then apply the unroll loop rules (see below)
        Default: -loop0

    -recurGener[<number>], -rg[<number>]
        when generalizing different object values of a field
        generalize to wildcard if at least <number of occurrences>
        of input values has been encountered,
        otherwize continue recurring into.
        -recurGener (without number) -- always recur into
        Default:
        -recurGener0 - always generalize different values to wildcard

    -arraylimit<number>, -al<number>
        when the length of an array is greater than <number>,
        JScp does not keep values of separate elements
        Default: -arraylimit10

    -join, -j
        join branches after all statements (union of -join... below)

    -joinIf, -ji
        join branches after conditional statements

    -joinLabeled, -jla
        join branches after labeled blocks

    -joinLoop, -jl
        join branches after loops and method invocations

    -unrollLoopEmpty, -ule, -unrollLoop1, -ul1
        continue loop unrolling if current residual loop body is empty

    -unrollLoopLinear, -ull, -unrollLoop2, -ul2
        continue loop unrolling if current residual loop body is linear

    -unrollLoopNoBreak, -ulnb, -unrollLoop3, -ul3
        continue loop unrolling if current residual loop body has no breaks
        except implicit exceptions

    -unrollLoopNoRegularBreak, -ulnrb, -unrollLoop4, -ul4
        continue loop unrolling if current residual loop body has no breaks
        except implicit exceptions or 'throw exception' statements

    -unrollLoopNoContinueBreak, -ulncb, -unrollLoop5, -ul5
        continue loop unrolling if current residual loop body has no breaks
        except 'throw exception' or 'return' statements

    -unrollLoopAlways, -ula, -unrollLoop6, -ul6
        unroll loops completely

        -unrollLoop... options assist taking decision on
        whether to generalize initial loop configuration
        due to not included tail configurations.
        The higher value the more aggressive supercompilation.
        Default value is 0 - generalize always.

    -loopBack<n>, -lb<n>
        when a tail configuration is included into the initial one
        looping back takes place depending on <n>:
        n=1 - never loop back without generalization
        n=2 - loop back if tail configuration is equal to initial one
        n=3 - loop back if tail configuration is included into initial one

    -defaultFields, -df
        if -defaultFields, the fields of instances created by 'new'
        are set to default values (0 or null);
        if -noDefaultFields, such fields are considered unknowns
        Default: -noDefaultFields

    -defaultArrayElements, -dae
        set initial values to the elements of arrays created
        without explicit initializers (e.g., new int[10]):
        with -defaultArrayElements (default) initial values of such
        arrays are set to 0 or null according to the Java semantics;
        with -noDefaultArrayElements these array elements are
        considered unknown after array creation
        Default: -defaultArrayElements

    -finalInitializedArrayElements, -fiae
        arrays created with initializers, e.g., new int[] {1, 2},
        during evaluation of initializers of static final fields
        are considered having 'final' elements, and the values of the
        elements, e.g., 1 and 2, are used during supercompilation.
        Default: -noFinalInitializedArrayElements

    -multiplyZeroFP, -mzfp
        perform transformations 0*x=0, x*0=0, 0/x=0,
        despite incorrectness when x is NaN or [+/-]Infinity
        Default: -noMultiplyZeroFP

    -changeAccessOrder, -cao
        allow to change the order of access to fields, array elements
        and global variables (static fields)
        Default: -noChangeAccessOrder

    -cons[ervative]
        supercompile in conservative mode, which is equivalent to
        -join, -unrollLoop0

    -aggr[essive]
        supercompile in aggressive mode, which is equivalent to
        -join0, -unrollLoop2

Notes:

    Option keywords are case insensitive.
    Minuses and underscores inside keywords are ignored.

    Syntactically, options except comment may go in any order.
    However, semantically, the order of some options matters.
    In case of conflict, a rightmost option is a priority.

Copyright (C) 1999-2008 Supercompilers, LLC   Last modified 3 May 2008 by Andrei.Klimov@supercompilers.com