Giter VIP home page Giter VIP logo

compiler's Introduction

Getting Started with Boa Development

This document describes how you might set up your development environment to view, edit and test the Boa compiler's source code on your local computer. The Boa infrastructure hosted at http://boa.cs.iastate.edu uses the same code, but that execution would use a Hadoop cluster.

Using Eclipse

  1. Setup your development environment by following the instruction from Development Setup page.
    After following the instructions above, you would have successfully imported the project into your Eclipse IDE. You should also be able to trigger ant builds and edit project source files within your Eclipse installation.

  2. In order to run a Boa program locally, the Boa compiler compiles a Boa program to a Java program and runs the generated Java program using reflection and Hadoop libraries. To enable this within the Eclipse IDE

    1. Create a directory named "compile" in the project's root directory.
    2. From the project's "Properties > Java Build Path", select the "Libraries" tab."
    3. Use "Add External Class Folder" to add newly created directory (compile) in classpath.
    4. After adding the "compile" directory, your "Libraries" tab should look like this:
    5. From "Run > Run Configuration > Java Application" select "Main" tab to create a "Run Configuration" for the BoaEvaluator class. After this step your "Main" tab should look something like this:
    6. Select "Arguments" tab in same window to provide program arguments separated by single space.
      Program arguments include
      1. Path to Boa program
      2. Path of the local dataset
      3. Path of the output directory.
        Your "Arguments" tab should be look like:
    7. Hit apply and Run, this will run your Boa program on local data. Once the program execution completes, your "Console" will look similar to this: Note that depending on your Boa program, the data set, and the capabilities of your local computer the execution may take some time.
    8. Problems with the Boa compiler, and questions regarding Boa programming can be asked at the Boa user forum.

Using IntelliJ IDEA

  1. Setup your development environment by following the instruction from Development Setup page.
    After following the instructions above, you would have successfully imported the project into your Eclipse IDE. You should also be able to trigger ant builds and edit project source files within your Eclipse installation.

  2. In order to run a Boa program locally, the Boa compiler compiles a Boa program to a Java program and runs the generated Java program using reflection and Hadoop libraries. To enable this within the IntelliJ IDE

    1. Create a directory named "compile" in the project's root directory.

    2. From the project's "Properties > Compiler", select the "Dependencies" tab."

    3. Use "+" (available at bottom) to add newly created directory (compile) in classpath.

    4. After adding the "compile" directory, your "Dependencies" tab should look like this:

    5. From "Run > Edit Configuration > Application" select "Configuration" tab to create a "Run Configuration" for the BoaEvaluator class.

    6. In the "Arguments" field in same window, provide program arguments separated by single space.
      Program arguments include

      1. Path to Boa program
      2. Path of the local dataset
      3. Path of the output directory.
        After this step your "Configuration" tab should look something like this: .
    7. Hit apply and Run, this will run your Boa program on local data. Once the program execution completes, your "Console" will look similar to this: Note that depending on your Boa program, the data set, and the capabilities of your local computer the execution may take some time.

    8. Problems with the Boa compiler, and questions regarding Boa programming can be asked at the Boa user forum.

Sample Data Set

A small data set is provided within the Boa repository to test the compiler and your modifications. You can access this data under the "dataset" directory located in the root directory. The organization of this dataset is identical to that used by the Boa infrastructure. A complete Boa dataset consists of 3 files:

  1. index: this is a map file that stores a mapping from project index to the data location in the AST sequence file (see below). For more on the map file format see its documentation.
  2. data: this file stores the abstract syntax tree (AST) of each project as a sequence file. See the documentation for more information on the sequence file format.
  3. projects.seq: this file stores the metadata for each project e.g. commit logs, authors, etc. as a sequence file.

The sample dataset contain only three projects to keep the download size small: Boa, PaniniJ, and Panini.

compiler's People

Contributors

psybers avatar roberthschmidt avatar nguyenhoan avatar hoanisu avatar hridesh avatar cheshianhung avatar ramiowastateuniversity avatar hyjorc1 avatar nbhide avatar ankuraga1508 avatar gupadhyaya avatar sayemimtiaz avatar jingyisu avatar adamhammes avatar johirbuet avatar sarahysh12 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.