Language design and implementation for the domain of coding conventions

Coding conventions are lexical, syntactic or semantic restrictions enforced on top of a software language for the sake of consistency within the source base. Specifying coding conventions is currently an open problem in software language engineering, addressed in practice by resorting to natural language descriptions which complicate conformance verification. In this paper we present an endeavour to solve this problem for the case of CSS — a ubiquitous software language used for specifying appearance of hypertextual content separately from the content itself. The paper contains the results of domain analysis, a short report on an empirically obtained catalogue of 143 unique CSS coding conventions, the domain-specific ontology for the domain of detecting violations, the design of CssCoco, a language for expressing coding conventions of CSS, as well as a description of the tool we developed to detect violations of conventions specified in this DSL.

[1]  Giancarlo Succi,et al.  A taxonomy for identifying a software component for uncertain and partial specifications , 1996, SAC '96.

[2]  Misko Hevery,et al.  Declarative web-applications without server: demonstration of how a fully functional web-application can be built in an hour with only HTML, CSS & Javascript Library , 2009, OOPSLA Companion.

[3]  Henrik Stormer,et al.  Personalized Websites for Mobile Devices using Dynamic Cascading Style Sheets , 2005, Int. J. Web Inf. Syst..

[4]  Sergei Nirenburg,et al.  Generation , 2004, Machine Translation.

[5]  Thomas R. Gruber,et al.  Toward principles for the design of ontologies used for knowledge sharing? , 1995, Int. J. Hum. Comput. Stud..

[6]  Jean-Luc Hainaut,et al.  Database application evolution: A transformational approach , 2006, Data Knowl. Eng..

[7]  Da-Chun Wu,et al.  Information Hiding in EPUB Files by Rearranging the Contents of CSS Files , 2013, 2013 Ninth International Conference on Intelligent Information Hiding and Multimedia Signal Processing.

[8]  Ralf Lämmel,et al.  Towards an engineering discipline for GRAMMARWARE Draft as of August 17 , 2003 , 2003 .

[9]  Steven Pemberton,et al.  Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification , 2010 .

