Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 9 commits
  • 6 files changed
  • 0 comments
  • 1 contributor
24 config/j2tvla/j2tvla
... ... @@ -1,24 +0,0 @@
1   -#! /bin/sh
2   -
3   -# Customize these 2 variables!!!
4   -J2TVLA_HOME=~/Development/j2tvla/
5   -JAVA_HOME=/Library/Java/Home
6   -
7   -
8   -SOOT_CLASSES=$J2TVLA_HOME/lib/soot-2.1.0/soot-2.1.0/classes
9   -JASMIN_CLASSES=$J2TVLA_HOME/lib/jasmin-sable-1.2.7/classes
10   -SOOT_ARGS="-app -w -keep-line-number -f jimple"
11   -JAVA_CLASSES=$JAVA_HOME/bundle/Classes/classes.jar
12   -JAVA_JCE=$JAVA_HOME/lib/jce.jar
13   -JAVA_DT=$JAVA_HOME/lib/dt.jar
14   -JAVA_DEPLOY=$JAVA_HOME/lib/deploy.jar
15   -JAVA_WS=$JAVA_HOME/lib/javaws.jar
16   -JAVA_SA_JDI=$JAVA_HOME/lib/sa-jdi.jar
17   -
18   -export CLASSPATH=$CLASSPATH:$J2TVLA_HOME/build:$SOOT_CLASSES:$JASMIN_CLASSES:.:$JAVA_CLASSES:$JAVA_JCE:$JAVA_DT:$JAVA_DEPLOY:$JAVA_WS:$JAVA_SA_JDI
19   -
20   -echo $CLASSPATH
21   -
22   -#java soot.Main
23   -#java j2tvla.Main
24   -java -Dj2tvla.home="$J2TVLA_HOME" j2tvla.Main $SOOT_ARGS $1
23 config/j2tvla/j2tvla_gilles
... ... @@ -0,0 +1,23 @@
  1 +#! /bin/sh
  2 +J2TVLA_HOME=/home/me/Uni.lu/Master/MSemester2/Shape_Analysis/J2TVLA/j2tvla/
  3 +TVLA_HOME=/home/me/Uni.lu/Master/MSemester2/Shape_Analysis/TVLA/tvla-3.0alpha
  4 +J2TVLA_BUILD=/home/me/Uni.lu/Master/MSemester2/Shape_Analysis/J2TVLA/j2tvla/build
  5 +SOOT_CLASSES=/home/me/Uni.lu/Master/MSemester2/Shape_Analysis/J2TVLA/j2tvla/lib/soot-2.1.0/soot-2.1.0/classes
  6 +JASMIN_CLASSES=/home/me/Uni.lu/Master/MSemester2/Shape_Analysis/J2TVLA/j2tvla/lib/jasmin-sable-1.2.7
  7 +JAVA_PATH=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib
  8 +JAVA_JCE=$JAVA_PATH/jce.jar
  9 +
  10 +
  11 +export CLASSPATH=$CLASSPATH:$J2TVLA_BUILD:$SOOT_CLASSES:$JASMIN_CLASSES:.:$JAVA_JCE
  12 +
  13 +SOOT_ARGS="-app -w -keep-line-number -f jimple"
  14 +
  15 +#java soot.Main
  16 +#java j2tvla.Main
  17 +
  18 +path=$(dirname $1)
  19 +filename=$(basename $1)
  20 +filename=${filename%.*}
  21 +
  22 +cd $path
  23 +java -Dj2tvla.home="$J2TVLA_HOME" j2tvla.Main $SOOT_ARGS $filename
7 makefile_gilles
... ... @@ -0,0 +1,7 @@
  1 +j2tvla-all: j2tvla-sorted j2tvla-unsorted
  2 +
  3 +j2tvla-sorted: bin/J2tvlaSorted.class
  4 + cd bin; /home/me/git/prio-queue-shape-analysis/config/j2tvla/j2tvla_gilles J2tvlaSorted
  5 +
  6 +j2tvla-unsorted: bin/J2tvlaUnsorted.class
  7 + cd bin;/home/me/git/prio-queue-shape-analysis/config/j2tvla/j2tvla_gilles J2tvlaUnsorted
