Skip to content

Commit a18df0c

Browse files
committed
A8
1 parent 77529dd commit a18df0c

File tree

22 files changed

+1061
-247
lines changed

22 files changed

+1061
-247
lines changed

A6/tai-e/plan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
options: {}
33
- id: cspta
44
options:
5-
cs: ci
5+
cs: 2-call
66
merge-string-constants: false
77
merge-string-objects: false
88
merge-string-builders: false

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_1CallSelector.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,18 @@ public Context getEmptyContext() {
4242

4343
@Override
4444
public Context selectContext(CSCallSite csCallSite, JMethod callee) {
45-
// TODO - finish me
4645
var callSite = csCallSite.getCallSite();
4746
return ListContext.make(callSite);
4847
}
4948

5049
@Override
5150
public Context selectContext(CSCallSite csCallSite, CSObj recv, JMethod callee) {
52-
// TODO - finish me
5351
var callSite = csCallSite.getCallSite();
5452
return ListContext.make(callSite);
5553
}
5654

5755
@Override
5856
public Context selectHeapContext(CSMethod method, Obj obj) {
59-
// TODO - finish me
6057
return getEmptyContext();
6158
}
6259
}

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_1ObjSelector.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,17 @@ public Context getEmptyContext() {
4242

4343
@Override
4444
public Context selectContext(CSCallSite callSite, JMethod callee) {
45-
// TODO - finish me
4645
return callSite.getContext();
4746
}
4847

4948
@Override
5049
public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
51-
// TODO - finish me
5250
var obj = recv.getObject();
5351
return ListContext.make(obj);
5452
}
5553

5654
@Override
5755
public Context selectHeapContext(CSMethod method, Obj obj) {
58-
// TODO - finish me
5956
return getEmptyContext();
6057
}
6158
}

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_1TypeSelector.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,18 @@ public Context getEmptyContext() {
4242

4343
@Override
4444
public Context selectContext(CSCallSite callSite, JMethod callee) {
45-
// TODO - finish me
4645
return getEmptyContext();
4746
}
4847

4948
@Override
5049
public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
51-
// TODO - finish me
5250
var obj = recv.getObject();
5351
var type = obj.getContainerType();
5452
return ListContext.make(type);
5553
}
5654

5755
@Override
5856
public Context selectHeapContext(CSMethod method, Obj obj) {
59-
// TODO - finish me
6057
return getEmptyContext();
6158
}
6259
}

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_2CallSelector.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public Context getEmptyContext() {
4343

4444
@Override
4545
public Context selectContext(CSCallSite callSite, JMethod callee) {
46-
// TODO - finish me
4746
var context = callSite.getContext();
4847
if (context.getLength() > 0) {
4948
int lastIndex = context.getLength() - 1;
@@ -55,13 +54,11 @@ public Context selectContext(CSCallSite callSite, JMethod callee) {
5554

5655
@Override
5756
public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
58-
// TODO - finish me
5957
return selectContext(callSite, callee);
6058
}
6159

6260
@Override
6361
public Context selectHeapContext(CSMethod method, Obj obj) {
64-
// TODO - finish me
6562
var context = method.getContext();
6663
if (context.getLength() > 1) {
6764
int lastIndex = context.getLength() - 1;

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_2ObjSelector.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ public Context getEmptyContext() {
4242

4343
@Override
4444
public Context selectContext(CSCallSite callSite, JMethod callee) {
45-
// TODO - finish me
4645
return callSite.getContext();
4746
}
4847

4948
@Override
5049
public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
51-
// TODO - finish me
52-
var context = callSite.getContext();
50+
var context = recv.getContext();
5351
int length = context.getLength();
5452
if (length > 0) {
5553
int lastIndex = length - 1;
@@ -61,7 +59,6 @@ public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
6159

6260
@Override
6361
public Context selectHeapContext(CSMethod method, Obj obj) {
64-
// TODO - finish me
6562
var context = method.getContext();
6663
int length = context.getLength();
6764
if (length > 1) {
@@ -71,4 +68,4 @@ public Context selectHeapContext(CSMethod method, Obj obj) {
7168
}
7269
return context;
7370
}
74-
}
71+
}

A6/tai-e/src/main/java/pascal/taie/analysis/pta/core/cs/selector/_2TypeSelector.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ public Context getEmptyContext() {
4343

4444
@Override
4545
public Context selectContext(CSCallSite callSite, JMethod callee) {
46-
// TODO - finish me
4746
return callSite.getContext();
4847
}
4948

5049
@Override
5150
public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
52-
// TODO - finish me
5351
var context = recv.getContext();
5452
int length = context.getLength();
5553
var type = recv.getObject().getContainerType();
@@ -63,7 +61,6 @@ public Context selectContext(CSCallSite callSite, CSObj recv, JMethod callee) {
6361

6462
@Override
6563
public Context selectHeapContext(CSMethod method, Obj obj) {
66-
// TODO - finish me
6764
Context context = method.getContext();
6865
int length = context.getLength();
6966
if(length > 1){

0 commit comments

Comments
 (0)