Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
3699c6e
Use ScalaFix version 0.5.1.
amato-gianluca Dec 9, 2016
30ade4b
Hacks for fixing widening and narrowing.
amato-gianluca Dec 9, 2016
d8281aa
Replace cappi with sbt-jmh since the latter is better maintained.
amato-gianluca Dec 9, 2016
61e5dec
Do not use withLogRecompileOnMacro in build.sbt.
amato-gianluca Dec 10, 2016
b2c8ae3
Use ScalaFix 0.5.2, which fixes the Kleene solver.
amato-gianluca Dec 11, 2016
1c809d5
Fix narrowing for the sum domain.
amato-gianluca Dec 11, 2016
8c9db1b
Remove useless code.
amato-gianluca Dec 11, 2016
508be70
Fix the tryCompareTo method.
amato-gianluca Dec 11, 2016
ac525f3
Change contract for the narrowing method.
amato-gianluca Dec 11, 2016
fa6b0ab
Improve precision of intersection for the sum domain.
amato-gianluca Dec 11, 2016
14411ad
Fix LTS analyze method and adapt to the new narrowing.
amato-gianluca Dec 11, 2016
a52f95f
Configure output directories when using IntelliJ Idea.
amato-gianluca Dec 12, 2016
ddd156e
Re-organize .gitignore files.
amato-gianluca Dec 12, 2016
dbbc830
Add comparison tool for LTS and EQS.
amato-gianluca Dec 11, 2016
4ef2d15
Replace custom Soot URL with the new 3.0.0-SNAPSHOT
amato-gianluca Apr 19, 2017
ecfa34c
Configure SBT not to update snapshots if one already cached.
amato-gianluca Apr 19, 2017
1773c6b
Small potential performance improvement for ParallelotopeRationalDomain.
amato-gianluca Apr 19, 2017
39cf3c3
Add a new implementation of parallelotopes which do not use the Breeze
amato-gianluca Apr 19, 2017
d43b00a
Remove old Parallelotope domains and all dependencies from Breeze.
amato-gianluca Apr 20, 2017
bcce3bd
Fix mkString for parallelotopes.
amato-gianluca May 31, 2017
3c0e73e
Remove useless code in EQSLegacyFASTComparison.
amato-gianluca Apr 24, 2017
b7414ea
Fix toDot method to work with multiple locations with same label.
amato-gianluca Apr 25, 2017
ed32c3f
Fix URL for Soot repositories.
amato-gianluca Jul 20, 2017
17be1b0
Fix minimize/maximize methods.
amato-gianluca Aug 7, 2017
fad5eb5
Add default widening as the first widening for PPL domains.
amato-gianluca Aug 7, 2017
24e9278
Do not use doubles for coefficients in linear forms.
amato-gianluca Aug 7, 2017
6979141
Fix comments.
amato-gianluca Aug 7, 2017
4555978
Small optimization for widening.
amato-gianluca Aug 7, 2017
30d6a0a
Add support for multiple widenings to PPLDomain.
amato-gianluca Aug 7, 2017
a4b50dd
Add support for narrowing descriptions in abstract domains.
amato-gianluca Aug 7, 2017
4bbb506
Upgrade to ScalaFix 0.6 and support non-default boxes in EQSSolver.
amato-gianluca Aug 7, 2017
f98afd6
Small fixes on widening, narrowing, and their specifications.
amato-gianluca Aug 8, 2017
ee8885f
Update to SBT 1.0 and new plugins.
amato-gianluca Sep 22, 2017
f35432e
Fix FAST benchmarks to work also when Jandom is a packaged jar.
amato-gianluca Sep 23, 2017
85e1b53
Upgrade Scala and library versions.
amato-gianluca Sep 24, 2017
0544770
Fix JandomCLI parameter parsing.
amato-gianluca Sep 24, 2017
9cd6857
Move to Scala 2.12 and remove all warnings.
amato-gianluca Sep 27, 2017
d9ce0bf
Merge remote-tracking branch 'upstream/master' into RemoteRebase
herrBez Nov 12, 2017
ec16280
Add missing dependencies in DomainTransformation
herrBez Nov 12, 2017
f65cffd
Fixed warnings by removing unused imports and changing variables into…
herrBez Nov 12, 2017
b6eb828
Add .travis.yml to allow continuous integration
herrBez Nov 13, 2017
ab5afb5
Fix warnings due to the updated scala version
herrBez Nov 18, 2017
95db44b
Add license notice to each scala file in unipd subfolder
herrBez Dec 30, 2017
8bab800
Split UniPDTest into SVBenchmark and NumericalTestExtra
herrBez Dec 31, 2017
625cb4f
Fix error in BaseNumericalDomain's LinearEvaluation that causes errors
herrBez Jan 2, 2018
4b3b0af
Improve efficiency of compare function of CongruenceDomainCore
herrBez Jan 2, 2018
ae15e3b
First progress in Box Domain
BottCode Mar 8, 2018
d42b1fd
Corretto errori BoxDomainCore
Mar 8, 2018
1b48f6a
Add boxdomain's skeleton and add it to the gui
BottCode Mar 9, 2018
4374cc7
Scheletro BoxDomain
Mar 9, 2018
34bcc44
Implemented linearDisequality for Interval
Mou95 Mar 13, 2018
71f400b
Implemented widening and narrowing BoxDomain
Mou95 Mar 14, 2018
0b84f9b
Improve on LinearInequality
Mou95 Mar 15, 2018
41494f4
Implemented safe sum between Intervals
Mou95 Mar 19, 2018
07c5f1c
Trying to implement infinity
Mou95 Mar 20, 2018
1272d77
Working on Infinity Int
BottCode Mar 20, 2018
bc777b0
still working on Int Infinity
BottCode Mar 20, 2018
383be69
more InfInt method are now defined
BottCode Mar 20, 2018
71c1b81
Now compile
BottCode Mar 21, 2018
7f523b6
BoxDomainCore (maybe) done
BottCode Mar 21, 2018
dec30f1
Print interval implemented
Mou95 Mar 21, 2018
3778d87
some checks on InfInt
BottCode Mar 21, 2018
ffb9e82
conflict resolved
BottCode Mar 21, 2018
254c669
Created java class for testing
Mou95 Mar 21, 2018
d36485d
Added linearInequality
Mou95 Mar 22, 2018
749a146
Add doc and comment to InfInt.scala
BottCode Mar 24, 2018
8bcc0eb
Add doc and comment to BoxDomain
BottCode Mar 24, 2018
150cb6b
Managed undetermined value
Mou95 Mar 26, 2018
2809649
Fixed conflict of merging
Mou95 Mar 26, 2018
ef65902
Creted file for testing
Mou95 Mar 28, 2018
e198237
Test for interval
Mou95 Mar 28, 2018
66bdde3
Fixed test
Mou95 Mar 28, 2018
66f6c7f
Fixed test
Mou95 Mar 28, 2018
15d1170
Fixed test
Mou95 Mar 28, 2018
c78c7f9
Fixed test
Mou95 Mar 28, 2018
b0edd30
canghed behaviour on infinities
BottCode Mar 29, 2018
6682b13
Remove Undetermined and BoundedBoxDomainCore done
BottCode Mar 29, 2018
640a337
First uncomplete version of bounded box domain done
BottCode Mar 29, 2018
cdd50a4
Implemented test BoundedBox
Mou95 Mar 29, 2018
b8cc19f
Fixed test Bounded
Mou95 Mar 29, 2018
d4f1ac3
Fixed BoundedCore
Mou95 Mar 31, 2018
f4b5518
Updated test
Mou95 Apr 4, 2018
f17f6d8
add m,n panel
BottCode Apr 10, 2018
19e8132
print utili
BottCode Apr 10, 2018
ad43d79
Updated values of domains
Mou95 Apr 10, 2018
955e3b6
m and n updatding seems working
BottCode Apr 10, 2018
ad33284
Delete hs_err_pid16436.log
BottCode Apr 10, 2018
8621a2f
Delete hs_err_pid16514.log
BottCode Apr 10, 2018
eea823f
Delete hs_err_pid17258.log
BottCode Apr 10, 2018
6dd3e5b
Update .gitignore
BottCode Apr 10, 2018
b3af707
Added remainder operator and test for it
Mou95 Apr 11, 2018
ca3bf3a
Solved error in linearInequality
Mou95 Apr 11, 2018
857581b
Fixed m > n in bounded box
Mou95 Apr 12, 2018
be077d2
delete useless method
BottCode Apr 14, 2018
6bc9b1f
Risolti conflitti
BottCode Apr 14, 2018
dd18142
removed some useless print
BottCode Apr 14, 2018
65dca72
add a bit of doc
BottCode Apr 14, 2018
d0c5c59
Added test for BoundedBox
Mou95 Apr 22, 2018
2643b01
add other test for BoundedBox
BottCode Apr 22, 2018
85ffa09
conflict solved
BottCode Apr 22, 2018
82499f3
Eliminated useless code
Mou95 Apr 24, 2018
94142a4
Added documentation of methods
Mou95 Apr 25, 2018
b8199fe
Fixed code
Mou95 Apr 28, 2018
8bcbfa1
Fixed test
Mou95 May 16, 2018
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
19 changes: 12 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
*~

