JSPick-a server pages design recovery tool

May 23, 2017 | Autor: Dirk Draheim | Categoria: Software Maintenance
Share Embed


Descrição do Produto

JSPick - A Server Pages Design Recovery Tool Dirk Draheim, Elfriede Fehr, and Gerald Weber Insitute for Computer Science Freie Universit¨at Berlin {draheim,fehr,weber}@inf.fu-berlin.de Abstract This paper presents the reverse engineering tool JSPick, which recovers page signatures and form types from server pages based presentation layers. A formal semantics of the tool is given in pseudo-evaluation style.

1 Introduction JSPick [13] is a reverse engineering tool for server pages based presentation layers. The formal semantics of the tool is independent of the scripting language used in the page. The system is implemented for Java Server Pages. JSPick generates a documentation of the whole system interface in an easy to read specification language. Beside that JSPick generates a GUI browser for each system. With that browser the developer can examine source code, abstract syntax trees, type information, warnings and the linkage structure of the system in quest under several different viewpoints. The presentation layer of web-based systems is built with one of the several common gateway interface (CGI) based technologies. It consists of a set of server side scripts. A script is a code unit that is called across the net by the user by submitting a form or selecting a link. On behalf of this the script eventually sends back to the web user agent a client page description, which may encompass forms and links. In our approach it is crucial that a form may be viewed as an editable method call, gathering actual parameters from the user. Furthermore links can be subsumed conceptually under forms as non-editable method calls having hidden parameters as constant actual parameters. We coin the two terms client page description safety and client page type safety for two desired properties of web applications. A web application has the property of client page description safety if its server scripts always only produce valid page descriptions with respect to a defined client page description language. A web application has the property of client page type safety if the client pages generated by the

