| Require: Preprocessed dataset |
| Ensure: Vulnerability detection model |
| 1: functionDYNAMICTAINTANALYSIS() |
| 2: Perform dynamic taint analysis to track data flow and identify tainted values in bytecode |
| 3: return Set of tainted values |
| 4: end function |
| 5: functionFEATUREEXTRACTION() |
| 6: Apply n-grams with one-hot encoding to convert bytecode into feature vectors |
| 7: Incorporate dynamic features derived from tainted values into the feature vectors |
| 8: return feature vectors |
| 9: end function |
| 10: Load preprocessed dataset |
| 11: Feature Extraction Phase: |
| 12: for each contract in the dataset do |
| 13: Extract bytecode from contract |
| 14: Apply RandomFlipping function using Equation (1) to : |
| 15: Extract execution data from contract |
| 16: Apply RealTimeBatchNormalization function to : |
| 17: Perform dynamic taint analysis on and : |
| 18: Extract features from and using FeatureExtraction function eqn (3) and eqn (4) with tainted values |
| 19: Replace the original bytecode and execution data in contract with |
| 20: end for |
| 21: Model Training Phase: |
| 22: Split the dataset into training and testing sets using Equation (5) |
| 23: Initialize the BiLSTM-CNN-Attention model |
| 24: Train the model using the training set using Equation (5) |
| 25: Model Evaluation Phase: |
| 26: Evaluate the model using the testing set using Equation (9) for classification |
| 27: Return classification output |