Skip to main content
Log in

BOLD: an ontology-based log debugger for C programs

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Program debugging is often an ad hoc activity, with a combination of manual and semi-automated processing. A challenge posed by debugging is the lack of standardized procedures for instrumenting, representing, and analyzing the execution trace. Further, debugging is often low level, getting into the nitty-gritty details of variables and their semantics—rather than at a high-level. The presence of libraries only exacerbates these issues. We propose BOLD, an Ontology-based Log Debugger, to unify various activities involved in the debugging of sequential C programs. The syntactical information of programs can be represented as Resource Description Framework (RDF) triples. BOLD automatically instruments programs by querying these triples. It represents the execution trace of the program also as RDF triples called trace triples. BOLD’s novel high-level reasoning abstracts these triples as spans. A span gives a way of examining the values of a particular variable over certain portions of the program execution. The properties of the spans are defined formally as a Web Ontology Language ontology. A developer can debug a given buggy program by querying the trace triples and reasoning with the spans. To empirically assess BOLD, we debugged the programs in standard Software-artifact Infrastructure Repository. Experiments related to debugging through automated reasoning show improvement in conciseness of the developers’ specifications and run time performance of BOLD compared to gdb-Python.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Notes

  1. BOLD utilizes the com.google.common.collect.HashBasedTable API to implement the hash index.

  2. BOLD utilizes the java.util.TreeMap API to implement the RB tree.

  3. https://drive.google.com/file/d/1wAvoShkJz5MX_Mj2wd8NAuT4XyZWxdeh/view?usp=sharing.

  4. The source code is available at https://github.com/dileepkp/OntoDebugger

