Code as Graph

AST (Abstract Syntax Trees)

: 프로그램 코드의 syntactic structure를 그래프로 표현함
: 고수준의 소스코드를 기계코드로 변환시켜줌

  • [Java] javaparser
    • Java 1-15 Parser and Abstract Syntax Tree for Java, including preview features to Java 13
  • [Java] PropertyGraph
    • A library to generate AST, CFG, PDG for Java program
      • JDK version 8+
    • git clone https://github.com/Zanbrachrissik/PropertyGraph
      java -jar PropertyGraph/out/artifacts/PropertyGraph_jar/PropertyGraph.jar -d src -a

CFGs (Control Flow Graphs)

: 코드가 실행되면서 분기되는 것을 그래프로 표현함

  • [Java] PropertyGraph
    • A library to generate AST, CFG, PDG for Java program
      • JDK version 8+
    • git clone https://github.com/Zanbrachrissik/PropertyGraph
      java -jar PropertyGraph/out/artifacts/PropertyGraph_jar/PropertyGraph.jar -d src -c
  • [Java] bytecode-to-cfg
    • Generation of a Control Flow Graph from a java bytecode using ASM
  • [Java] kfg
    • Library for building CFG for Java bytecode
  • [Smali] Smali-CFGs
    • Smali Control Flow Graph's

CPG (Code Property Graph)

:

  • [C/C++/Java/Binary/Javascript/Python/Kotlin] joern
    • Open-source code analysis platform for C/C++/Java/Binary/Javascript/Python/Kotlin based on code property graphs
  • [Java] plume
    • Plume is a code property graph analysis library with options to extract the CPG from Java bytecode and store the result in various graph databases.

DDG (Data Dependence Graph)

:

PDG (Program Dependence Graph)

: data 및 control 의존성을 명시적으로 그래프로 표현함

  • [Java] accrue-bytecode
    • Interprocedural Java byte code analysis framework together with several analyses. Notably includes a multi-threaded points-to analysis (flow-sensitive and flow-insensitive) and a PDG construction analysis.
  • [Java] PropertyGraph
    • A library to generate AST, CFG, PDG for Java program
      • JDK version 8+
    • git clone https://github.com/Zanbrachrissik/PropertyGraph
      java -jar PropertyGraph/out/artifacts/PropertyGraph_jar/PropertyGraph.jar -d src -p
  • [Java] sourcedg
    • System Dependence Graph generation from Java source code
  • [Java] TinyPDG
    • A library for building intraprocedural PDGs for Java programs

'0x50 Machine Learning' 카테고리의 다른 글

dlerror: cudart64_101.dll not found  (1) 2021.08.01
W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found

cuda가 정상적으로 설치 되었음에도 cudart64_101.dll이 없다며 에러가 발생하곤 한다.


nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

심지어 10.2 버전의 cuda를 설치했음에도 cudart64_101.dll 즉 10.1 버전의 dll을 요구한다.


이를 위한 간단한 해결법을 기록해 놓는다.

cuda가 설치된 폴더로 들어가서, cudart64_102.dll 파일을 복사해서 cudart64_101.dll로 저장한다.

  • 윈도우의 경우 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin 에서 확인할 수 있다.

'0x50 Machine Learning' 카테고리의 다른 글

Code as Graph  (0) 2022.09.28

+ Recent posts