Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 28 2020 12:05
    pushed to delors/opal
    Merged in florian_kuebler/readmemarkdown-edited-online-with-bitbuc-1578400042961 (pull request #534) Updated Readme.markdown with deprecation/github migration statement Approved-by: errt <helm@cs.tu-darmstadt.de> (compare)
  • Apr 28 2020 12:05
    pushed to delors/opal
    0 commits
  • Jan 07 2020 12:28
    pushed to delors/opal
    Updated Readme.markdown with deprecation/github migration statement (compare)
  • Oct 10 2019 13:54
    pushed to delors/opal
    A few minor adaptions (compare)
  • Oct 10 2019 13:23
    pushed to delors/opal
    Formatting... (compare)
  • Oct 10 2019 13:16
    pushed to delors/opal
    Measure performace on 5 runs (compare)
  • Oct 07 2019 11:35
    pushed to delors/opal
    Adapt to changes in OPAL implementation (compare)
  • Aug 30 2019 11:52
    pushed to delors/opal
    fixed an issue related to the removal of dependers from a final EPK state (compare)
  • Aug 30 2019 09:09
    pushed to delors/opal
    3 commits
  • Aug 30 2019 09:04
    pushed to delors/opal
    Don't schedule PointsTo Analysis for other CGs (compare)
  • Aug 29 2019 14:32
    pushed to delors/opal
    2 commits
  • Aug 29 2019 14:27
    pushed to delors/opal
    3 commits
  • Aug 29 2019 14:09
    pushed to delors/opal
    2 commits
  • Aug 29 2019 13:36
    pushed to delors/opal
    2 commits
  • Aug 29 2019 13:18
    pushed to delors/opal
    10 commits
  • Aug 29 2019 13:16
    pushed to delors/opal
    More code duplication but should be slightly faster (compare)
  • Aug 29 2019 13:06
    pushed to delors/opal
    Prevent useless partial results (compare)
  • Aug 28 2019 15:04
    pushed to delors/opal
    improved the performance of LongTrieSet by specializing the grow function (compare)
  • Aug 27 2019 13:47
    pushed to delors/opal
    4 commits
  • Aug 27 2019 13:24
    pushed to delors/opal
    Commit just for testing purposes (compare)
Michael Eichberg
@Delors
@bronevet I just tested the newest version of the Docker container found at: https://cloud.docker.com/u/opalj/repository/docker/opalj/sbt_scala_javafx
After configuring docker to allow images to use (at least) 8GB, I started the container using:
docker run -it --rm opalj/sbt_scala_javafx
I then type sbt to start the sbt console changed to the subproject Demos project Demos and started one of the provided Demo programs using run(e.g. 21 - ClassFileInformation).
Everything worked for me very well.
Hence, I would need some more information about the precise steps that you took to make it possible to understand your problem.
Otherwise - you can also just use the template project “MyOPALProject” found overhere: https://bitbucket.org/OPAL-Project/myopalproject as a starting point. It is a preconfigured project that can readily be imported into IntelliJ (it should also work with ATOM/Visual Studio Code with the appropriate Scala plugins/extensions).
bronevet
@bronevet
Thanks, Michael. The step-by-step what I need to type is what I needed, since I've never touched scala and sbt before. I was able to run ClassFileInformation but then I got this error:
[info] Running (fork) org.opalj.br.ClassFileInformation src/main/scala/org/opalj/ai/CipherGetInstanceStringUsage.scala
[info] Usage: java …ClassFileInformation <JAR file containing class files> <Name of classfile (incl. path) contained in the JAR file>+
[info] Example:
[info] java …ClassFileInformation /.../jre/lib/rt.jar java/util/ArrayList.class
[error] Nonzero exit code returned from runner: 255
[error] (Compile / run) Nonzero exit code returned from runner: 255

The sbt docs I've run across seem to assume the scenario where there is a single project and don't explain how I choose a project and provide command line arguments when there are multiple options. I also don't see a way to figure out where the jar file is and run it from the regular command line. How would I do that?

Also, all the demos contain the code of individual analyses. Where is the source code for their driver? Thanks!

bronevet
@bronevet
Ok, I think I figured out the first question:
runMain org.opalj.br.ClassFileInformation /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar java/util/ArrayList.class
Thanks!
Jonas Molina Ramirez
@jomora

Hi @Delors, what do you think about the following topic:
The SimpleTACAI stores results internally in a map [1]. I noticed that this can become a bottleneck if you want to store other large results in addition while the development machine does not have that much RAM. I tested a quick hack where I wrote a NonPersistenceSimpleTACAI which does not store results internally. This worked fine for me. However, I think the approach taken in BaseAI and AI looks more promising. There it's possible to switch certain properties on and off through final constructor params [2]. I thought about preparing a PR with first draft similar to [2]. What do you think?

[1] https://bitbucket.org/delors/opal/src/HEAD/OPAL/ai/src/main/scala/org/opalj/tac/SimpleTACAIKey.scala?at=develop&fileviewer=file-view-default#SimpleTACAIKey.scala-57
[2] https://bitbucket.org/delors/opal/src/HEAD/OPAL/ai/src/main/scala/org/opalj/ai/BaseAI.scala?at=develop&fileviewer=file-view-default#BaseAI.scala-17

Michael Eichberg
@Delors
Hi - I just fixed the SimpleTACIKey - it now consumes considerable less memory to keep the TAC around (you can find the fixes on the FPCFCallGraph branch - which will be merged to the develop branch sooner than later!)
If you don’t need the caching at all, the simples way to just get the TAC for a method is to use the respective key. The class TACAIProvider (currently only found on the FPCFCallGraph branch) shows how to do this (this class has only 10 LOC)
I hope this helps.
Michél Burkhardt
@mb236
Hey everyone, I'm currently trying to implement precise tracking of field values for reference values. Currently, I'm using the putfield method to store the values that get assigned to a field from a certain reference (RefId). One thing I noticed during testing (with my current domain) is that the RefId's are not context-sensitive, meaning that the reference ID's always start at 102 although a reference with ID 104 was passed to the method. Is there a way to configure OPAL to be context-sensitive in this scenario? P.S: I'm using OPAL 1.0.0 because I need to use call graph algorithms
Michael Eichberg
@Delors
@mb236 Welcome to OPAL!
(Before I go to your real question: we will have a new release of OPAL (3.0) very soon, which will have extensive support for call graph construction!)
Michael Eichberg
@Delors
Currently the ids are only used to identify references which must alias; i.e., two references with the same id are guaranteed to refer to the same object (but the opposite is not true; i.e., if two ref ids are not equal, then they can still reference the same object!)
I’m not 100% sure that I fully understand your problem, but I would assume that using the origin information which identifies the allocation site of an object would be easier/more helpful or is this not precise enough in your context?
Michael Eichberg
@Delors
However, a value that had the RefId 104 will get a new unique RefId in the context of the called method and can be identified that way up to the point where mulitple control-flow paths join. However, in case of parameters using the origin information is all that is required to reliable track where the parameter is used (if you mix in the DefUse domain you get the information right away).
Does this help?
Michél Burkhardt
@mb236
@Delors yeah, that definitely helped. I think I know how to solve my problem now. Thanks for the help!
Michael Eichberg
@Delors
You’re welcome.
Jonathan Speth
@JsonScorps
Hey everyone, I recently switched to the develop branch of Opal since my previous one has been merged into it. However, now several imports can no longer be resolved, namely org.opalj.br.fpcf which included CallersProperty for example. Is that path no longer correct or what else might cause this issue ?
Michael Eichberg
@Delors
We moved multiple packages to new subpackage to ensure that we don’t accidentially share a specific package across the different sub projects
In your case the fix is simple:
import org.opalj.br.fpcf.cg
In general the subproject, e.g., br, ai, … is now always part of all names of all classes found in the sub project
As part of this refactoring we also moved the three-address code into the sub project tac. Depending on your usage scenario you may have to update your project dependency.
Jonathan Speth
@JsonScorps
The fix you mentioned is exactly the path I had before that now can no longer be resolved. I did a cleanbuild after switching branches and now again and both times there were five errors reported related to hermes. It also seems that Opal has not been published to my local ivy directory so and older cached version was used by IntelliJ
Michael Eichberg
@Delors
Ah - in this case: delete OPALs ivy folder and do a publishLocal
Furthermore, you most likely have to update your project’s dependencies and have to use the tac project now in case of the abstract interpreation project (ai).
Jonathan Speth
@JsonScorps
Yes, thank you very much! Everything seems to be working now
Jonathan Speth
@JsonScorps
processing of following file failed
Michael Eichberg
@Delors
Thanx - Dominik found and fixed the Bug - the fix can be found in Develop
Jonathan Speth
@JsonScorps
Dominik Helm
@errt
This one should also be fixed now
Alexander Gössl
@majestocx
Hello everybody, we are trying to build an extension for the opal projet. We added the opal dependencies to build.sbt. We also try to start a jetty server using the scalatra plugin. Unfortunately we receive errors when we try to start the jetty server (jetty:start).
More Details can be found here: https://pastebin.com/YkGCa2HE
Seems like the path to the maven repository is wrong.
Thanks and Greetings,
LCO
Patrick Müller
@pmuellerda
The problem is that the project files I supplied to you assumed that there is a published in the snapshot repos, which is not the case. You can build the current develop branch yourself.
Alexander Gössl
@majestocx
@pmuellerda thanks for your answer
chriss456
@chriss456
Hello, i have to ask again. In which format would we get the response for svgs?
Alexander Gössl
@majestocx
Helloy everybody, i want to build a OPAL frontend. OPAL already loaded the Project and i get the TAC and the logs. I am new to Scala and OPAL so i can't implement it. How can i get the call graph and byte code of a class from OPAL?
Michael Eichberg
@Delors
To get the bytecode you can simply ask the project. <project>.classFile(ObjectType(“java/util/List”)).
Please note that you have to use the binary name which seperates the packages using “/“ and not “.”.
If you are interested in the 3-address code, the way how to get it depends on the way how you computed it. In this case, you should simply post the respective code snippet.
Michael Eichberg
@Delors
The simplest way to get the 3-address code is to use the “DefaultTACAIKey”.
val m : Method = …;
val tacAI = <project>.get(DefaultTACAIKey)(m)
You can also find a number of snippets related to common tasks on:[https://bitbucket.org/snippets/delors/]
Florian Kübler
@florian-kuebler

@majestocx Regarding the Call Graph:
Call Graphs in Opal are represented as two distinct properties, handling either the callers of a certain method (org.opalj.br.fpcf.cg.properties.CallersProperty), or for a given call site (method and program counter) the set of potential targets (org.opalj.br.fpcf.cf.properties.Callees).

In order two retrieve these properties for a given Method you have to do the follwing three steps:
1: Build the call graph.

val ps = project.get(PropertyStoreKey)
val manager = project.get(FPCFAnalysesManagerKey)
implicit val declaredMethods = project.get(DeclaredMethodsKey)
manager.runAll(
                RTACallGraphAnalysisScheduler,
                TriggeredStaticInitializerAnalysis,
                TriggeredLoadedClassesAnalysis,
                TriggeredFinalizerAnalysisScheduler,
                TriggeredThreadRelatedCallsAnalysis,
                TriggeredSerializationRelatedCallsAnalysis,
                TriggeredReflectionRelatedCallsAnalysis,
                TriggeredInstantiatedTypesAnalysis,
                TriggeredConfiguredNativeMethodsAnalysis,
                TriggeredSystemPropertiesAnalysis,
                LazyCalleesAnalysis(
                    Set(
                        StandardInvokeCallees,
                        SerializationRelatedCallees,
                        ReflectionRelatedCallees,
                        ThreadRelatedIncompleteCallSites
                    )
                ),
                LazyL0BaseAIAnalysis,
                TACAITransformer
)
  1. “Convert” a method to declared method

    val dm = declaredMethods(method)
  2. Retrieve the callers/callees for that declared method:

    ps(dm, CallersProperty.key /*Callees.key*/)

I have to admit, that this is rather complicated.
Unfortunately, a more elegant way to retrieve the call graph is under development right now, and only available at the feature/CallGraphKey branch.

Alexander Gössl
@majestocx
Ok i have the tacAI Variable how can i get the Text representation of the TAC ?
Alexander Gössl
@majestocx
Is tacAI not applicable on a class?
def getTacForClass(tacForClass : TACForClass) : String = {
val tacAI = project.get(DefaultTACAIKey)
val tacClass = project.allClassFiles.find(_.fqn == tacForClass.fqn).get
tacAI(tacClass);
}