Index of /mct/2011-05-09

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -
[DIR]bin.Linux_x86_64/20-Mar-2012 19:09 -
[DIR]cvs/27-Sep-2016 10:58 -
[   ]mct-Linux.tar.gz20-Mar-2012 19:09 107M
[   ]meaningful.pdf20-Mar-2012 19:09 538K
[DIR]result/20-Mar-2012 19:09 -
[DIR]source/20-Mar-2012 19:09 -

Frequently asked questions


Q. What are in the folder?

bin.* -- binaries

source -- source examples
  source/norm -- user-defined normalisations
  source/java -- Java program examples
  source/v -- Verilog examples

result -- result of normalisations
  result/norm -- normalisations transformed 
  result/java -- normalised Java program examples
  result/verilog2 -- normalised Verilog examples
  result/v -- unparsed Verilog examples
  grammar.txt -- the size related to the grammar transformations
  jhotdraw.txt -- the size related to the jhotdraw experiments
  gmf.txt -- the size related to the gmf experiments

cvs -- experiments on analysing the CVS of java projects
  cvs/uart16650 -- UArt 16650 (Verilog)
  cvs/jhotdraw -- JHotDraw (Java)
  cvs/gmf -- GMF (Java)

Q. How to define annotations?

Given a TXL grammar, enter the following annotations in the end of any
non-terminal rule [...]:

  ... [kept] [ordered by X] [ignored when Y] [preferred with Z]

where X is an optional user-defined ordering rule, Y is an optional
user-defined selection rule, and Z is one to many literal constants
to be used to replace the term.

Q. How to generate normalisation transformations from the annotations? 

First apply the `normc' to create the normalisation tools, e.g.,

> bin.*/mct source/norm/api_clone_java.norm -o result/norm/api_clone_java.norm
> bin.*/mct source/norm/verilog2.norm -o result/norm/verilog2.norm

Then apply the following commands to generate the binary tools:

> bin.*/txlc result/norm/api_clone_java.norm -o bin.*/api_clone_javac
> bin.*/txlc result/norm/verilog2.norm -o bin.*/verilog2c

Q. How to normalise the examples?

E.g.,

> bin.*/api_clone_javac source/java/HelloWorld.java -o result/java/HelloWorld.java
> bin.*/api_clone_javac source/java/HelloWorld-2.java -o result/java/HelloWorld-2.java

Q. How to remove clones in the normalised examples?

Either use the original sources, e.g.,
> bin.*/api_clone_javac source/java/HelloWorld.java -diff source/java/HelloWorld-2.java 

or use the normalised source:
> bin.*/api_clone_javac result/java/HelloWorld.java -diff result/java/HelloWorld-2.java 

Q. How to count the number of clones removed ?

Turn on the -attr option, e.g.,
> bin.*/api_clone_javac -attr source/java/HelloWorld.java -diff source/java/HelloWorld-2.java