Questions tagged [control-flow-graph]

A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.

A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.
In a control flow graph each node in the graph represents a basic block, i.e. a straight-line piece of code without any jumps or jump targets; jump targets start a block, and jumps end a block. Directed edges are used to represent jumps in the control flow. There are, in most presentations, two specially designated blocks: the entry block, through which control enters into the flow graph, and the exit block, through which all control flow leaves.

Reference

138 questions
0
votes
2 answers

Soot - Unable to get soot cfg for a java method which has lambda expression

Im trying to get control flow graph of methods of my code . It working fine for all methods until I ask it to analyse a method which has lambda expression like the below one. public void test() { List test = new…
0
votes
1 answer

I am not sure how to find set of linearly independent path in control flow graph

Hi I am facing problem with finding set of linearly independent path. Here is my set : one:0 1 3 7 8 3 2 4 6 10 two: 0 1 3 7 9 3 2 5 6 10 three: 0 1 3 2 4 5 6 10 four: 0 1 2 4 6 10 five: 0 1 2 4 5 10 Is this linearly independent?
MSWA
  • 37
  • 1
  • 11
0
votes
2 answers

How to get AST only of main function using clang

I want to get AST of main function in source file (assuming there is one) to build control flow graph out of it. I found code that generates and traverse AST here: https://shaharmike.com/cpp/libclang/. But the problem is it goes into all included…
0
votes
0 answers

How to save a control flow graph produced by eclipse-cdt codan as a file (preferably PNG or JPEG)?

I want to save the control flow graph produced by eclipse-cdt codan from some C source code as png/jpeg files. I am using codan as a library in my code so it's not an eclipse plugin. So far I have been able to successfully get the cfg using the…
kvs
  • 178
  • 2
  • 12
0
votes
0 answers

Control flow graphs generation for Java Codes

I'm making a Tool to generate and Visualize Control Flow Graphs from Java Source codes I'm making a Project that will read a Java source code line by line , then generate Control flow graph of the code and then visualize it. But I'm not sure how to…
0
votes
1 answer

Different function lengths and control flow graphs in different IDA Pro versions

I'm trying to analyse a function in an x86 .so library in IDA Pro. I have IDA Pro 7.1 on 1 machine, and IDA Pro 6.8 on another. The function length, and corresponding control flow graphs (both Graph View and WinGraph32) are different between the 2…
user1118764
  • 9,255
  • 18
  • 61
  • 113
0
votes
1 answer

Explanation of in/out Live Variable Calculation Algorithm

This slide shows the algorithm for computing in[n] and out[n] for a control-flow graph node. I'm having difficulty understanding how it works though. I have seen a few other variations and also have difficulty understanding them. I have never dealt…
Lance
  • 75,200
  • 93
  • 289
  • 503
0
votes
1 answer

Is there one-to-one mapping of MachineFunction CFG and IR Function CFG in LLVM?

You can have CFGs at both the LLVM IR Function level and CodeGen MachineFunction level. Is this a one-to-one mapping? I mean, are there same number of (Machine)BasicBlocks in those CFGs with similar control flows?I know the number of instructions…
soham
  • 1,508
  • 6
  • 30
  • 47
0
votes
1 answer

GNU Radio programming pattern / control flow graph

I’m about to start developing an application (probably in C#) that has similar mechanics to GNU radio but a totally different purpose. GNU Radio has a GUI that is like your typical flowchart type editor / drawing tool, but each object displayed on…
0
votes
1 answer

Can I use JDT to generate control flow graph?

Does JDT provide any APIs to generate control flow graph? I used soot to generate control flow graph,but can I use JDT to generate control flow graph?
0
votes
1 answer

How to use Intel PT to check if a conditional branch is taken in assembly?

I am running a program and I want to check whether a branch is taken when there is a conditional jump. I heard that IntelPT can do that using pt_qry_cond_branch() function. However I could not see any example on how to use it. Does anyone have any…
sarah123
  • 175
  • 1
  • 7
0
votes
1 answer

Drawing a Control Flow Graph with an output

I'm currently learning to draw Control Flow Graphs and I'm not sure whether I'm drawing it right for the following scenario: For the following fragment of code, where x and y are the input variables and z is the output variable: if x=0 then x:=10 if…
ArnoldR
  • 13
  • 3
0
votes
0 answers

Which nodes should be included in CFG?

I'm writing a source-code-level optimizer for a language (LSL) whose server-side compiler is non-optimizing. The optimizer is working and performing well in some fields like constant folding, but to make it stronger, I wanted to build a CFG, to…
0
votes
1 answer

How to generate CFG for non executable binary files

I want to generate a control-flow graph for non-executable binary files. The objective is to perform static analysis on the generated binary files of Linux kernel. Is there any tool which can do this? Tools I found by searching are only for…
0
votes
1 answer

Building a Control Flow Graph for Android APK from smali code

Are there any tools out there that parse smali code directly to construct CFG? I know that Androguard does something similar but it seems to use decompilation on the apk file which can become unreliable in situations if the apk uses obfuscation…
Lew Wei Hao
  • 763
  • 1
  • 13
  • 25