This Article 
 Bibliographic References 
 Add to: 
Using SCL to Specify and Check Design Intent in Source Code
June 2006 (vol. 32 no. 6)
pp. 404-423
Software developers often fail to respect the intentions of designers due to missing or ignored documentation of design intent. SCL (Structural Constraint Language) addresses this problem by enabling designers to formalize and confirm compliance with design intent. The designer expresses his intent as constraints on the program model using the SCL language. The SCL conformance checking tool examines developer code to confirm that the code honors these constraints. This paper presents the design of the SCL language and its checker, a set of practical examples of applying SCL, and our experience with using it both in an industrial setting and on open-source software.

[1] C.-H. Shih and B. Anderson, “A Design/Constraint Model to Capture Design Intent,” Proc. Fourth ACM Symp. Solid Modeling and Applications (SMA '97), pp. 255-264, 1997.
[2] L. Horvath and I. Rudas, “Human Intent Description as a Tool for Communication between Engineers,” Proc. 1999 IEEE Int'l Conf. Systems, Man, and Cybernetics (SMC '99), vol. 2, pp. 348-353, 1999.
[3] L. Horvath and I. Rudas, “Modeling Behavior of Engineering Objects Using Design Intent Model,” Proc. 29th Ann. Conf. IEEE Industrial Electronics Soc. (IECON '03), pp. 872-876, 2003.
[4] L.L. Constantine and L.A.D. Lockwood, Software for Use: A Practical Guide to the Models and Methods of Usage-Centered Design. ACM Press, 1999.
[5] R. Biddle, J. Noble, and E. Tempero, “Essential Use Cases and Responsibility in Object-Oriented Development,” Proc. 25th Australasian Computer Science Conf. (ACSC '02), pp. 7-16, 2002.
[6] M. Fagan, “Design and Code Inspection to Reduce Errors in Program Development,” IBM System J., vol. 15, no. 3, pp. 182-211, 1976.
[7] D.P. Freedman and G.M. Weinberger, Handbook of Walkthroughs, Inspections, and Technical Reviews. New York: Dorset House, 1990.
[8] K. Wong, S.R. Tilley, H.A. Müller, and M.-A.D. Storey, “Structural Redocumentation: A Case Study,” IEEE Software, vol. 12, no. 1, pp. 46-54, 1995.
[9] W. Bush, J. Pincus, and D. Sielaff, “A Static Analyzer for Finding Dynamic Programming Errors,” Software: Practice and Experience, vol. 30, no. 7, pp. 775-802, 2000.
[10] D. Reimer, E. Schonberg, K. Srinivas, H. Srinivasan, B. Alpern, R.D. Johnson, A. Kershenbaum, and L. Koved, “SABER: Smart Analysis Based Error Reduction,” Proc. 2004 ACM SIGSOFT Int'l Symp. Software Testing and Analysis (ISSTA '04), pp. 243-251, 2004.
[11] M. Das, S. Lerner, and M. Seigle, “Path-Sensitive Program Verification in Polynomial Time,” Proc. ACM SIGPLAN 2002 Conf. Programming Language Design and Implementation, June 2002.
[12] Y. Xie, A. Chou, and D. Engler, “ARCHER: Using Symbolic, Path-Sensitive Analysis to Detect Memory Access Errors,” Proc. ACM SIGSOFT 2003 Conf. Foundations of Software Eng., 2003.
[13] D. Brand, “A Software Falsifier,” Proc. IEEE 2002 Int'l Symp. Software Reliability Eng., 2002.
[14] Y. Xie and A. Aiken, “Scalable Error Detection Using Boolean Satisfiability,” Proc. ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL 2005), 2005.
[15] D. Hou, “FCL: Automatically Detecting Structural Errors in Framework-Based Development,” PhD dissertation, Univ. of Alberta, Edmonton, Alberta, Canada, Dec. 2003.
[16] D. Hou, H.J. Hoover, and P. Rudnicki, “Specifying Framework Constraints with FCL,” Proc. Centre for Advanced Studies Conf. (CASCON 2004), Oct. 2004.
[17] D. Hou, H.J. Hoover, and P. Rudnicki, “Specifying the Law of Demeter and C++ Programming Guidelines with FCL,” Proc. Fourth IEEE Int'l Workshop Source Code Analysis and Manipulation (SCAM '04), Sept. 2004.
[18] The Mizar Organization, Mizar Project, http:/, 1973.
[19] K. Pingali and G. Bilardi, “Optimal Control Dependence Computation and the Roman Chariots Problem,” ACM Trans. Programming Languages and Systems, vol. 19, no. 3, pp. 462-491, May 1997.
[20] D. Jackson, “Aspect: Detecting Bugs with Abstract Dependences,” ACM Trans. Software Eng. and Methodology, vol. 4, no. 2, pp. 109-145, Apr. 1995.
[21] G. Shepherd and S. Wingo, MFC Internals: Inside the Microsoft Foundation Classes Architecture. Addison-Wesley, 1996.
[22] J. Bloch, Effective Java Programming Language Guide. Addison-Wesley, 2001.
[23] J. Newcomer, FlounderCraft Ltd: MVP (Microsoft Valued Professionals) Tips, Techniques, and Goodies, http:/www.flounder. com, 2004.
[24] Microsoft, How to Display Tool Tips after Calling EnableToolTips,, 2003.
[25] R.C. Holt, A.E. Hassan, B. Lague, S. Lapierre, and C. Leduc, “E/R Schema for the Datrix C/C++/Java Exchange Format,” Proc. Working Conf. Reverse Eng., pp. 349-358, 2000.
[26] Eclipse Foundation, JDT: Java Development Tools, http://www. eclipse.orgjdt, 2005.
[27] D. Hou and H.J. Hoover, “Source-Level Linkage: Adding Semantic Information to C++ Factbases,” Proc. Int'l Conf. Software Maintenance, Sept. 2006.
[28] J. Larus, Righting Software, SE Software Eng. Conf. Keynote (PowerPoint),, 2004.
[29] Y.-H. Lin and S. Meyers, “CCEL: The C++ Constraint Expression Language— An Annotated Reference Manual (Version 0.5),” Technical Report CS-93-23, Dept. of Computer Science, Brown Univ., 1993.
[30] B. Bokowski, “CoffeeStrainer: Statically-Checked Constraints on the Definition and Uses of Types in Java,” Proc. European Software Eng. Conf./Foundations of Software Eng., Sept. 1999.
[31] N.H. Minsky, “Law-Governed Regularities in Object Systems; Part 1: An Abstract Model,” Theory and Practice of Object Systems (TAPOS), vol. 2, no. 1, 1996.
[32] K. Mens, A. Kellens, F. Pluquet, and R. Wuyts, “Co-Evolving Code and Design with Intensional Views: A Case Study,” Computer Languages, Systems & Structures, special issue on Smalltalk, vol. 32, nos. 2-3, pp. 140-156, July-Oct. 2006.
[33] G. Froehlich, J. Hoover, L. Liu, and P. Sorenson, “Hooking into Object-Oriented Application Frameworks,” Proc. 1997 Int'l Conf. Software Eng., May 1997.
[34] M.F. Fontoura, W. Pree, and B. Rumpe, “UML-F: A Modeling Language for Object-Oriented Frameworks,” Proc. European Conf. Object-Oriented Programming (ECOOP 2000), 2000.
[35] G. Florijn, M. Meijers, and P. van Winsen, “Tool Support for Object-Oriented Patterns,” Proc. European Conf. Object-Oriented Programming (ECOOP '97), pp. 472-495, Oct. 1997.
[36] D. Jackson, “Alloy: A Lightweight Object Modeling Notation,” ACM Trans. Software Eng. and Methodology, vol. 11, no. 2, pp. 256-290, Apr. 2002.
[37] J.M. Atlee and J. Gannon, “State-Based Model Checking of Event-Driven System Requirements,” IEEE Trans. Software Eng., vol. 19, no. 1, pp. 24-40, June 1993.
[38] M. Chechik and J. Gannon, “Automatic Analysis of Consistency between Requirements and Designs,” IEEE Trans. Software Eng., vol. 27, no. 7, July 2001.
[39] D.R. Engler, “Interface Compilation: Steps toward Compiling Program Interfaces as Languages,” IEEE Trans. Software Eng., vol. 25, no. 3, pp. 387-400, May/June 1999.
[40] D.R. Engler, B. Chelf, A. Chou, and S. Hallem, “Checking System Rules Using System-Specific, Programmer-Written Compiler Extensions,” Proc. Symp. Operating System Design and Implementation (OSDI 2000), Sept. 2000.
[41] S. Hallem, B. Chelf, Y. Xie, and D.R. Engler, “A System and Language for Building System-Specific, Static Analyses,” Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI 2002), June 2002.
[42] D. Hovemeyer and W. Pugh, “Finding Bugs Is Easy,” Companion of ACM SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2004), onward! track, 2004.
[43] J. Foster, T. Terauchi, and A. Aiken, “Flow-Sensitive Type Qualifiers,” Proc. ACM SIGPLAN 2002 Conf. Programming Language Design and Implementation, June 2002.
[44] C. Flanagan, K.R.M. Leino, M. Lillibridge, G. Nelson, J.B. Saxe, and R. Stata, “Extended Static Checking for Java,” Proc. Proc. ACM SIGPLAN 2002 Conf. Programming Language Design and Implementation (PLDI '02), June 2002.
[45] D. Evans et al., “LCLint: A Tool for Using Specifications to Check Code,” Proc. ACM SIGSOFT Symp. Foundations of Software Eng. (FSE '94), Dec. 1994.
[46] R. Crew, “ASTLOG: A Language for Examining Abstract Syntax Tree,” Proc. USENIX Conf. Domain-Specific Languages, pp. 229-242, Oct. 1997.
[47] P.T. Devanbu, “GENOA-A Customizable, Front-End Retargetable Source Code Analysis Framework,” ACM Trans. Software Eng. and Methodology, vol. 8, no. 2, pp. 177-212, Apr. 1999.
[48] R.C. Holt, “Structural Manipulations of Software Architecture Using Tarski Relational Algebra,” Proc. Working Conf. Reverse Eng., pp. 210-219, 1998.
[49] A. Mendelzon and J. Sametinger, “Reverse Engineering by Visualizing and Querying,” Software-Concepts and Tools, vol. 16, pp. 170-182, 1995.
[50] S. Paul and A. Prakash, “A Query Algebra for Program Databases,” IEEE Trans. Software Eng., vol. 22, no. 3, pp. 202-217, Mar. 1996.
[51] O. Kaczorol, Y.-G. Guéhéneuc, and S. Hamel, “Efficient Identification of Design Patterns with Bit-Vector Algorithm,” Proc. 10th European Conf. Software Maintenance and Reeng., G.A. di Lucca and N. Gold, eds., Mar. 2006.
[52] Object Management Group, Unified Modeling Language 2.0, http:/, 2004.

Index Terms:
Design intent, structural constraints, program analysis, object-oriented software, SCL, FCL.
Daqing Hou, H. James Hoover, "Using SCL to Specify and Check Design Intent in Source Code," IEEE Transactions on Software Engineering, vol. 32, no. 6, pp. 404-423, June 2006, doi:10.1109/TSE.2006.60
Usage of this product signifies your acceptance of the Terms of Use.