References

  • (2021 (accessed)) GCC macros. https://gcc.gnu.org/onlinedocs/cpp/Macros.html, accessed: 2021-03-18

  • (2021 (accessed)) UndoDB man page. https://docs.undo.io/, accessed: 2021-03-18

  • Abreu, R., Zoeteweij, P., Gemund, A.J.C.v.: An evaluation of similarity coefficients for software fault localization. In: Proceedings of the 12th Pacific Rim International Symposium on Dependable Computing, IEEE Computer Society, USA, PRDC ’06, pp. 39–46, (2006) https://doi.org/10.1109/PRDC.2006.18

  • Antoniou, G., van Harmelen, F.: Web Ontology Language: OWL, Springer Berlin Heidelberg, pp. 67–92. Handbook on Ontologies, (2004). https://doi.org/10.1007/978-3-540-24750-0_4

  • Ashburner, M., Ball, C.A., Blake, J.A., Botstein, D., Butler, H., Cherry, J.M., Davis, A.P., Dolinski, K., Dwight, S.S., Eppig, J.T., Harris, M.A., Hill, D.P., Issel-Tarver, L., Kasarskis, A., Lewis, S., Matese, J.C., Richardson, J.E., Ringwald, M., Rubin, G.M., Sherlock, G.: Gene ontology: tool for the unification of biology. the gene ontology consortium. Nat. Genet. 25, 25–29 (2000). https://doi.org/10.1038/75556

    Article  Google Scholar 

  • Atzeni, M., Atzori, M.: CodeOntology: RDF-ization of Source Code. In: International Semantic Web Conference (2017)

  • Auguston, M., Jeffery, C., Underwood, S.: A framework for automatic debugging. In: Proceedings 17th IEEE International Conference on Automated Software Engineering,, pp. 217–222 (2002). https://doi.org/10.1109/ASE.2002.1115015

  • Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, New York, NY, USA (2003)

    MATH  Google Scholar 

  • Bates, P.C.: Debugging heterogeneous distributed systems using event-based models of behavior. ACM Trans. Comput. Syst. 13(1), 1–31 (1995). https://doi.org/10.1145/200912.200913

    Article  MathSciNet  Google Scholar 

  • Berners-Lee, T., Hendler, J., Lassila, O., et al.: The semantic web. Sci. Am. 284(5), 28–37 (2001)

    Article  Google Scholar 

  • Bizer, C., Heath, T., Berners-Lee, T.: Linked data - the story so far. Int. J. Seman. Web Inf. Syst. (IJSWIS) 5(3), 1–22 (2009)

    Article  Google Scholar 

  • Brickley, D. (ed). RDF vocabulary description language 1.0: RDF Schema (2004)

  • Cao, Q., Abdelzaher, T., Stankovic, J., Whitehouse, K., Luo, L.: Declarative tracepoints: A programmable and application independent debugging system for wireless sensor networks. In: Proceedings of the 6th ACM Conference on Embedded Network Sensor Systems, Association for Computing Machinery, New York, NY, USA, SenSys ’08, pp. 85–98 (2008). https://doi.org/10.1145/1460412.1460422

  • Dean, M. (ed). OWL Web Ontology Language. 1.0 reference. World Wide Web Consortium (W3C) (2003)

  • Devanbu, P.T., Brachman, R.J., Selfridge, P.G., Ballard, B.W.: LaSSIE:a Knowledge-based Software Information System. In: Proceedings of the 12th International Conference on Software Engineering, IEEE Computer Society Press, Los Alamitos, CA, USA, pp. 249–261 (1990)

  • Do, H., Elbaum, S., Rothermel, G.: Supporting controlled experimentation with testing techniques: an infrastructure and its potential impact. Empirical Softw. Eng. 10(4), 405–435 (2005). https://doi.org/10.1007/s10664-005-3861-2

    Article  Google Scholar 

  • Ducassé, M.: Coca: A debugger for C based on fine grained control flow and data events. In: International Conference on Software Engineering 1998 (1998)

  • Eberhart, A., Argawal, S.: SmartAPI - Associating Ontologies and APIs for RAD. In: Proceedings of Modellierung (2004)

  • Engblom, J.: A review of reverse debugging. In: Proceedings of the 2012 System, Software, SoC and Silicon Debug Conference, pp 1–6 (2012)

  • Engblom, J., Aarno, D., Werner, B.: Full-System Simulation from Embedded to High-Performance Systems, Springer US, Boston, MA, pp 25–45 (2010). https://doi.org/10.1007/978-1-4419-6175-4_3

  • Ernst, M.D., Cockrell, J., Griswold, W.G., Notkin, D.: Dynamically discovering likely program invariants to support program evolution. IEEE Trans. Softw. Eng. 27(2), 99–123 (2001). https://doi.org/10.1109/32.908957

    Article  Google Scholar 

  • Ganapathi, G., Lourdusamy, R., Rajaram, V.: Towards ontology development for teaching programming language. In: Proceedings of the World Congress on Engineering 2011, WCE 2011 (3) (2011)

  • Gao, Q., Zhang, H., Wang, J., Xiong, Y., Zhang, L., Mei, H.: Fixing recurring crash bugs via analyzing Q&A sites. In: Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering, IEEE Press, ASE ’15, pp. 307–318 (2015). https://doi.org/10.1109/ASE.2015.81

  • Geimer, M., Shende, S.S., Malony, A.D., Wolf, F.: A generic and configurable source-code instrumentation component. In: Allen, G., Nabrzyski, J., Seidel, E., van Albada, G.D., Dongarra, J., Sloot, P.M.A. (eds.) Computational Science - ICCS 2009, pp. 696–705. Springer, Berlin Heidelberg, Berlin, Heidelberg (2009)

    Chapter  Google Scholar 

  • Goldsmith, S.F., O’Callahan, R., Aiken, A.: Relational queries over program traces. In: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, ACM, New York, NY, USA, OOPSLA ’05, pp. 385–402 (2005). https://doi.org/10.1145/1094811.1094841

  • Happel, H.J., Seedorf, S., Informatik, F.F., Mannheim, U.: Applications of ontologies in software engineering. In: In 2nd SWESE, held at the 5th International Semantic Web Conference (2006)

  • Hofer, C., Denker, M., Ducasse, S.: Design and implementation of a backward-in-time debugger. In: NODe/GSEM (2006)

  • Horrocks, I., Patel-Schneider, P.F., Bechhofer, S., Tsarkov, D.: OWL Rules: A proposal and prototype implementation. J. Web Seman. (2005). https://doi.org/10.1016/j.websem.2005.05.003

    Article  Google Scholar 

  • IMOP team. IMOP compiler infrastructure. https://github.com/amannougrahiya/imop-compiler, accessed: 2021-03-18 (2020)

  • Jones, J.A., Harrold, M.J., Stasko, J.: Visualization of test information to assist fault localization. In: Proceedings of the 24th International Conference on Software Engineering, Association for Computing Machinery, New York, NY, USA, International Conference on Software Engineering ’02, pp. 467–477 (2002). https://doi.org/10.1145/581339.581397

  • Kempf, T., Karuri, K., Gao, L.: Software Instrumentation, American Cancer Society, pp. 1–11 (2008). https://doi.org/10.1002/9780470050118.ecse386, https://onlinelibrary.wiley.com/doi/abs/10.1002/9780470050118.ecse386,

  • Kernighan, B.W., Pike, R.: The Practice of Programming. Addison-Wesley Longman Publishing Co., Inc, Boston, MA, USA (1999)

  • Khoo, Y.P., Foster, J.S., Hicks, M.: Expositor: Scriptable time-travel debugging with first-class traces. In: Proceedings of the 2013 International Conference on Software Engineering, IEEE Press, Piscataway, NJ, USA, International Conference on Software Engineering ’13, pp. 352–361 (2013). http://dl.acm.org/citation.cfm?id=2486788.2486835

  • Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP’97 - European Conference on Object-Oriented Programming, pp. 220–242. Springer, Berlin Heidelberg (1997)

  • Kim, D., Nam, J., Song, J., Kim, S.: Automatic patch generation learned from human-written patches. In: Proceedings of the 2013 International Conference on Software Engineering, IEEE Press, International Conference on Software Engineering ’13, pp. 802–811 (2013)

  • Kim, S., Pan, K., Whitehead, E.E.J.: Memories of bug fixes. In: Proceedings of the 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Association for Computing Machinery, New York, NY, USA, SIGSOFT ’06/FSE-14, pp. 35–45 (2006). https://doi.org/10.1145/1181775.1181781

  • Klyne, G. (ed)., Resource Description Framework (RDF): Concepts and Abstract Syntax. 1.0 reference (2004)

  • Köb, D., Wotawa, F.: Introducing alias information into model-based debugging. In: Proceedings of the 16th European Conference on Artificial Intelligence, IOS Press, NLD, ECAI’04, pp. 833–837 (2004)

  • Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: Genprog: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012). https://doi.org/10.1109/TSE.2011.104

    Article  Google Scholar 

  • Lefebvre, G., Cully, B., Head, C., Spear, M., Hutchinson, N., Feeley, M., Warfield, A.: Execution mining. In: Proceedings of the 8th ACM SIGPLAN/SIGOPS Conference on Virtual Execution Environments, ACM, New York, NY, USA, VEE ’12, pp. 145–158 (2012). https://doi.org/10.1145/2151024.2151044

  • Lewis, B.: Debugging backwards in time. Computing Research Repository cs.SE/0310016 (2003)

  • Li, H., Oh, J., Oh, H., Lee, H.: Automated source code instrumentation for verifying potential vulnerabilities. In: Hoepman, J.H., Katzenbeisser, S. (eds.) ICT Systems Security and Privacy Protection, pp. 211–226. Springer International Publishing, Cham (2016)

    Chapter  Google Scholar 

  • Mahrenholz, D., Spinczyk, O., Schroder-Preikschat, W.: Program instrumentation for debugging and monitoring with aspectc++. In: Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002, 249–256 (2002). https://doi.org/10.1109/ISORC.2002.1003713

  • Malone, J., Brown, A., Lister, A.L., Ison, J., Hull, D., Parkinson, H., Stevens, R.: The Software Ontology (SWO): a resource for reproducibility in biomedical data analysis, curation and digital preservation. J. Biomed. Seman. 5(1), 25 (2014)

    Article  Google Scholar 

  • Manola, F., Miller, E. (eds). RDF primer, 1.0 reference, vol 10 (2004)

  • Marceau, G., Cooper, G.H., Spiro, J.P., Krishnamurthi, S., Reiss, S.P.: The design and implementation of a dataflow language for scriptable debugging. Autom. Softw. Eng. 14(1), 59–86 (2007). https://doi.org/10.1007/s10515-006-0003-z

    Article  Google Scholar 

  • Marshall, D., Martinez, J., Graff, E., Schonning, N.: Time travel debugging - sample app walkthrough. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-walkthrough, accessed: 2021-03-18 (2020)

  • Martin, M., Livshits, B., Lam, M.S.: Finding application errors and security flaws using PQL: A Program Query Language. In: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, ACM, New York, NY, USA, OOPSLA ’05, pp. 365–383 (2005). https://doi.org/10.1145/1094811.1094840

  • Mateis, C., Stumptner, M., Wotawa, F.: Modeling Java programs for diagnosis. In: Proceedings of the 14th European Conference on Artificial Intelligence, IOS Press, NLD, ECAI’00, pp. 171–175 (2000)

  • Mayer, W., Stumptner, M.: Debugging program loops using approximate modeling. In: Proceedings of the 16th European Conference on Artificial Intelligence, IOS Press, NLD, ECAI’04, pp. 843–847 (2004)

  • Mayer, W., Stumptner, M., Wieland, D., Wotawa, F.: Can AI help to improve debugging substantially? debugging experiences with value-based models. In: Proceedings of the 15th European Conference on Artificial Intelligence, IOS Press, NLD, ECAI’02, pp. 417–421 (2002)

  • Mohr, B., Malony, A.D., Shende, S., Wolf, F.: Design and prototype of a performance tool interface for OpenMP. J. Supercomput. 23(1), 105–128 (2002). https://doi.org/10.1023/A:1015741304337

    Article  MATH  Google Scholar 

  • Motik, B., Sattler, U., Studer, R.: Query answering for OWL-DL with rules. Web Semant. 3(1), 41–60 (2005). https://doi.org/10.1016/j.websem.2005.05.001

    Article  Google Scholar 

  • Motik, B., Grau, B.C., Horrocks, I., Wu, Z., Fokoue, A., Lutz, C., et al.: OWL 2 Web Ontology Language profiles. W3C recommendation. 1.0 reference 27:61 (2009)

  • Naish, L., Lee, H.J., Ramamohanarao, K.: A model for spectra-based software diagnosis. ACM Trans. Softw. Eng. Methodol. (2011). https://doi.org/10.1145/2000791.2000795

    Article  Google Scholar 

  • Nguyen, T.T., Nguyen, H.A., Pham, N.H., Al-Kofahi, J., Nguyen, T.N.: Recurring bug fixes in object-oriented programs. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, Association for Computing Machinery, New York, NY, USA, International Conference on Software Engineering ’10, pp. 315–324 (2010). https://doi.org/10.1145/1806799.1806847

  • Olsson, R.A., Crawford, R.H., Ho, W.W.: A dataflow approach to event-based debugging. Softw. Pract. Exp. 21(2), 209–229 (1991). https://doi.org/10.1002/spe.4380210207

    Article  Google Scholar 

  • Palit, A.K., Popovic, D.: Computational Intelligence in Time Series Forecasting: Theory and Engineering Applications (Advances in Industrial Control). Springer-Verlag, Berlin, Heidelberg (2005)

    MATH  Google Scholar 

  • Pattipati, D.K., Nasre, R., Puligundla, S.K.: Opal: an extensible framework for ontology-based program analysis. Softw. Pract. Exp. 50(8), 1425–1462 (2020). https://doi.org/10.1002/spe.2821

    Article  Google Scholar 

  • Pearl, J.: Causality: Models, Reasoning and Inference, 2nd edn. Cambridge University Press, USA (2009)

    Book  Google Scholar 

  • Planning, S.: The economic impacts of inadequate infrastructure for software testing. RTI Project Number 7007.011. National Institute of Standards and Technology (2002)

  • Pothier, G., Tanter, E., Piquer, J.: Scalable omniscient debugging. In: Proceedings of the 22Nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications, ACM, New York, NY, USA, OOPSLA ’07, pp. 535–552 (2007). https://doi.org/10.1145/1297027.1297067

  • Prud’hommeaux, E., Seaborne, A. (eds). SPARQL Query Language for RDF. W3C Recommendation. 1.0 reference . Accessed: 2021-03-18 (2008)

  • Schordan, M., Quinlan, D.: A source-to-source architecture for user-defined optimizations. In: Böszörményi, L., Schojer, P. (eds.) Modular Programming Languages, pp. 214–223. Springer, Berlin Heidelberg (2003)

    Chapter  Google Scholar 

  • Sirin, E., Parsia, B., Grau, B.C., Kalyanpur, A., Katz, Y.: Pellet: A practical OWL-DL reasoner. Web Semant 5(2), 51–53 (2007). https://doi.org/10.1016/j.websem.2007.03.004

    Article  Google Scholar 

  • Sosnovsky, S., Gavrilova, T.: Development of educational ontology for C-programming. Int. J. Inf. Theories Appl. 13, 303–308 (2006)

    Google Scholar 

  • Templer, K.S., Jeffery, C.L.: A configurable automatic instrumentation tool for ANSI C. In: Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No.98EX239), pp. 249–258 (1998). https://doi.org/10.1109/ASE.1998.732663

  • Tenorth, M., Beetz, M.: KNOWROB: Knowledge Processing for Autonomous Personal Robots. In: Proceedings of the 2009 IEEE/RSJ International Conference on Intelligent Robots and Systems, IEEE Press, Piscataway, NJ, USA, IROS’09, 4261–4266 (2009). URL http://dl.acm.org/citation.cfm?id=1732643.1732745

  • Vessey, I.: Expertise in debugging computer programs: An analysis of the content of verbal protocols. IEEE Trans. Syst. Man Cybern. 16(5), 621–637 (1986)

    Article  Google Scholar 

  • Visan, A.M., Arya, K., Cooperman, G., Denniston, T.: URDB: A Universal Reversible DeBugger based on decomposing debugging histories. In: PLOS ’11 (2011)

  • Wong, W.E., Gao, R., Li, Y., Abreu, R., Wotawa, F.: A survey on software fault localization. IEEE Trans. Software Eng. 42(8), 707–740 (2016)

    Article  Google Scholar 

  • Wotawa, F., Stumptner, M., Mayer, W.: Model-based debugging or how to diagnose programs automatically. In: Proceedings of the 15th International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems: Developments in Applied Artificial Intelligence, Springer-Verlag, Berlin, Heidelberg, IEA/AIE ’02, pp 746–757 (2002)

  • Zhao, Y., Chen, G., Liao, C., Shen, X.: Towards Ontology-Based Program Analysis. In: Krishnamurthi S, Lerner BS (eds) 30th ECOOP, LIPIcs, vol 56, 26:1–26:25 (2016)

Download references

Funding

The funding was provided by Ministry of Human Resource Development (IN).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dileep Kumar Pattipati.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Pattipati, D.K., Nasre, R. & Puligundla, S.K. BOLD: an ontology-based log debugger for C programs. Autom Softw Eng 29, 2 (2022). https://doi.org/10.1007/s10515-021-00308-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-021-00308-8

Keywords

Navigation