Last active
September 22, 2016 21:59
-
-
Save benjholla/0d1ca8392910ae7a5fb5f0de150d6591 to your computer and use it in GitHub Desktop.
A basic Program Dependence Graph (PDG) example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic Program Dependence Graph (PDG) example from: | |
* https://www.cs.colorado.edu/~kena/classes/5828/s00/lectures/lecture15.pdf | |
* | |
* @author Ben Holland | |
*/ | |
public class BasicProgramDependenceGraphExample { | |
public static void main(String[] args) { | |
/* 1 */ | |
int i = 1; | |
/* 2 */ | |
if (i == 1) { | |
/* 3 */ | |
System.out.println("POS"); | |
} else { | |
/* 4 */ | |
i = 1; | |
} | |
/* 5 */ | |
System.out.println(i + "blah"); | |
/* 6 end */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment