GithubHelp home page GithubHelp logo

ls-nathan-cairns / loopt Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 359 KB

Loop Optimizer - Dependence analysis and simple loop transformations

License: GNU General Public License v3.0

Java 100.00%

loopt's Introduction

Loopt

Loop Optimizer - Dependence analysis and simple loop transformations

Problem Description

In the lectures we have learnt about dependences in loops. For the examples given it was easy to manually determine dependence distances and vectors. Compilers use automatic dependence tests. Study the literature and describe these dependence tests. What are the conditions so that dependences can be determined and how is that done? Consider also techniques based on the polyhedral approach for dependence analysis and dependence modelling.In some cases we can transform a loop with inter-iteration dependences into a loop without such dependences. We saw the example of loop shifting in the lecture. Investigate what loop transformations exist, how they work and when they can be applied. Document that systematically. Implement a dependence test with a number of these loop transformations where you take as input a code snippet (in Java) with a loop and output a transformed loop (in Java). You can use libraries and tools to help you do this.

Running Loopt

Download the latest jar from releases.

Run the Jar from the command line

java -jar Loopt.jar {flags}

Flags

-inFilePath {filepath} - indicates your input will be a path to a file containing a java loop.
-inString {string} - indicates your input will be a raw string representing a java loop.
-outFilePath {filepath} - specifies a file to write your transformed loop to. This is optional if not provided the transformed loop will be printed to the console.

Note: You must provide either the -inFilePath or -inString flag to indicate what kind of input you are passing Loopt.

Input Restrictions

Inputted loops must conform to the following restricitons:

  • Loops must be two dimensional (double nested)
  • Loops must be for loops, with the following format: for (int i = x; i < n; i++)
  • All array accesses must be at most as complex as simple arithmetic. Some valid examples are as follows:
    • A[i][j]
    • A[i + 1][ j - 1]
    • A[i + 8][1]

Test snippets

There are several example loops which can be used as input. These can be found in the TestSnippets folder.

loopt's People

Contributors

eugene-bulog avatar kerwinsun avatar nathan-cairns avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.