1 / 24

GAP- Generating Access Permissions IJAZ AHMED advised by : NESTOR CATANO

GAP- Generating Access Permissions IJAZ AHMED advised by : NESTOR CATANO. GAP. It takes a Java program and generates the likely access permissions It implements a modular and static analysis of Java programs. How it Works?

savea
Download Presentation

GAP- Generating Access Permissions IJAZ AHMED advised by : NESTOR CATANO

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GAP- Generating Access Permissions IJAZ AHMED advised by : NESTOR CATANO http://www3.uma.pt/ncatano/aeminium/GAP.html

  2. GAP • It takes a Java program and generates the likely access permissions • It implements a modular and static analysis of Java programs. • How it Works? • It extracts the read, write and alias information from a Java source code through AST • It generates a graph for every method that shows read, write and alias information • It traverses the graph and gathers likely information • It works in two mode i.e. Read mode and Write mode • An implementation of the algorithm as an Eclipse plug-in is on way http://www3.uma.pt/ncatano/aeminium/GAP.html

  3. General Idea http://www3.uma.pt/ncatano/aeminium/GAP.html

  4. Notations, Terminology and Concepts • Method Node • an abstraction to represent method local environment • Context Node • an abstraction to represent external world/other references • Reference Nodes • class fields, parameters, local variables • Object Nodes • represent physical memory of objects • Edges • Read Edge • Write Edge • Pointe Edge http://www3.uma.pt/ncatano/aeminium/GAP.html

  5. Some Rules • General Idea • To represent the read , write and alias information with edges • Check the types of edges and number of Pointe’ edges to define access Permissions • Types of Rules • Graph Construction Rules • Pre Access Permissions Rules (Graph Traversal) • Post Access Permission Rules (Graph Traversal) http://www3.uma.pt/ncatano/aeminium/GAP.html

  6. An Example- JAVA Program publicclass B{ int a; } publicclass A { B x,y,r; publicObject method1(B z, B w){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } } http://www3.uma.pt/ncatano/aeminium/GAP.html

  7. Analysis of method1 High Level Algorithm Make the set Z = {Fields} U {Parameters} Make the set M= object of set Z Make the set U = Z U M U { method, Context} Step 1- Create nodes for all items in set U Step 2- Apply the Pointe-Rule for elements in set Z and set M Step 3- Apply the rule Context-R if you are in mode R, otherwise apply rule Context-RW if you are in mode RW. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y x_object y_object z_object w_object context http://www3.uma.pt/ncatano/aeminium/GAP.html

  8. Analysis of method1 High Level Algorithm Make the set Z = {Fields} U {Parameters} Make the set M= object of set Z Make the set U = Z U M U { method, Context} Step 1- Create nodes for all items in set U Step 2- Apply the Pointe-Rule for elements in set Z and set M Step 3- Apply the rule Context-R if you are in mode R, otherwise apply rule Context-RW if you are in mode RW. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y P P P P x_object y_object z_object w_object context http://www3.uma.pt/ncatano/aeminium/GAP.html

  9. Analysis of method1 High Level Algorithm Make the set Z = {Fields} U {Parameters} Make the set M= object of set Z Make the set U = Z U M U { method, Context} Step 1- Create nodes for all items in set U Step 2- Apply the Pointe-Rule for elements in set Z and set M Step 3- Apply the rule Context-R if you are in mode R, otherwise apply rule Context-RW if you are in mode RW. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  10. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  11. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  12. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  13. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y P P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  14. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y P P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  15. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  16. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  17. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  18. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  19. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w R P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  20. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w R P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  21. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; full(x),full(y),full(z),Immutable(w)  publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w R P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  22. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; full(x),full(y),full(z),Immutable(w)  publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w R P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  23. Analysis of method1 High Level Algorithm Step 4- For every statement s in the method body, apply a graph construction rule according to the syntax of s. Step 5- Generate Pre-Permissions by applying Pre-Traversal Rules for items in set Z Step 6- Generate Post-Permissions by applying Post-Traversal Rules for items in set Z. publicclass A { B x,y,r; full(x),full(y),full(z),Immutable(w)  Immutable(x),Immutable(y) publicObject method1(B z, B w ){ x=w; Object t=x; y=t; z.a=15; System.print.out(x.a+w.a+t.a); return y; } method1 w t z x y w R P P P P x_object y_object z_object w_object R R R R context http://www3.uma.pt/ncatano/aeminium/GAP.html

  24. Conclusion • Present Status • Can generate access permission for simple program • Tested with some examples • Under development • Future Work • Parser require further iterations to parse complex program • Mapping of GAP Specifications with Plural Syntax • Planning to run GAP on the MTTS application as a bench mark • Integrate as an Eclipse plug-in with Plural • Link • http://www3.uma.pt/ncatano/aeminium/GAP.html http://www3.uma.pt/ncatano/aeminium/GAP.html

More Related