server scripts always only contain such forms and links that provide exactly such actual parameters that are expected by the respective targeted server scripts. Listing 1 Example Page > > > TEXT , controltype = text > > > > > TEXTAREA , controltype = textarea > > > > > > >CHECKBOX , controltype = checkbox > > > > >RADIO , controltype = radiobutton > > > > >SELECT , controltype = select > > : SELECT [ ] , controltype = multipleselect [[if p ]] = [[switcharbitrary p ]] [[ifElse p1 p2 ]] = [[switchunique p1 p2 ]] arbitrary p . . . p ]] = [[switch n 1 8 > ⊥ , ∀ ([[pi ]]n) ↑ > > 1≤i≤n < λ n . t[ ] , ∀ (([[pi ]]n) ↑ ∨ ⇓ ([[pi ]]n) = t ∈ bt) > 1≤i≤n > > :VARIOUS[ ] , else unique p . . . p ]] = [[switch n 1 8 ⊥ , ∀ ([[pi ]]n) ↑ > > > 1≤i≤n > > > > t , ∀ ([[pi ]]n) = t ∈ bt > > 1≤i≤n < λ n . VARIOUS , ∀ ([[pi ]]n) ∈ bt > 1≤i≤n > > > > t[ ] , ∀ (([[pi ]]n) ↑ ∨ ⇓ ([[pi ]]n) = t ∈ bt) > > 1≤i≤n > > : VARIOUS[ ] , else

[[loop p ]] = λ n .

( ⊥  ⇓ ([[p]]n) [ ]

, ([[p]]n) ↑ , else

[[p1 . . . pn ]] = 8 ⊥ , ∀ ([[pi ]]n) ↑ > > 1≤i≤n > > > > > [[pi ]]n , ∃ ! ([[pi ]]n) ↓ > > 1≤i≤n > > > > ∧ ∃ ([[pi ]]n) = radiobutton > > 1≤i≤n > > > > t[ ] , ∀ (([[pi ]]n) ↑ ∨ ⇓ ([[pi ]]n) = t ∈ bt) > > > 1≤i≤n > : VARIOUS[ ] , else

Figure 1. JSPick Pseudo-Evaluation.

6 Conclusion Web applications are ubiquitous. Ultra-thin client based tiered enterprise applications benefit from scalability and maintainability. Server pages technologies are widely used in the implementation of ultra-thin client applications. Unfortunately the low-level CGI programming model shines through in these technologies, especially user data is gathered in a completely untyped manner. In this paper a tool for code-structure sensitive recov-

Proceedings of the Seventh European Conference On Software Maintenance And Reengineering (CSMR’03) 0-7695-1902-4/03 $17.00 © 2003 IEEE

ery of page signatures and form types from server pages based presentation layers has been introduced. A formal semantics of this tool has been given as pseudo-evaluation. The findings are programming language independent and can be easily adapted to other server pages technologies [19][20][1].

References [1] K. W. Angell. Python Server Pages (PSP). Dr. Dobbs Journal, January 2000. [2] G. Antoniol, G. Canfora, G. Casazza, and A. D. Lucia. Web site reengineering using RMM. In Proceedings of the International Workshop on Web Site Evolution, pages 9–16, March 2000. [3] D. Atkins, T. Ball, G. Bruns, and K. Cox. Mawl: a domainspecific language for form-based services. In IEEE Transactions on Software Engineering, June 1999. [4] D. Budgen and S. Burgees. A simple tool for temporal indexing of hypertext documents. Computer, 31:52–53, December 1998. [5] E. J. Chikofsky and J. H. Cross. Reverse engineering and design recovery: A taxonomy. IEEE Software, pages 13–17, January 1990. [6] P. Cousot. Program analysis: The abstract interpretation perspective. SIGPLAN Notices, 32:73–76, 1997. [7] J. D. Davidson and S. Ahmed. Java Servlet Specification, v2.1a. Sun Press, 1998. [8] J. D. Davidson and D. Coward. Java Servlet Specification, v2.2. Sun Press, 1999. [9] D. Draheim. Typed Server Pages. PhD thesis, Freie Universit¨at Berlin, December 2002. [10] D. Draheim and G. Weber. Specification and generation of JSP dialogues with Gently. In Proceedings of NetObjectDays 2001. tranSIT, September 2001. ISBN 3-00-008419-3. [11] D. Draheim and G. Weber. The gently project. October 2002. http://www.inf.fu-berlin.de/projects/gently/. [12] D. Draheim and G. Weber. Strongly typed server pages. In Proceedings of The Fifth Workshop on Next Generation Information Technologies and Systems, LNCS. Springer, June 2002. [13] D. Draheim, G. Weber, and Y. Naciri. The JSPick project. October 2002. http://www.inf.fu-berlin.de/projects/jspick/. [14] B. et. al. Professional JSP, 2nd edition. Wrox Press, April 2001. [15] A. E. Hassan and R. C. Holt. Towards a better understanding of web applications. In Proceedings of WSE 2001: International Workshop on Web Site Evolution, November 2001. [16] A. E. Hassan and R. C. Holt. Architecture recovery of web applications. In Proceedings of ICSE 2002: International Conference on Software Engineering, May 2002. [17] A. E. Hassan and R. C. Holt. A visual architectural approach to maintaining web applications. Annals of Software Engineering, 16, 2003. [18] J. Jensen. Generation of machinecode in ALGOL compilers. BIT - Nordisk Tidskrift for Informations-Behandling, 5:235– 245, 1965.

[19] R. Lerdorf and K. Tatroe. Programming PHP. O’Reilly, 2002. [20] J. Liberty and D. Hurwitz. Programming ASP.NET. O’Reilly, 2002. [21] G. Lucca, A. R. Fasolino, F. Pace, P. Tramontana, and U. de Carlini. Ware: A tool for the reverse engineering of web applications. In Sixth European Conference on Software Maintenance and Reengineering. IEEE, 2002. [22] B. Meyer. Applying ”design by contract”. IEEE Computer, 25(10):40–51, October 1992. [23] B. Meyer. Design by contract. In D. Mandroli and B. Meyer, editors, Advances in Object-Oriented Software Engineering. Prentice Hall, 1992. [24] P. Naur. The design of the GIER ALGOL compiler. Nordisk Tidskrift for Informations-Behandling, 3:124–140, 1963. [25] P. Naur. Checking of operand types in ALGOL compilers. BIT - Nordisk Tidskrift for Informations-Behandling, 5:151– 163, 1965. [26] M. D. Network. Official guidelines for user interface developers and designers. Microsoft Corporation, 2002. http://msdn.microsoft.com/. [27] T. Parr and R. Klaren. ANTLR - Complete Language Translation Solutions. JGuru, 2002. http://www.antlr.org/. [28] T. J. Parr. Obtaining Practical Variants Of LL(k) And LR(k) For k-1 By Splitting The Atomic k-Tuple. PhD thesis, School of Electrical Engineering, Purdue University, 1993. [29] E. Pelegri-Llopart and L. Cable. Java Server Pages Specification, v.1.1. Sun Press. [30] G. Schaps. Compiler construction with ANTLR and Java. Dr. Dobb’s Journal, March 1999. [31] J. Spivey. The Z Notation. Prentice Hall, 1992. [32] T.J.Marlowe and B.G.Ryder. Properties of data flow frameworks - a unified model. Acta Informatica, 28:121–163, 1990. [33] W. M. Waite and G. Goos. Compiler Construction. Springer, 1984. [34] J. Warmer and A. Kleppe. The Object Constraint Language. Addison-Wesley, 1999. [35] G. Weber. Semantics and Pragmatics of Form-Oriented Analysis. PhD thesis, Freie Universit¨at Berlin, December 2002.

Proceedings of the Seventh European Conference On Software Maintenance And Reengineering (CSMR’03) 0-7695-1902-4/03 $17.00 © 2003 IEEE

Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.