close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of JCop

01/06/2011 10:54:05 AM (9 years ago)



  • JCop

    v1 v2  
    1212    * [ Download latest JCop Compiler]
    1313    * [wiki:JCopInstallationManual JCop Manual]
     14[WikiStart Back to JCop]
     16= JCop Manual =
     17This manual describes the usage of the JCop language compiler that is able to compile
     18programs of the JCop and Java programming language.
     19The compiler implements the language as defined in the JCop language specification ver-
     20sion 1.0. The language definition has continuously been revised to precisely specify the
     21language including various corner cases and combinations of features.
     22The compiler is an extension to the JastAddJ Java compiler that is implemented based on
     23the [ JastAdd compiler framework].
     25== Installation ==
     27An archive containing the latest version of JCop and all necessary files is available [ here]. In addition, a
     28JVM 1.5 or higher must be installed on the system.
     30=== Required Files ===
     32The following files are required to run the compiler at the command line. Besides the
     33platform independent JAR archives the JCop distribution contains command scripts for
     34Windows and Unix systems.
     36  * ''jcop.jar'', Executable archive that contains the JCop compiler.
     37  * ''aspectjtools.jar'',  aspectjrt.jar, [ AspectJ] libraries that are required by jcop.jar.
     38  * ''aspectjweaver.jar'', [ AspectJ]library that is required for VM instrumentation at runtime.
     39  * ''agg_V165_classes.jar'', [ AGG] library required to generate an AGG graph instead of bytecode.
     40  * ''jcopc'' and ''jcop'' scripts for compilation and launching of JCop applications
     42=== Environment Variables ===
     43The compiler requires a JCOP_HOME environment variable pointing to the directory in which
     44the above archives and scripts are located. For convenience, the folder should also be added
     45to the path variable to ease the access to the command scripts.
     47== Command Line Tools ==
     48=== Compile ===
     49==== Synopsis ====
     50   {{{jcopc  [Options]  [file]}}}
     52==== Description ====
     53The jcopc  command compiles JCop and Java source, producing .class files compliant
     54with any Java VM (1.1 or later). The argument after the options specifies the source file
     55to compile. Source files are specified by their full qualified name (package name + type
     56name), separated by a dot (".") (rather than a folder delimiter as for javac).
     58==== Options  ====
     59{{{-classpath  <path>}}}
     60  Specify where to find user class files and annotation processors.
     62{{{-sourcepath  <path>}}}
     63  Specify where to find input source files. Only required if the sources aren’t located in the working directory.
     64  Example:
     66jcopc  -sourcepath  src  myPckg.MyMainClass
     69{{{-d  <directory>}}}
     70  Specify where to place generated class files.
     73jcopc  -d  bin  -sourcepath  src  myPckg.MyMainClass
     76{{{-sourcedump  <path>}}}
     77  Dumps Java source files of the compiled classes into the specified folder.
     80jcopc  -sourcedump  dump  myPckg.MyMainClass
     83{{{-agg  <path>}}}
     84 Generates a file containing an AGG graph representation of the program’s AST.
     87jcopc  -agg  output/agg  myPckg.MyMainClass
     91  Output JCop specific messages about what the compiler is doing.
     95jcopc  -ctl  myPckg.MyMainClass
     97>  copying
     98>  to  src\jcop\lang
     99>  ..done
     101>  compiling:...src\de\uni_potsdam\hpi\swa\Widget.jcop  ..done
     102>  compiling:jcop\lang\  ..done
     104>  ..done
     105>  compile  and  weave  auxilliary  aspect    bin\jcop\lang\JCopAspect.aj
     106>  ..done
     107>  compiled  in  3723  millis
     111  Loggs layer activation and composition information at runtime.
     112  Example:
     114jcopc  -rtl  myPckg.MyMainClass
     116>  INFO:  accessing  base  method  of  getBMI
     117>  INFO:  accessing  method  getBMI  of  layer  Visualization
     122  Output messages about what the compiler is doing
     125  Print a synopsis of standard options
     128  Output messages about aspect weaving
     131  Print version information.
     133{{{-xml-outline-path  <path>}}}
     134  Generate an outline in XML format (useful for development environments)
     137  Generate an outline in XML format (useful for development environments)
     139==== File Names ====
     140jcopc accepts source files with either the .java extension or the .jcop extension.