Giter Site home page Giter Site logo

gjpf-core's Introduction

Hex.pm Build Status Coverage Status HuBoard badge Join the chat at https://gitter.im/grzesuav/gjpf-core Coverity Scan Build Status codecov.io Codacy Badge

This is fork of Java Path Finder project (which is one-to-one mirrored here).

Main reasons/motivation:

  • desire to contribute in some OS project
  • experiment with new language features/libraries
  • maybe contribute some changes to original JPF.

Currently:

  • setup of Travis CI build was configured
  • develop branch was created
  • coverity-scan branch was created and coverity static analysis scan was attached (see branch coverity-scan to see results)
  • coveralls.io was configured, coverage result are reported on badge
  • gradle is almost done, need to finalize work
  • documentation was modified, so now its fully navigable from github, click here
  • merged latest Peter changes from babelfish repo (up to 25. commit, from 22 april 15)
  • (in progress) preparing example maven/distribution repo on bintray as POC for gradle build

#Gradle project layout It was difficult to balance between old layout, which is required by program way of work (directory layout, files location etc.). Main change is project modularization, which reflects present of multiple source directories in ant structure. I have temporarily removed some IDE-related directories (netbeans and eclipse) to keep basic layout simpler, need to consider in which form restore them.

Build

In project Gradle wrapper in version 3.1 is used. You do not need to install it by yourself, Gradle will be install via wrapper. To check which tasks are accessible type './gradlew tasks' in root project directory (where 'build.gradle' and 'setting.gradle' are placed). To build project type ./gradlew build or ./gradlew clean build, it will:

  • clean (in case when this target was called)
  • compile each module, examples and tests
  • make jars necessary to properly run tests
  • test project with coverage (reports are located in build/reports)
  • make distribution packages (tar and zip) placed in build/

Distribution packages are identical as ant-make dist package.

Repository artifact

This is main goal of gradle-switch. After typing gradle install each of submodule will be deployed in local maven repository and accessible from it. In other words, if you have some maven/gradle/other project managed by any dependency management system, you can refer to this modules by:

  • GroupId:artifactId:version (actual format depends on build system)

Group id is :

  • gov.nas.jpf.jpf-core

artifacts id's are :

  • annotations
  • classes
  • main
  • peers

Current version is set to 0.1. So, if you want to use annotations module, here is maven example:

    <dependency>
        <groupId>gov.nasa.jpf.jpf-core</groupId>
        <artifactId>annotations</artifactId>
        <version>0.1</version>
    </dependency>

In future probably release artifacts will be deployed on public maven repo (or something similar), so in order to write extension/software depending on jpf, there will be no reason to download and build jpf manually (well, except that run it, of course).

Importing to eclipse

Prerequisites

At first, you need a local copy of this repo, which can be obtained :

  • from command line : git clone https://github.com/grzesuav/gjpf-core.git
  • import using eclipse wizard

Importing using eclipse import wizard:

  • select File -> Import -> Git -> Project from Git and click next
  • select Create from uri and click next
  • paste into URI: https://github.com/grzesuav/gjpf-core.git and click next
  • select at least develop branch and click next
  • select desired location and click next
  • wait until repository will be cloned and don't import any project, quit wizard

Importing Gradle project to eclipse using Gradle import wizard :

  • select File -> Import -> Gradle -> Gradle Project and click next
  • point to location where repository was cloned (also include gjpf-core directory) and click Build Model
  • select all project visible in tree and click finish (leave all options as is)
  • wait until project will be imported (could take a while)
  • unfortunately, default eclipse output folder (for compiled classes and other resources) is $PROJECT_DIR/bin, which conflicts with jpf project layout. To change it, for every project (besides root gjpf-core) do the following : Right click on project name, select Properties -> Java Build Path, go into Source tab, and on the bottom there is Default output folder. Change it to $PROJECT_DIR/build.
  • for root project gjpf-core eclipse project layout must be changed to fit jpf structure. To do it, right click on project name, select Properties -> Java Build Path, go into Source tab, and on the bottom there is Default output folder. As Default output folder set build/default. Next select checkbox Allow output folders for source folders and for source folders above change Output folder (expand each source folder to see this) to build/examples and build/testsrespectively.
  • problem regarding non-existing test dependency (RunJPF.jar) will be resolved by building this jar, to do this, right click on project gjpf-core and select Gradle -> Tasks Quick Launcher and type test. It will build all required jars ad run tests.

To be done

  • discuss with jpf developers project layout/get some feedback
  • put info about importing project to eclipse (and ask what IDEs developers are using)

gjpf-core's People

Contributors

chabapok avatar gitter-badger avatar grzesuav avatar ksutka avatar nas-sh avatar paulfrancoisjeau avatar pcmehlitz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gjpf-core's Issues

Set up project with dependency management

Ant build and project layout in current form does not fit for usability. Need to migrate.
Proposal :

  • maven
  • gradle
  • grape (need to recognize)
  • buildr (need to recognize)
  • sbt (need to recognize)

Fix tests

Currently test does not pass, error during run. Probably set up problem.

StackFrame.dup2_x1 don't work for stack with two values

According to spec (https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.dup2_x1)
dup2_x1 have two possible outcomes:
If they are three values on stack (A B C) it will duplicate top two values and insert them three values down (B C A B C) - this case work.
But if they are two values on stack (A B) it should duplicate top value (B) and insert it two values down : (B A B) - this case throws java.lang.ArrayIndexOutOfBoundsException: -1 in https://github.com/grzesuav/gjpf-core/blob/master/main/src/main/java/gov/nasa/jpf/vm/StackFrame.java#L1451

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.