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
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);
}
Florian Kübler
@florian-kuebler
No the TAC is a function from Method to TACode
Alexander Gössl
@majestocx
ok is there a way to get from a class to tac in txt format ?
Michael Eichberg
@Delors
Yes… you can use the ToTxt class which provides a respective function.
For a concrete usage of that class see “org.opalj.tac.TAC”.
The latter class also provides a command-line interface to get the TAC of a specific method.
 val aiResult = BaseAI(m, d)
                        val tac @ TACode(params, code, _, cfg, ehs, _) =
                            TACAI(m, project.classHierarchy, aiResult)(Nil)
                        if (toString) Console.out.println(m.toJava(tac.toString))

                        (
                            ToTxt(params, code, cfg, skipParams = false, true, true).mkString("\n”),
does this help?
Alexander Gössl
@majestocx
yes
thank you
Alexander Gössl
@majestocx
I have another question: Is the fqn of a class like this: org.opalj.tac.TAC ok like this: org/opalj/tac/TAC or none of it?
Michael Eichberg
@Delors
The latter - if you want the first variant call „toJava“
Michael Eichberg
@Delors
To get a specific class file belonging to a project use project.classFile(ObjectType(<Name of class in fqn>)). This is a constant operation; using find is linear operation!
kebiro
@kebiro

Hello,

we had a little chat about this before: there is possibly a bug in OPAL regarding an escaping backslash. It seems to escape them before outputting the text. I'll provide an example.

image.png
This is the original string in String.java
In String.classit looks like this:
image.png
Alexander Gössl
@majestocx
ok i got my method working thanks all for your help!
kebiro
@kebiro
However, the TAC output looks like this:
image.png
There is only a single backslash left, hence the following " is escaped, so until another " appears everything will be seen as a string.
Michael Eichberg
@Delors
Yep
Alexander Gössl
@majestocx
Ok im working on this again so i have some more questions.
I try to use the MethodDescriptor object like this: MethodDescriptor("(): void").
I get this exception:
[info] java.lang.IllegalArgumentException: : void is not a valid field type descriptor
[info] at org.opalj.br.FieldType$.apply(Type.scala:361)
[info] at org.opalj.br.ReturnType$.apply(Type.scala:278)
[info] at org.opalj.br.MethodDescriptor$.apply(MethodDescriptor.scala:667)
Is my argument wrong?
I also tried this: MethodDescriptor("(java.lang.String[]): void") but i get java.lang.IllegalArgumentException: j is not a valid field type descriptor