Index of /mct/2011-05-09

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[DIR]source/ 2012-03-20 19:09 -  
[DIR]result/ 2012-03-20 19:09 -  
[   ]meaningful.pdf 2012-03-20 19:09 538K 
[   ]mct-Linux.tar.gz 2012-03-20 19:09 107M 
[DIR]cvs/ 2016-09-27 10:58 -  
[DIR]bin.Linux_x86_64/ 2012-03-20 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?


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

Q. How to remove clones in the normalised examples?

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

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

Q. How to count the number of clones removed ?

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