1 / 33

Gordana Rakić, Zoran Budimac

SMIILE Finaly COBOL! and what else is new. Gordana Rakić, Zoran Budimac. Contents. Last year... Motivation (why we did it) Related work (what others did) Description (how we did it) Example (how does it work) Conclusion and results. Future work. Last year.

Télécharger la présentation

Gordana Rakić, Zoran Budimac

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. SMIILE Finaly COBOL! and what else is new Gordana Rakić, Zoran Budimac

  2. Contents • Last year... • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  3. Last year • First prototype of “universal” software metrics tool • Characteristics • Platform independency • Developed in Java Programming Language • Application range • Two programming languages (Modula-2 and Java) • Two software metrics (CC and LOC) • Annotated syntax tree based source code and metric values representation - enables • Source code and metric values history • Language independency of the tool

  4. Contents • Last year… • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  5. …Motivation… • Many techniques/tools are appropriate for only one programming language or for one type of programming languages • Support of object-oriented metrics is still weak • Many techniques/tools compute numerical results with no real interpretation of their meanings • There are no hints and advices what typical actions should be taken in order to improve the software • The technique/tool should discourage cheating • Current techniques/tools are not sensitive to the existence of additional code • Sometimes is not clear which specific software metric have to be applied to accomplish the specific goal. • PLUS • Platform dependency • Support for other metrics • History of source code • History of calculated metrics

  6. Contents • Last year … • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  7. Related work • Review of software metric tools available for usage • Based on testing • Review of available literature • Based on • research papers • available development and product documentation

  8. Practice needs new tool which Is platform independent Is programming language independent Calculates broad specter of metrics Supports keeping of source code history Supports keeping of calculated values of software metrics Review conclusion

  9. Contents • Last year… • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  10. Description • The tool description • Background of universality • Support for metrics and lanaguages

  11. Tool used for generation of language translators Input language grammar Output Language scanner Language parser + Intermediate representation of language constructions !syntax trees! Parser Generators

  12. Syntax Trees • Syntax Trees • Intermediate structure produced by • parser generator directly • translator generated by parser generator • Represent • language in abstract form • concrete source code • concrete source code elements attached to corresponding abstract language elements

  13. Syntax Trees (2) Classification of Syntax trees used in this thesis Abstract Syntax Tree (AST) represents concrete source code Concrete Syntax Tree (CST) represents concrete source code elements attached to corresponding abstract language elements Enriched Concrete Syntax Tree (eCST) Represents concrete source code elements attached to corresponding abstract language elements Contains additional information - universal nodes as markers for language elements figuring in metric algorithms

  14. Description • The tool description • Background of universality • Support for metrics ad languages

  15. Background of universality • Enriched Concrete Syntax Tree (eCST) • Generated by Parser generator • Generation is based on programming language grammar • Enrichment is based on modification of programming language grammar by adding universal nodes into tree • Stored to XML structure • Enrichment does not effect structure of the tree • Only content of the tree is affected by these changes

  16. Structure of the eCST

  17. Content of the CST and eCSTUniversal Nodes • IF parenthesizedExpression ifStat = statement(ELSE elseStat = statement -> ^(BRANCH_STATEMENT IF ^(BRANCH ^(IF parenthesizedExpression $ifStat)) ^(BRANCH ELSE $elseStat))| -> ^(BRANCH_STATEMENT IF ^(BRANCH ^(IF parenthesizedExpression $ifStat))))

  18. Information flow trough the tool

  19. Description • The tool description • Background of universality • Support for metrics and languages

  20. Current state • In current prototype • metrics • Cyclomatic Complexity – CC (by predicate counting) • Lines of Code – LOC (by filled lines counting) • Programming languages • Java • Modula 2 • COBOL • All calculations and tree transformations in one pass through code • XML eCST is large for multiple parsing

  21. Adding support for new Programming Language • if (support for new PL is needed) then • begin • modify existing grammar* of new PL (add universal nodes); • generate parser; • add new element in Languages XML structure • end • ____________________________________________ • *Different grammars are supported by different parser generators. As we use ANTLR parser generator in this prototype grammar of new language should be LL(*)

  22. Universal nodes that do not directly affect CC metric

  23. Universal nodes that directly affect CC metric

  24. JUMP_STATEMENT open questions • Return, break,... • Are these statements always the jumps? • GO_TO (and similar statements) • Could it be improved (maybe by involving the enriched Control Flow Graph - eCFG)? • Could we distinguish: • JUMP_TO_BACK • JUMP_TO_FORWARD

  25. Adding support for new Software Metrics • if (support for new Software Metrics is needed) then • begin • determine corresponding new universal nodes; • modify grammars for all supported languages; • regenerate language parsers; • add attribute for storing new metric in XML structure for storing metric values; • add software metric algorithm implementation in measure class • end

  26. Contents • Last year… • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  27. Example • Not today  • For now we used only small example to test grammar and parser, and generation of universal nodes • It is hard to find appropriate example implemented in all three languages in order to compare results

  28. Contents Last year… Motivation (why we did it) Related work (what others did) Description (how we did it) Example (how does it work) Conclusion and results. Future work

  29. Results and conclusion • Motivation and background for development of new software metrics tool which is • Is platform independent • Is programming language independent • Calculates broad specter of metrics • Supports keeping of source code history • Supports keeping of calculated values of software metrics

  30. Results and conclusions (2) • Developed prototype of new software metrics tool which is • Developed in PL Java • is platform independent • Developed to support two input PLs • Is not programming language independent but base for it is sited • This year we made one step forward • Developed to support two Software Metrics • Specter of metrics is not broad but base for it is sited • Supports keeping of source code history • Supports keeping of calculated values of software metrics • ! It analyzes single compilation unit stores to single input file

  31. Contents • Last year… • Motivation (why we did it) • Related work (what others did) • Description (how we did it) • Example (how does it work) • Conclusion and results. • Future work

  32. Future work • Adding support for additional PLs • Ancient PLs – COBOL(almost done) and Fortran ?! • JUMPS are still open questions here!!! • Support for COBOL is to be tested !!! • Adding support for additional Software Metrics • For OO metrics relationships between compilation units are needed ! • Interpret calculated metric values • Represent them graphically • Interpret their meaning in order to provide useful information to the user

  33. Thank you  Hvala 

More Related