Type-Safe Java Program Adaptation Language
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9779ee1 Sep 16, 2014
Failed to load latest commit information.
UpdateLanguage v2 start Jul 3, 2014
docs/pepm-15 TR updated Sep 16, 2014
README.md v0.61 Jun 8, 2014


This is an implementation of SWIN adaptation framework based on polyglot-1.3.5 with JL5 extension.


To build the project, make sure you have java and ant.

    ~:rm bin/jlc bin/pth
    ~:ant jl
    ~:ant update


To run a example, you need two inputs:

    1. SWINCode.sw
    2. input source code
  1. SWINCode.sw (This is the SWIN program you wish to transform Java code)

    The syntax of SWIN is defined as:

    {(x:A->>B) [x.f():C -> x.g():D]}

    e.g. { (x:Vector->>ArrayList) [x.elements():Enumeration -> x.iterator():Iterator] }

  2. Input source code

    The input source file should have a suffix of .update, e.g.


To run a test case, use ./test in the base directory. e.g.

    ./test yourmatchinfo APIList.api input1.update input2.update input3.update .......

1.input1.update specifies the file path you wish to update. 2.APIList specifies which files in the input are APIs (which need not to be transformed). 3.And yourmatchinfo specifies the path for your SWIN program.


The output will be displayed in the output directory.