object TAC extends ProjectsAnalysisApplication
Creates the three-address representation for some method(s) and prints it to std out or writes
it to a file.
- Source
- TAC.scala
To convert all files of a project to the AI based three-address code, you can use:
import org.opalj.io.write import org.opalj.util.PerformanceEvaluation.time import org.opalj.tac._ val f = new java.io.File("OPAL/bi/target/scala-2.12/resource_managed/test/ai.jar") val p = org.opalj.br.analyses.Project(f) var i = 0 val errors = time { p.parForeachMethodWithBody(parallelizationLevel=32){ mi => val TACode(code,cfg,ehs,_) = org.opalj.tac.TACAI(p,mi.method)() val tac = ToTxt(code, Some(cfg)) val fileNamePrefix = mi.classFile.thisType.toJava+"."+mi.method.name val file = write(tac, fileNamePrefix, ".tac.txt") i+= 1 println(i+":"+file) } }(t => println("transformation time: "+t.toSeconds)) if(errors.nonEmpty) println(errors.mkString("\n"))
- Alphabetic
- By Inheritance
- TAC
- ProjectsAnalysisApplication
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type ConfigType = TACConfig
- Attributes
- protected
- Definition Classes
- TAC → ProjectsAnalysisApplication
- class TACConfig extends MultiProjectAnalysisConfig with AIBasedCommandLineConfig
- Attributes
- protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def analyze(cp: Iterable[File], analysisConfig: ConfigType, execution: Int): (Project[URL], ReportableAnalysisResult)
- Attributes
- protected
- Definition Classes
- ProjectsAnalysisApplication
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def createConfig(args: Array[String]): TACConfig
- Attributes
- protected
- Definition Classes
- TAC → ProjectsAnalysisApplication
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def evaluate(cp: Iterable[File], analysisConfig: TACConfig, execution: Int): Unit
- Attributes
- protected
- Definition Classes
- TAC → ProjectsAnalysisApplication
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def main(args: Array[String]): Unit
- Definition Classes
- ProjectsAnalysisApplication
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated