Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme #75

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
656 changes: 625 additions & 31 deletions README.md

Large diffs are not rendered by default.

45 changes: 0 additions & 45 deletions Readme

This file was deleted.

48 changes: 48 additions & 0 deletions src/examples/Example.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (C) 2022 Franck van Breugel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/**
* A simple example.
*
* @author Franck van Breugel
*/
public class Example {

/**
* Returns the minimum of the given integers.
*
* @param x an integer
* @param y an integer
* @return the minimum of x and y
*/
private static int min(int x, int y) {
if (x > y) {
// swap x and y
x = x + y;
y = x - y;
x = x - y;
}
if (x > y) {
assert false;
}
return x;
}

public static void main(String[] args) {
Example.min(0, 1);
}
}
55 changes: 55 additions & 0 deletions src/examples/ExampleCVC3.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Before running this example, link dynamic/shared library files for CVC3
#
# Windows (64-bit)
# The dynamic library files for CVC3 for Windows 64-bit machines are not readily available.
# As a result, this example cannot be run on Windows 64-bit machines.
#
# Linux (64-bit)
# To link the 64-bit shared library files, add the path /path/to/lib/64bit/subdirectory/of/jpf-symbc/
# to the LD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export LD_LIBRARY_PATH=/path/to/lib/64bit/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv LD_LIBRARY_PATH /path/to/lib/64bit/subdirectory/of/jpf-symbc/
#
# macOS (64-bit)
# To link the 64-bit shared library files, add the path /path/to/lib/64bit/subdirectory/of/jpf-symbc/
# to the DYLD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export DYLD_LIBRARY_PATH=/path/to/lib/64bit/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv DYLD_LIBRARY_PATH /path/to/lib/64bit/subdirectory/of/jpf-symbc/
#
# Windows (32-bit)
# To link the 32-bit dynamic library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the PATH environment variable.
#
# Linux (32-bit)
# To link the 32-bit shared library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the LD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export LD_LIBRARY_PATH=/path/to/lib/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv LD_LIBRARY_PATH /path/to/lib/subdirectory/of/jpf-symbc/
#
# macOS (32-bit)
# To link the 32-bit shared library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the DYLD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export DYLD_LIBRARY_PATH=/path/to/lib/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv DYLD_LIBRARY_PATH /path/to/lib/subdirectory/of/jpf-symbc/

# fully qualified name of the Java app
target = Example

# path to the bytecode of the target (and classes used by the target)
classpath = ${jpf-symbc}/build/examples

# path to the Java code of the target (and classes used by the target)
sourcepath = ${jpf-symbc}/src/examples

# method and its parameters
symbolic.method = Example.min(sym#sym)

# solver used
symbolic.dp = cvc3

# listener that generates JUnit test cases
listener = gov.nasa.jpf.symbc.sequences.SymbolicSequenceListener
17 changes: 17 additions & 0 deletions src/examples/ExampleChoco.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fully qualified name of the Java app
target = Example

# path to the bytecode of the target (and classes used by the target)
classpath = ${jpf-symbc}/build/examples

# path to the Java code of the target (and classes used by the target)
sourcepath = ${jpf-symbc}/src/examples

# method and its parameters
symbolic.method = Example.min(sym#sym)

# solver used (default)
symbolic.dp = choco

# listener that generates JUnit test cases
listener = gov.nasa.jpf.symbc.sequences.SymbolicSequenceListener
17 changes: 17 additions & 0 deletions src/examples/ExampleCoral.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fully qualified name of the Java app
target = Example

# path to the bytecode of the target (and classes used by the target)
classpath = ${jpf-symbc}/build/examples

# path to the Java code of the target (and classes used by the target)
sourcepath = ${jpf-symbc}/src/examples

# method and its parameters
symbolic.method = Example.min(sym#sym)

# solver used
symbolic.dp = coral

# listener that generates JUnit test cases
listener = gov.nasa.jpf.symbc.sequences.SymbolicSequenceListener
17 changes: 17 additions & 0 deletions src/examples/ExampleIASolver.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fully qualified name of the Java app
target = Example

# path to the bytecode of the target (and classes used by the target)
classpath = ${jpf-symbc}/build/examples

# path to the Java code of the target (and classes used by the target)
sourcepath = ${jpf-symbc}/src/examples

# method and its parameters
symbolic.method = Example.min(sym#sym)

# solver used
symbolic.dp = iasolver

# listener that generates JUnit test cases
listener = gov.nasa.jpf.symbc.sequences.SymbolicSequenceListener
38 changes: 38 additions & 0 deletions src/examples/ExampleZ3.jpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Before running this example, link dynamic/shared library files for Z3
#
# Windows (64-bit)
# To link the dynamic library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the PATH environment variable. For example, in a Windows 10 PowerShell issue following command.
# $Env:PATH = "/path/to/lib/subdirectory/of/jpf-symbc/;" + $Env:PATH
#
# Linux (64-bit)
# To link the shared library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the LD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export LD_LIBRARY_PATH=/path/to/lib/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv LD_LIBRARY_PATH /path/to/lib/subdirectory/of/jpf-symbc/
#
# macOS (64-bit)
# To link the shared library files, add the path /path/to/lib/subdirectory/of/jpf-symbc/
# to the DYLD_LIBRARY_PATH environment variable. For example, in a Linux sh issue the following command.
# export DYLD_LIBRARY_PATH=/path/to/lib/subdirectory/of/jpf-symbc/
# In a Linux csh issue the following command.
# setenv DYLD_LIBRARY_PATH /path/to/lib/subdirectory/of/jpf-symbc/

# fully qualified name of the Java app
target = Example

# path to the bytecode of the target (and classes used by the target)
classpath = ${jpf-symbc}/build/examples

# path to the Java code of the target (and classes used by the target)
sourcepath = ${jpf-symbc}/src/examples

# method and its parameters
symbolic.method = Example.min(sym#sym)

# solver used
symbolic.dp = z3

# listener that generates JUnit test cases
listener = gov.nasa.jpf.symbc.sequences.SymbolicSequenceListener