diff --git a/.gitignore b/.gitignore index 0986da6..db49960 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ # Editor .idea/ -.vscode/ \ No newline at end of file +.vscode/ +venv/ \ No newline at end of file diff --git a/ASGDetector.py b/ASGDetector.py index f16e35b..d638348 100644 --- a/ASGDetector.py +++ b/ASGDetector.py @@ -22,6 +22,7 @@ device = torch.device('cuda:0') + def create_batches(data): # random.shuffle(data) batches = [data[graph:graph + args.batch_size] for graph in range(0, len(data), args.batch_size)] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3443502 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +anytree==2.8.0 +numpy==1.24.2 +py_solc_ast==1.2.9 +py_solc_x==1.1.1 +solcast==0.2.1 +torch==2.0.0 +torch_geometric==2.3.0 +tqdm==4.65.0 diff --git a/test/test_filter_fun.py b/test/test_filter_fun.py index 94f23a8..4a986b5 100644 --- a/test/test_filter_fun.py +++ b/test/test_filter_fun.py @@ -58,9 +58,3 @@ def get_token(node): pruned_node._children = li_set pruned_node._children - - # tokens = [] - # for child in children: - # # 不为空 - # tokens.append(get_token(child)) - # print(tokens) diff --git a/tools/benchmark_generator.py b/tools/benchmark_generator.py index 3bce15a..13ebf2a 100644 --- a/tools/benchmark_generator.py +++ b/tools/benchmark_generator.py @@ -106,7 +106,3 @@ def divide_benchmark(contract_bench): file_path = os.path.join(contracts_path, set_type) construct_benchmark(file_path, set_type) - # contract_dict1 = get_contract_dict(file_path) - # - # contract_bench1 = construct_benchmark(contract_dict1) - # divide_benchmark(contract_bench1)