[10]  Mikko Pohja,et al.  CSS layout engine for compound documents , 2005, Third Latin American Web Congress (LA-WEB'2005).

[11]  Marie-Francine Moens,et al.  The downside of markup: examining the harmful effects of CSS and javascript on indexing today's web , 2012, CIKM '12.

[12]  Jurriaan Hage,et al.  ITMViz: Interactive Topic Modeling for Source Code Analysis , 2015, 2015 IEEE 23rd International Conference on Program Comprehension.

[13]  Markel Vigo,et al.  Exploring Automatic CSS Accessibility Evaluation , 2009, ICWE.

[14]  Frédéric Sur Robust Matching in an Uncertain World , 2010, 2010 20th International Conference on Pattern Recognition.

[15]  Michael Rosemann,et al.  Integrated Process Modeling: An Ontological Evaluation , 2000, Inf. Syst..

[16]  Scott Grant,et al.  Examining the relationship between topic model similarity and software maintenance , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[17]  Werner Esswein,et al.  Toward a formal research framework for ontological analyses , 2007, Adv. Eng. Informatics.

[18]  Zaihan Yang,et al.  Parametric and Non-parametric User-aware Sentiment Topic Models , 2015, SIGIR.

[19]  C. Michael Sperberg-McQueen,et al.  World Wide Web Consortium , 2009, Encyclopedia of Database Systems.

[20]  C.-H. Luke Ong,et al.  Detecting redundant CSS rules in HTML5 applications: a tree rewriting approach , 2014, OOPSLA.

[21]  Sean Bechhofer,et al.  SADIe:: transcoding based on CSS , 2006, Assets '06.

[22]  Brian Henderson-Sellers,et al.  Ontological Evaluation of the UML Using the Bunge–Wand–Weber Model , 2002, Software and Systems Modeling.

[23]  Matthias Keller,et al.  CSS Code Quality: A Metric for Abstractness; Or Why Humans Beat Machines in CSS Coding , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[24]  Jack W. Davidson,et al.  A Formal Model for Procedure Calling Conventions , 1994 .

[25]  Reuben Olinsky,et al.  Staged allocation: a compositional technique for specifying and implementing procedure calling conventions , 2006, POPL '06.

[26]  Yung-Chen Chou,et al.  A Webpage Data Hiding Method by Using Tag and CSS Attribute Setting , 2014, 2014 Tenth International Conference on Intelligent Information Hiding and Multimedia Signal Processing.

[27]  Aiko Fallas Yamashita,et al.  Do developers care about code smells? An exploratory survey , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[28]  Daniel L. Moody,et al.  The “Physics” of Notations: Toward a Scientific Basis for Constructing Visual Notations in Software Engineering , 2009, IEEE Transactions on Software Engineering.

[29]  Sergey Bratus,et al.  A Patch for Postel's Robustness Principle , 2012, IEEE Security & Privacy.

[30]  Fernando Diaz,et al.  A User-Centered Approach to Evaluating Topic Models , 2004, ECIR.

[31]  Collin Jackson,et al.  Protecting browsers from cross-origin CSS attacks , 2010, CCS '10.

[32]  Cristina V. Lopes,et al.  Capturing Java naming conventions with first-order Markov models , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[33]  Daqing Hou,et al.  LDA Analyzer: A Tool for Exploring Topic Models , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[34]  Charles A. Sutton,et al.  Learning natural coding conventions , 2014, SIGSOFT FSE.

[35]  Ralf Lämmel,et al.  A Unified Format for Language Documents , 2010, SLE.

[36]  Maciej Drozdowski,et al.  Analysis and Solution of CSS-Sprite Packing Problem , 2015, TWEB.

[37]  Kehinde Alabi Generation, documentation and presentation of mathematical equations and symbolic scientific expressions using pure HTML and CSS , 2007, WWW '07.

[38]  Yanchun Zhang,et al.  An analytical evaluation of NIAM'S grammar for conceptual schema diagrams , 1996, Inf. Syst. J..

[39]  Barry Smith,et al.  Top-Level Ontology : The Problem with Naturalism , 2004 .

[40]  Bin Li,et al.  Modeling the evolution of development topics using Dynamic Topic Models , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[41]  Ali Mesbah,et al.  Automated analysis of CSS rules to support style maintenance , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[42]  Alfonso Pierantonio,et al.  Managing uncertainty in bidirectional model transformations , 2015, SLE.

[43]  Peter J. Stuckey,et al.  Constraint cascading style sheets for the Web , 1999, UIST '99.

[44]  Janne Saarela,et al.  Multipurpose Web publishing using HTML, XML, and CSS , 1999, CACM.

[45]  Takamichi Saito,et al.  Web Browser Fingerprinting Using Only Cascading Style Sheets , 2015, 2015 10th International Conference on Broadband and Wireless Computing, Communication and Applications (BWCCA).

[46]  Ron Weber,et al.  On the deep structure of information systems , 1995, Inf. Syst. J..

[47]  Wolfgang L. Zagler,et al.  A Method for Generating CSS to Improve Web Accessibility for Old Users , 2012, ICCHP.

[48]  Joan Feigenbaum,et al.  Private web search , 2007, WPES '07.

[49]  Manuel Serrano HSS: a compiler for cascading style sheets , 2010, PPDP.

[50]  Davood Mazinanian,et al.  An Empirical Study on the Use of CSS Preprocessors , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[51]  Jan Sutter,et al.  A CSS integration model for declarative 3D , 2015, Web3D.

[52]  RosemannMichael,et al.  Developing a meta model for the Bunge---Wand---Weber ontological constructs , 2002 .

[53]  Luis Ceze,et al.  Automatic discovery of performance and energy pitfalls in HTML and CSS , 2012, 2012 IEEE International Symposium on Workload Characterization (IISWC).

[54]  Jurgen J. Vinju,et al.  Towards a universal code formatter through machine learning , 2016, SLE.

[55]  Juan Manuel Cueva Lovelle,et al.  ALMcss: a javascript implementation of the CSS template layout module , 2012, DocEng '12.

[56]  Collin Jackson,et al.  Cross-origin pixel stealing: timing attacks using CSS filters , 2013, CCS.

[57]  Matthias Keller,et al.  Cascading style sheets: a novel approach towards productive styling with today's standards , 2009, WWW '09.

[58]  Jukka Korpela Lurching Toward Babel: HTML, CSS, and XML , 1998, Computer.

[59]  Jack W. Davidson,et al.  A formal model and specification language for procedure calling conventions , 1995, POPL '95.

[60]  Petri Vuorimaa,et al.  Optimized CSS Engine , 2006, WEBIST.

[61]  Eleni Stroulia,et al.  Code convention adherence in evolving software , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[62]  Ali Mesbah,et al.  Discovering refactoring opportunities in cascading style sheets , 2014, SIGSOFT FSE.

[63]  Yijun Yu,et al.  Mining java class naming conventions , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[64]  LämmelRalf,et al.  Toward an engineering discipline for grammarware , 2005 .

[65]  Mikko Pohja,et al.  XHTML and CSS Components in an XML Browser , 2003, International Conference on Internet Computing.

[66]  Herb Sutter,et al.  C++ coding standards , 2004 .

[67]  Mike Y. Chen,et al.  SeeSS: seeing what i broke -- visualizing change impact of cascading style sheets (css) , 2013, UIST.

[68]  Michael Rosemann,et al.  Developing a meta model for the Bunge-Wand-Weber ontological constructs , 2002, Inf. Syst..

[69]  Vincent Quint,et al.  On the analysis of cascading style sheets , 2012, WWW.

[70]  Blair MacIntyre,et al.  Unified WebGL/CSS scene-graph and application to AR , 2013, Web3D '13.

[71]  Matthias Jarke,et al.  Gamification for enforcing coding conventions , 2015, ESEC/SIGSOFT FSE.

[72]  Pierre Genevès,et al.  Automated refactoring for size reduction of CSS style sheets , 2014, DocEng '14.

[73]  Vadim Zaytsev,et al.  Formal foundations for semi-parsing , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[74]  Uta Pankoke-Babatz,et al.  Norms and conventions in collaborative systems , 1999, HCI.

[75]  Andreas Schroff,et al.  Conventions for the Practical Use of UML , 1997, UML Workshop.

[76]  Yair Wand,et al.  Using objects for systems analysis , 1997, CACM.

[77]  Mykola Pechenizkiy,et al.  A DSL based on CSS for hypertext adaptation , 2014, HT.

[78]  Eli Tilevich,et al.  Metadata invariants: Checking and inferring metadata coding conventions , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[79]  Jeffrey V. Nickerson Visual conventions for system design using Ada 9X: representing asynchronous transfer of control , 1993, TRI-Ada '93.

[80]  Rick Salay,et al.  Partial models: Towards modeling and reasoning with uncertainty , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[81]  Serge Demeyer,et al.  An experimental investigation of UML modeling conventions , 2006, MoDELS'06.

[82]  Vadim Zaytsev Taxonomy of Flexible Linguistic Commitments , 2015, FlexMDE@MoDELS.

[83]  Vadim Zaytsev,et al.  Parsing in a Broad Sense , 2014, MoDELS.

[84]  Ankur Saxena,et al.  Towards a taxonomy of errors in HTML and CSS , 2013, ICER.

[85]  Dave Shea CSS Zen Garden , 2004, SIGGRAPH Web Graphics.

[86]  Vadim Zaytsev,et al.  BNF was here: what have we done about the unnecessary diversity of notation for syntactic definitions , 2012, SAC '12.

[87]  Sanjay Misra,et al.  Complexity Metrics for Cascading Style Sheets , 2012, ICCSA.

[88]  Ron Weber,et al.  An Ontological Model of an Information System , 1990, IEEE Trans. Software Eng..

[89]  Georgios Gousios,et al.  Lean GHTorrent: GitHub data on demand , 2014, MSR 2014.

[90]  Golnaz Gharachorlu,et al.  Code smells in cascading style sheets : an empirical study and a predictive model , 2014 .

[91]  Stuart Culshaw,et al.  XML and CSS , 1997, World Wide Web J..

[92]  Simon Butler,et al.  Mining Java class identifier naming conventions , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[93]  Banu Diri,et al.  Defect prediction for Cascading Style Sheets , 2016, Appl. Soft Comput..

[94]  Andrea Forte,et al.  An Analysis of HTML and CSS Syntax Errors in a Web Development Course , 2015, ACM Trans. Comput. Educ..

[95]  Cesar Augusto Cusin,et al.  CSS browser selector plus: a JavaScript library to support cross-browser responsive design , 2013, WWW '13 Companion.