From f765a74d1d83fa7af5264b608c13e131e78dd601 Mon Sep 17 00:00:00 2001 From: Sangameshdavey <90769201+Sangameshdavey@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:49:01 +0530 Subject: [PATCH] Update README.md Changed the description of the python usage for the updated sample code --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 778f323a..a2b23fd6 100644 --- a/README.md +++ b/README.md @@ -202,17 +202,17 @@ for (auto val : pgmVec) ``` ## Using Python package (IR2Vec-Wheels) +- Initialization: + - ```initObj = ir2vec.initEmbedding("/path/to/file.ll", "fa", "p")``` - Input: - .ll/.bc file for which embeddings are needed - `fa` -> Flow-Aware Encoddings; `sym` -> Symbolic Encodings - `p` -> program level; `f` -> function level - Output: - - A dictionary containing: - - `Instruction_Dict`: Key: Instruction[String]; Value : Embedding Vector - - `Function_Dict`: Key: Function name[String]; Value : Embedding Vector - - `Program_List`: Program/Module Name[String]; Embedding Vector - - `Message`: [String] Appropriate debug message. - - `Status`: [Bool] True if everything went fine else False + - Use the following functions: + - `Program Vector`: ```progVector1 = ir2vec.getProgramVector(initObj)``` or ```progVector2 = initObj.getProgramVector()``` + - `Function Vector`: ```functionVectorMap1 = ir2vec.getFunctionVectors(initObj)``` or ```functionVectorMap2 = initObj.getFunctionVectors()``` + - `Instruction Vectors`: ```instructionVectorsList1 = ir2vec.getInstructionVectors(initObj)``` or ```instructionVectorsList2 = initObj.getInstructionVectors()``` - The following code snippet contains an example to demonstrate the usage of the package. ```python