# sbt-specific
target/
.project
.cache

# eclipse
.classpath
.worksheet
.history
*.sc
.worksheet/
.settings/
.project
target.eclipse/
.cache-main
.cache-tests
*.sc
*.log
# intellij idea
.idea/
.cache-*

6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: scala
scala:
- 2.12.4

script:
- sbt test
67 changes: 40 additions & 27 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,54 +1,67 @@
import CustomKeys._

//*** Declare projects

val Jandom = project in file("core") enablePlugins(BuildInfoPlugin)
lazy val JandomCore = project in file("core") enablePlugins(BuildInfoPlugin)

lazy val JandomExtended = project in file("extended") dependsOn JandomCore % "compile->compile;test->test"

lazy val Jandom = project in file(".") aggregate (JandomCore, JandomExtended)

//*** This delegates the Jandom run task to execute the run task in the Jandom sub-projects

val JandomExtended = project in file("extended") dependsOn Jandom % "compile->compile;test->test"
aggregate in assembly := false

val root = project in file(".") aggregate (Jandom, JandomExtended)
assembly := (assembly in JandomExtended).value

// This delegates the root run task to the run task in the Jandom project
run := (run in JandomCore in Compile).evaluated

run <<= run in ("Jandom", Compile)
run in Test := (run in JandomCore in Test).evaluated

