Skip to content

NKU-EmbeddedSystem/Prism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism: Decomposing Program Semantics for Code Clone Detection through Compilation (2024 ICSE)

This is the Official implementation of our ICSE2024 paper "Prism: Decomposing Program Semantics for Code Clone Detection through Compilation".

Alt text

Quick Start

Environment Setup

conda create -n prism Python=3.10;
conda activate prism;

# setup asm2vec
#git clone https://github.com/lancern/asm2vec.git;
export PYTHONPATH="path/to/asm2vec:$PYTHONPATH";
source ~/.bashrc;

Usage

Data Pre-processing

Remove comment

Use Gcc/G++ compiler turn C/Cpp codes to asm

Use Asm2Vec turn asm to vectors

cd asm2vec/examples
python3 1-Asm2Funcs.py
python3 2-TrainAsm.py
python3 3-FunctionAvg.py

Bert Fine tune

python3 preRun.py
cd bert-fine-tune
./run.sh
python3 get_bert_emb_96_ft.py #get the embedding after fine tune

Generate Training Data

cd generateTrainingData
python3 generateTrainingData.py

Feature Fusion and Train DNN

cd dnn
python3 train_loop.py

Reference

  1. FCDetector

2.asm2vec

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published