47 src/test/SortedTest.java
@@ -85,13 +85,13 @@ public void addOneElement_updatePriority() {
85 85 }
86 86
87 87 @Test
88   - public void enqueueGilles2NegativeElement() {
  88 + public void enqueueGillesNegativeElement() {
89 89 PriorityQueueSorted pq = new PriorityQueueSorted();
90   - assertFalse(pq.enqueueGilles2(-1, 4));
  90 + assertFalse(pq.enqueueGilles(-1, 4));
91 91 }
92 92
93 93 @Test
94   - public void enqueueGilles2Elements1() {
  94 + public void enqueueGillesElements1() {
95 95 PriorityQueueSorted pq = new PriorityQueueSorted();
96 96 QueueElement qe1 = new QueueElement(1, 5);
97 97 QueueElement qe2 = new QueueElement(12, 10);
@@ -102,16 +102,17 @@ public void enqueueGilles2Elements1() {
102 102 qe1.next = qe5;
103 103 qe5.next = qe2;
104 104 qe2.next = qe3;
105   - assertTrue(pq.enqueueGilles2(qe1.data, qe1.priority));
106   - assertTrue(pq.enqueueGilles2(qe2.data, qe2.priority));
107   - assertTrue(pq.enqueueGilles2(qe3.data, qe3.priority));
108   - assertTrue(pq.enqueueGilles2(qe4.data, qe4.priority));
109   - assertTrue(pq.enqueueGilles2(qe5.data, qe5.priority));
  105 + assertTrue(pq.enqueueGilles(qe1.data, qe1.priority));
  106 + assertTrue(pq.enqueueGilles(qe2.data, qe2.priority));
  107 + assertTrue(pq.enqueueGilles(qe3.data, qe3.priority));
  108 + assertTrue(pq.enqueueGilles(qe4.data, qe4.priority));
  109 + assertTrue(pq.enqueueGilles(qe5.data, qe5.priority));
  110 + System.out.println(pq);
110 111 assertListEquals(qe4, pq.head);
111 112 }
112 113
113 114 @Test
114   - public void enqueueGilles2Elements2() {
  115 + public void enqueueGillesElements2() {
115 116 PriorityQueueSorted pq = new PriorityQueueSorted();
116 117 QueueElement qe1 = new QueueElement(1, 5);
117 118 QueueElement qe2 = new QueueElement(3, 10);
@@ -120,15 +121,15 @@ public void enqueueGilles2Elements2() {
120 121 qe4.next = qe1;
121 122 qe1.next = qe2;
122 123 qe2.next = qe3;
123   - assertTrue(pq.enqueueGilles2(qe1.data, qe1.priority));
124   - assertTrue(pq.enqueueGilles2(qe2.data, qe2.priority));
125   - assertTrue(pq.enqueueGilles2(qe3.data, qe3.priority));
126   - assertTrue(pq.enqueueGilles2(qe4.data, qe4.priority));
  124 + assertTrue(pq.enqueueGilles(qe1.data, qe1.priority));
  125 + assertTrue(pq.enqueueGilles(qe2.data, qe2.priority));
  126 + assertTrue(pq.enqueueGilles(qe3.data, qe3.priority));
  127 + assertTrue(pq.enqueueGilles(qe4.data, qe4.priority));
127 128 assertListEquals(qe4, pq.head);
128 129 }
129 130
130 131 @Test
131   - public void enqueueGilles2Elements2update() {
  132 + public void enqueueGillesElements2update() {
132 133 PriorityQueueSorted pq = new PriorityQueueSorted();
133 134 QueueElement qe1 = new QueueElement(1, 5);
134 135 QueueElement qe2 = new QueueElement(3, 10);
@@ -138,24 +139,24 @@ public void enqueueGilles2Elements2update() {
138 139 qe5.next = qe3;
139 140 qe3.next = qe2;
140 141 //qe2.next = qe3;
141   - assertTrue(pq.enqueueGilles2(qe1.data, qe1.priority));
142   - assertTrue(pq.enqueueGilles2(qe2.data, qe2.priority));
143   - assertTrue(pq.enqueueGilles2(qe3.data, qe3.priority));
144   - assertTrue(pq.enqueueGilles2(qe4.data, qe4.priority));
145   - assertTrue(pq.enqueueGilles2(qe5.data, qe5.priority));
146   - System.out.println(pq);
  142 + assertTrue(pq.enqueueGilles(qe1.data, qe1.priority));
  143 + assertTrue(pq.enqueueGilles(qe2.data, qe2.priority));
  144 + assertTrue(pq.enqueueGilles(qe3.data, qe3.priority));
  145 + assertTrue(pq.enqueueGilles(qe4.data, qe4.priority));
  146 + assertTrue(pq.enqueueGilles(qe5.data, qe5.priority));
  147 +
147 148 assertListEquals(qe5, pq.head);
148 149 }
149 150
150 151 @Test
151   - public void enqueueGilles2Sorted_addOneElement_updatePriority() {
  152 + public void enqueueGillesSorted_addOneElement_updatePriority() {
152 153 PriorityQueueSorted pq = new PriorityQueueSorted();
153 154 QueueElement qe1 = new QueueElement(1, 1);
154 155 QueueElement qe2 = new QueueElement(1, 2);
155 156 //qe2 must be the only node in the queue
156 157
157   - assertTrue(pq.enqueueGilles2(qe1.data, qe1.priority));
158   - assertTrue(pq.enqueueGilles2(qe2.data, qe2.priority));
  158 + assertTrue(pq.enqueueGilles(qe1.data, qe1.priority));
  159 + assertTrue(pq.enqueueGilles(qe2.data, qe2.priority));
159 160 assertEquals(qe2, pq.head);
160 161 }
161 162
1  tvla/unsorted/actions.tvp
@@ -50,6 +50,7 @@
50 50 r[n,z](v) = r[n,z](v)
51 51 }
52 52 is[n](v) = is[n](v)
  53 + newElement(v) = isNew(v)
53 54 }
54 55 }
55 56
5 tvla/unsorted/predicates.tvp
@@ -38,6 +38,5 @@ foreach (z in PVar) {
38 38 }
39 39
40 40
41   -// getHead
42   -
43   -//%p head(v) function acyclic
  41 +//new predicates
  42 +%p newElement(v)

No commit comments for this range

Something went wrong with that request. Please try again.