run in Test <<= run in ("Jandom", Test)
run in Jmh := (run in JandomExtended in Jmh).evaluated

// Add a new benchmark configuration...
// val Bench = config("bench") extend(Test)
// val root = project in file(".") configs(Bench) settings( inConfig(Bench) (Defaults.testSettings):_*) aggregate (Jandom, JandomExtended)
//*** Do not update snapshots every time

updateOptions in ThisBuild := updateOptions.value.withLatestSnapshots(false)

//*** Scala configuration

scalaVersion in ThisBuild := "2.11.8"
scalaVersion in ThisBuild := "2.12.3"

scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature", "-Xlint", "-Xlint:-delayedinit-select", "-Xlint:-missing-interpolator")
scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlint:_,-missing-interpolator", "-Ywarn-unused:-implicits")

fork in ThisBuild := true

//*** Resolvers

resolvers in ThisBuild ++= Seq(
resolvers in ThisBuild ++= Seq (
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
Resolver.sonatypeRepo("snapshots"),
"Soot snapshot" at "https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/",
"Soot release" at
"https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/"
)

//*** Detect PPL
//*** Custom keys

val optionalPPLPathName = try {
val PPLPathName = Process("ppl-config -l").lines.head+"/ppl/ppl_java.jar"
pplJar in ThisBuild := {
try {
val PPLPathName = scala.sys.process.Process("ppl-config -l").lineStream.head+"/ppl/ppl_java.jar"
if (file(PPLPathName).exists) Some(PPLPathName) else None
} catch {
case _ : Exception => None
}
}

gitHeadCommitSHA in ThisBuild := scala.sys.process.Process("git rev-parse HEAD").lineStream.head

//*** Eclipse plugin

pplJar in ThisBuild := optionalPPLPathName
// unfortunately, it is not possible to choose the compiler version with the eclipse plugin.

// for removing warnings when Breeze does not find native libraries
//
// javaOptions in ThisBuild ++= Seq("-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS",
// "-Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK",
// "-Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK")
EclipseKeys.eclipseOutput := Some("target.eclipse")

// Metadata
//*** Metadata for the build

name in ThisBuild := "Jandom"

Expand All @@ -64,20 +77,20 @@ homepage in ThisBuild := Some(url("https://github.com/jandom-devel/Jandom"))

startYear in ThisBuild := Some(2011)

developers := List(
new Developer(
developers in ThisBuild := List(
Developer(
"amato",
"Gianluca Amato", "gianluca.amato@unich.it",
url("http://www.sci.unich.it/~amato/")
),
new Developer(
Developer(
"scozzari",
"Francesca Scozzari", "francesca.scozzari@unich.it",
url("http://www.sci.unich.it/~scozzari/")
)
)

scmInfo := Some(new ScmInfo(
scmInfo in ThisBuild := Some(ScmInfo(
url("https://github.com/jandom-devel/Jandom"),
"scm:git:https://github.com/jandom-devel/Jandom.git",
Some("scm:git:https://github.com/jandom-devel/Jandom.git")
Expand Down
2 changes: 0 additions & 2 deletions core/.gitignore

This file was deleted.

52 changes: 19 additions & 33 deletions core/build.sbt
Original file line number Diff line number Diff line change
@@ -1,53 +1,39 @@
import CustomKeys._

//*** Libraries

libraryDependencies ++= Seq(
"org.apache.commons" % "commons-lang3" % "3.5",
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.3" % "test",
"org.mockito" % "mockito-core" % "2.2.9" % "test",
"org.spire-math" %% "spire" % "0.12.0",
"org.scalanlp" %% "breeze" % "0.12",
"it.unich.scalafix" %% "scalafix" % "0.5.0",
// for using native linear algebra libraries
// "org.scalanlp" %% "breeze-natives" % "0.12",
"org.rogach" %% "scallop" % "2.0.3",
"org.scala-lang.modules" %% "scala-swing" % "1.0.2",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
"org.apache.commons" % "commons-lang3" % "3.6",
"org.scalatest" %% "scalatest" % "3.0.4" % Test,
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.mockito" % "mockito-core" % "2.10.0" % Test,
"org.typelevel" %% "spire" % "0.14.1",
"it.unich.scalafix" %% "scalafix" % "0.7.0-SNAPSHOT",
"org.rogach" %% "scallop" % "3.1.0",
"org.scala-lang.modules" %% "scala-swing" % "2.0.0",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.6",
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
// ASM is included in the Soot Jar
"soot" % "soot" % "2.5.0+git2" from "http://soot-build.cs.uni-paderborn.de/nightly/soot/soot-trunk.jar"
"ca.mcgill.sable" % "soot" %"3.0.0-SNAPSHOT"
)

//*** Additional source directories for PPL

unmanagedJars in Compile ++= (pplJar.value map file).toSeq

unmanagedSourceDirectories in Compile ++= (pplJar.value map { _ => (sourceDirectory in Compile).value / "ppl" }).toSeq

unmanagedSourceDirectories in Test ++= (pplJar.value map { _ => (sourceDirectory in Test).value / "ppl" }).toSeq

//*** Eclipse plugin

EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Managed

EclipseKeys.executionEnvironment := Some(EclipseExecutionEnvironment.JavaSE17)

EclipseKeys.eclipseOutput := Some("target.eclipse")

// It would be nice to be able to exclude resource directories from compilation.

managedSourceDirectories in Test := Seq()
unmanagedJars in Compile ++= (pplJar.value map file).toSeq

managedResourceDirectories in Test := Seq()
//*** BuildInfo plugin

managedResourceDirectories in Compile := Seq()
buildInfoKeys ++= Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, gitHeadCommitSHA)

unmanagedResourceDirectories in Compile := Seq()
buildInfoPackage := "it.unich.jandom"

//*** BuildInfo plugin
//*** IDEA plugin

gitHeadCommitSHA := Process("git rev-parse HEAD").lines.head
ideOutputDirectory in Compile := Some(file("core/target/idea/classes"))

buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, gitHeadCommitSHA)
ideOutputDirectory in Test := Some(file("core/target/idea/test-classes"))

buildInfoPackage := "it.unich.jandom"
Binary file modified core/examples/Java/Congruence.class
Binary file not shown.
31 changes: 29 additions & 2 deletions core/examples/Java/Congruence.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/**
* Copyright 2017 Mirko Bez, Stefano Munari, Sebastiano Valle
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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.
*
* JANDOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of a
* 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 JANDOM. If not, see <http://www.gnu.org/licenses/>.
*/

class Congruence {
static void test() {
static void basic_congruence_add() {
int x = 3;
int y = 12;
if(x < 12)
Expand All @@ -11,7 +26,7 @@ static void test() {
x += 2;
}

static void testCongruence() {
static void basic_congruence_mul() {
int x = 2;
int y = 3;
int z = x*y;
Expand All @@ -20,6 +35,12 @@ static void testCongruence() {
}
}

/**
* Example taken from
* <a href="https://www-apr.lip6.fr/~mine/enseignement/mpri/attic/2013-2014/03b-num-nonrel_ok.pdf">
* this slides of Minè (91/103)
* </a>
*/
static void mineCongruence() {
int x = 0;
int y = 2;
Expand All @@ -32,6 +53,12 @@ static void mineCongruence() {
}
}

/**
* Example taken from
* <a href="https://www-apr.lip6.fr/~mine/enseignement/mpri/attic/2013-2014/03b-num-nonrel_ok.pdf">
* this slides of Minè (96/103)
* </a>
*/
static void mineProductIntervalCongruence() {
int x = 1;
while(x-10 <= 0) {
Expand Down
Binary file added core/examples/Java/NumericalTestExtra.class
Binary file not shown.
58 changes: 58 additions & 0 deletions core/examples/Java/NumericalTestExtra.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* Copyright 2017 Mirko Bez, Stefano Munari, Sebastiano Valle
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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.
*
* JANDOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of a
* 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 JANDOM. If not, see <http://www.gnu.org/licenses/>.
*/

public class NumericalTestExtra {

static void simple_multiplication_test() {
int a = 10;
int b = -2;
int c = 10 + a*b;
}
static void simple_algebra_example() {
int a = 10;
a = -a;
int c = -100 * + a;
}

static void simple_loop_with_exit() {
int a = 0;
while(a <= 0)
a = 1;
}

static void remainder_of_one() {
int x = 1;
x = x % 2;
}

@SuppressWarnings("ALL")
static void filter() {
int a = 2;
a += -12;
if(a < 0)
a++;
else
a--;
}

static void divison_by_zero() {
int x = 0;
int y = 2;
int z = y / x;
}
}
Binary file added core/examples/Java/SvBenchmark.class
Binary file not shown.
52 changes: 52 additions & 0 deletions core/examples/Java/SvBenchmark.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Copyright 2017 Mirko Bez, Stefano Munari, Sebastiano Valle
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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.
*
* JANDOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of a
* 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 JANDOM. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* These examples are a Java-Translation of some C examples taken from the the
* <a href="https://github.com/sosy-lab/sv-benchmarks">sv-benchmark</a>
*/
public class SvBenchmark {
// taken from sv-benchmarks repository
static void sum04_false_unreach_call_true_termination(){
int i = 1;
int sn = 0;
while(i <= 8) {
if (i < 4)
sn = sn + (2);
i = i + 1;
}
// POST CONDITION: sn == 6
}

static void for_infinite_loop_2_true_unreach_call_false_termination() {
int i_U = 0;
int x = 0;
int y = 0;
int n = x*y*i_U + 12*3*x*y;
if(!(n > 0)) {
return;
}
boolean z = true;
for(i_U = 0; z; i_U++) {
x++;
//verifierAssert(!x ? 1 : 0);
}
//UNREACHABLE CODE
x += 12;
}
}
Binary file added core/examples/Java/TestBox.class
Binary file not shown.
Loading