Comments (6)
Hello Khaled,
thank you for your reply. I finally managed to execute the SLicer4J by using the python script. Also, runBenchmarks.py
works now (except for the 3 projects that are actually not in the repo but I assume rather some sort of symlink to the project).
It seems like my mistake was to rename the top level directories DymanicSlicingCore
and Slicer4J
. Pulling the newest changes, restoring the folder structure as described in your post and rebuilding everything fixed the issues.
Thank you for your hints. I'll be sure to cite you correctly if I'm able to integrate this tool into my project.
from slicer4j.
A further try of executing the benchmarks with python3 run_benchmarks.py
yielded the following output:
====================
Benchmark: javaslicer-bench1-intra-procedural
********************
Original exec time (s): 0.08215594291687012
********************
Running Slicer4J
Instrumentation time (s): 0.5224616527557373
Error: Main class Bench could not be found or loaded
Caused by: java.lang.ClassNotFoundException: Bench
Execution time (s): 0.06292152404785156
Traceback (most recent call last):
File "/home/lukas/workspace/master-jsr/slicer/slicer4j/benchmarks/run_benchmarks.py", line 178, in <module>
run_slicer4j(project, jar_name, project_arg, "", "", "")
File "/home/lukas/workspace/master-jsr/slicer/slicer4j/benchmarks/run_benchmarks.py", line 132, in run_slicer4j
line = sc.split(", ")[0]
AttributeError: 'NoneType' object has no attribute 'split'
from slicer4j.
Hi, I think that you are trying to run the slicer on Windows.
The script was made for running on Linux, so you have to change ":" by ";" in Java commands.
On the other hand you have to replace the cat and grep invocations for reading log information.
Fortunately, I did this. So I'm attaching another script, for windows,
Regards.
from slicer4j.
Hi, thanks for the advice. I only tried running the slicer on Linux (ArchLinux), though.
from slicer4j.
Right, I thought you were on Windows because I had the same error before.
from slicer4j.
Hi Lukas, thank you for considering using Slicer4J in your work!
java -cp "../../Slicer4J/target/slicer4j-jar-with-dependencies.jar:Slicer4J/target/lib/*" ca.ubc.ece.resess.slicer.dynamic.slicer4j.Slicer -h
For this command, the JVM cannot find the soot.Type class because the class path is not written properly. It should be like this if you are running from SliceMe folder:
java -cp "../../Slicer4J/target/slicer4j-jar-with-dependencies.jar:../../Slicer4J/target/lib/*" ca.ubc.ece.resess.slicer.dynamic.slicer4j.Slicer -h
or this if you run from the main Slicer4J directory
java -cp "Slicer4J/target/slicer4j-jar-with-dependencies.jar:Slicer4J/target/lib/*" ca.ubc.ece.resess.slicer.dynamic.slicer4j.Slicer -h
As for the script not working, I suspect the instrumentation didn't work for some reason, it could be related to the location of installation of DynamicSlicingCore, as the script refers to that location to fetch the classes to be injected in the instrumented JAR. The DynamicSlicingCore should be installed in the parent directory of Slicer4J:
| - DynamicSlicingCore
| |----- core
| |----- DynamicSlicingLoggingClasses
| - Slicer4J
| |-----Slicer4J
| |-----scripts
. . .
Please let me know if that's your directory structure and the script is still not working.
from slicer4j.
Related Issues (20)
- Declaring, modifying, and using class fields HOT 1
- toString() methods and data classes. HOT 1
- Question: Can Slicer4J run on the whole test suite? HOT 1
- Missing .gitmodules file HOT 2
- Library classes in jar are thrown out during instrumentation HOT 2
- Code instumentation errors HOT 3
- Can I use Slicer4J on jdk 1.8 version? HOT 2
- Instrumentation failure, Resolved Field is Null HOT 4
- defects4j HOT 1
- exception in java -cp "Slicer4J/target/slicer4j-jar-with-dependencies.jar:Slicer4J/target/lib/*" ca.ubc.ece.resess.slicer.dynamic.slicer4j.Slicer -h HOT 2
- python3 run_benchmarks.py does not find javaslicer HOT 1
- does not find line number if the slicing criterion is in the test class HOT 1
- having trouble understanding JacksonCore_4b benchmark slicing criterion HOT 8
- Java version clarification
- Could not find or load main class SliceMe, MavenReportException: Error while generating Javadoc. HOT 2
- False positives by Slicer4J
- False negatives by Slicer4J
- Analyze .jar file that does not contain line number HOT 3
- Soot-Infoflow library HOT 2
- Some missing lines on Voronoi HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slicer4j.