GithubHelp home page GithubHelp logo

chubbymaggie / java-semantics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kframework/java-semantics

0.0 3.0 0.0 45.11 MB

The semantics of Java in K

Java 34.92% Shell 0.57% Tcl 21.64% C++ 0.61% C 10.19% PostScript 0.32% Batchfile 0.26% OpenEdge ABL 0.32% JavaScript 17.39% Haskell 12.81% Jasmin 0.80% TeX 0.15%

java-semantics's Introduction

For User: Installation, Compile, Run and Test

In order to use Java Semantics you need the following prerequisites:

Installation process:

$ cd ~
$ git clone --depth=1 https://github.com/kframework/java-semantics.git
$ chmod +x java-semantics/tools/*
$ export PATH=$PATH:~/java-semantics/tools

Before executing programs, you need to compile java-semantics first:

$ cd java-semantics/src
$ kjkompile.sh

Now you can execute programs bundled with the semantics:

$ kjrun.sh ../tests/01_smoke_tests/helloWorld.java

Now you can test the execution of multiple programs at once using bundled tool kjtest.

$ kjtest.sh --t1 ../tests/01_smoke_tests/

This tool executes each program in the given directory with both Java Semantics and JDK and compares the results. Testing result is summarized in test-results.xml.

For Developer: Kompile and Krun

Instead of using kjkompile.sh and krun.sh, developers want to interact with kompile and krun directly.

Kompile:

$ cd java-semantics/src
$ kompile -v --debug -d exec exec/java-exec.k 
$ kompile -v --debug -d prep prep/java-prep.k

Krun: To debug prep semantics:

$ krun --directory "/home/java-semantics/src/prep" --parser "kj-parse-aggreg.sh" --symbolic-execution ../tests/01_smoke_tests/helloWorld.java

To debug exec semantics (once you have correct pkast file):

$ krun --directory "/home/java-semantics/src/exec" -cMainClass="ListItem(\"helloWorld\")" -cDissolveAllExceptOut="true" --parser "cat" --symbolic-execution helloWorld.java.pkast

Other docs

Directory docs contains two technical reports: the complete documented semantics of module METHOD_INVOKE and the documentation of the main rule for new instance creation with all the prerequisites.

POPL 15' : K-Java: A Complete Semantics of Java

http://fsl.cs.illinois.edu/index.php/K-Java:_A_Complete_Semantics_of_Java

java-semantics's People

Contributors

denis-bogdanas avatar laurayuwen avatar xiaohe27 avatar daejunpark avatar andreiarusoaie avatar

Watchers

James Cloos 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.