Skip to main content
Log in

General past-time linear temporal logic specification mining

  • Regular Paper
  • Published:
CCF Transactions on High Performance Computing Aims and scope Submit manuscript

Abstract

Specification mining is an automated or semi-automated process for inferring models or properties from computer programs or systems and is a useful way to aid program understanding, monitoring, and verification. There have been many works on mining various forms of specifications, of which mining for temporal logic specifications is becoming increasingly interesting, as temporal logic is capable of formally describing and reasoning about software behaviors in terms of temporal order. Several approaches have been proposed to mine linear temporal logic (LTL) specifications. But compared to LTL, past-time linear temporal logic (PTLTL) enables specifying many system behaviors in more natural forms, such as a specification \(G(a \rightarrow Ob)\) stating “Once event a happens, another event b must have happened before it”, which is much more intuitive than the equivalent LTL specification \(\lnot ((\lnot b)\ U\ (a \wedge \lnot b))\) for users and easier to check because of its shorter form. In this paper, we propose a general approach to mining PTLTL specifications. In addition, we present a cache strategy and a parallel strategy to make it faster and more scalable. We implement a tool named Past Time Linear Temporal Logic Miner (PTLM) and evaluate it. The result is encouraging.

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

Similar content being viewed by others

References

  • Acharya, M., Xie, T., Pei, J., Xu, J.: Mining API patterns as partial orders from source code: from usage scenarios to specifications. In: I. Crnkovic, A. Bertolino (eds.) Proceedings of the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2007, Dubrovnik, Croatia, September 3–7, 2007, pp. 25–34. ACM (2007). https://doi.org/10.1145/1287624.1287630

  • Agrawal, R., Srikant, R.: Mining sequential patterns. In: P.S. Yu, A.L.P. Chen (eds.) Proceedings of the Eleventh International Conference on Data Engineering, March 6–10, 1995, Taipei, Taiwan, pp. 3–14. IEEE Computer Society (1995) https://doi.org/10.1109/ICDE.1995.380415

  • Ammons, G., Bodík, R., Larus, J.R.: Mining specifications. In: Conference Record of POPL 2002: The 29th SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, OR, USA, January 16–18, 2002, pp. 4–16 (2002). https://doi.org/10.1145/503272.503275

  • Ammons, G., Mandelin, D., Bodík, R., Larus, J.R.: Debugging temporal specifications with concept analysis. In: R. Cytron, R. Gupta (eds.) Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation 2003, San Diego, California, USA, June 9–11, 2003, pp. 182–195. ACM (2003). https://doi.org/10.1145/781131.781152

  • Baier, C., Katoen, J.: Principles of Model Checking. MIT Press, New York (2008)

    MATH  Google Scholar 

  • Bertasi, M., Guglielmo, G.D., Pravadelli, G.: Automatic generation of compact formal properties for effective error detection. In: Proceedings of the International Conference on Hardware/Software Codesign and System Synthesis, CODES+ISSS 2013, Montreal, QC, Canada, September 29–October 4, 2013, pp. 28:1–28:10. IEEE (2013). https://doi.org/10.1109/CODES-ISSS.2013.Bertasi2013

  • Bonato, M., Guglielmo, G.D., Fujita, M., Fummi, F., Pravadelli, G.: Dynamic property mining for embedded software. In: A. Jerraya, L.P. Carloni, N. Chang, F. Fummi (eds.) Proceedings of the 10th International Conference on Hardware/Software Codesign and System Synthesis, CODES+ISSS 2012, part of ESWeek ’12 Eighth Embedded Systems Week, Tampere, Finland, October 7–12, 2012, pp. 187–196. ACM (2012). https://doi.org/10.1145/2380445.2380479

  • Bovet, J., Parr, T.: Antlrworks: an ANTLR grammar development environment. Softw. Pract. Exp. 38(12), 1305–1332 (2008). https://doi.org/10.1002/spe.872

    Article  Google Scholar 

  • Cook, J.E., Wolf, A.L.: Automating process discovery through event-data analysis. In: D.E. Perry, R. Jeffrey, D. Notkin (eds.) 17th International Conference on Software Engineering, Seattle, Washington, USA, April 23–30, 1995, Proceedings., pp. 73–82. ACM (1995). https://doi.org/10.1145/225014.225021

  • Cook, J.E., Wolf, A.L.: Discovering models of software processes from event-based data. ACM Trans. Softw. Eng. Methodol. 7(3), 215–249 (1998). https://doi.org/10.1145/287000.287001

    Article  Google Scholar 

  • Dwyer, M.B., Avrunin, G.S., Corbett, J.C.: Patterns in property specifications for finite-state verification. In: B.W. Boehm, D. Garlan, J. Kramer (eds.) Proceedings of the 1999 International Conference on Software Engineering, ICSE’ 99, Los Angeles, CA, USA, May 16–22, 1999, pp. 411–420. ACM (1999)

  • Emerson, E.A.: Temporal and modal logic. In: Formal Models and Semantics, pp. 995–1072. Elsevier, Amsterdam (1990)

    MATH  Google Scholar 

  • Erlikh, L.: Leveraging legacy system dollars for e-business. IT Professional 2(3), 17–23 (2000)

    Article  Google Scholar 

  • 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 

  • Gabbay, D.: Executable temporal logic for interactive systems. Dept. of Computing, Imperial College, London (Manuscript) (1986)

  • Gabel, M., Su, Z.: Javert: fully automatic mining of general temporal properties from dynamic traces. In: M.J. Harrold, G.C. Murphy (eds.) Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2008, Atlanta, Georgia, USA, November 9–14, 2008, pp. 339–349. ACM (2008a). https://doi.org/10.1145/1453101.1453150

  • Gabel, M., Su, Z.: Symbolic mining of temporal specifications. In: W. Schäfer, M.B. Dwyer, V. Gruhn (eds.) 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany, May 10–18, 2008, pp. 51–60. ACM (2008b). https://doi.org/10.1145/1368088.1368096

  • Gastin, P., Oddoux, D.: LTL with past and two-way very-weak alternating automata. In: B. Rovan, P. Vojtás (eds.) Mathematical Foundations of Computer Science 2003, 28th International Symposium, MFCS 2003, Bratislava, Slovakia, August 25–29, 2003, Proceedings, Lecture Notes in Computer Science, vol. 2747, pp. 439–448. Springer (2003). https://doi.org/10.1007/978-3-540-45138-9_38

  • Huth, M., Ryan, M.D.: Logic in Computer Science—Modelling and Reasoning about Systems, 2. Cambridge University Press, Cambridge (2004)

    Book  Google Scholar 

  • Kamp, J.A.W.: Tense Logic and the Theory of Linear Order. University of California, Los Angeles (1968)

    Google Scholar 

  • Laroussinie, F., Markey, N., Schnoebelen, P.: Temporal logic with forgettable past. In: 17th IEEE Symposium on Logic in Computer Science (LICS 2002), 22–25 July 2002, Copenhagen, Denmark, Proceedings, pp. 383–392. IEEE Computer Society (2002). https://doi.org/10.1109/LICS.2002.1029846

  • Lemieux, C., Park, D., Beschastnikh, I.: General LTL specification mining (T). In: 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015, Lincoln, NE, USA, November 9–13, 2015, pp. 81–92 (2015). https://doi.org/10.1109/ASE.2015.71

  • Li, W., Forin, A., Seshia, S.A.: Scalable specification mining for verification and diagnosis. In: S.S. Sapatnekar (ed.) Proceedings of the 47th Design Automation Conference, DAC 2010, Anaheim, California, USA, July 13–18, 2010, pp. 755–760. ACM (2010). https://doi.org/10.1145/1837274.1837466

  • Lichtenstein, O., Pnueli, A., Zuck, L.D.: The glory of the past. In: R. Parikh (ed.) Logics of Programs, Conference, Brooklyn College, June 17–19, 1985, Proceedings, Lecture Notes in Computer Science, vol. 193, pp. 196–218. Springer (1985). https://doi.org/10.1007/3-540-15648-8_16

  • Livshits, V.B., Zimmermann, T.: Dynamine: finding common error patterns by mining software revision histories. In: M. Wermelinger, H.C. Gall (eds.) Proceedings of the 10th European Software Engineering Conference held jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2005, Lisbon, Portugal, September 5–9, 2005, pp. 296–305. ACM (2005). https://doi.org/10.1145/1081706.1081754

  • Lo, D., Khoo, S.: Smartic: towards building an accurate, robust and scalable specification miner. In: M. Young, P.T. Devanbu (eds.) Proceedings of the 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2006, Portland, Oregon, USA, November 5–11, 2006, pp. 265–275. ACM (2006). https://doi.org/10.1145/1181775.1181808

  • Lo, D., Maoz, S., Khoo, S.: Mining modal scenario-based specifications from execution traces of reactive systems. In: R.E.K. Stirewalt, A. Egyed, B. Fischer (eds.) 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE 2007), November 5–9, 2007, Atlanta, Georgia, USA, pp. 465–468. ACM (2007). https://doi.org/10.1145/1321631.1321710

  • Lo, D., Khoo, S., Liu, C.: Mining past-time temporal rules from execution traces. In: B. Liblit, A. Rountev (eds.) Proceedings of the 2008 International Workshop on Dynamic Analysis: held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2008), WODA 2008, Seattle, Washington, USA, July 21, 2008, pp. 50–56. ACM (2008a). https://doi.org/10.1145/1401827.1401838

  • Lo, D., Khoo, S., Liu, C.: Mining temporal rules for software maintenance. J. Softw. Maint. 20(4), 227–247 (2008b). https://doi.org/10.1002/smr.375

    Article  Google Scholar 

  • Lo, D., Ramalingam, G., Ranganath, V.P., Vaswani, K.: Mining quantified temporal rules: formalism, algorithms, and evaluation. Sci. Comput. Program. 77(6), 743–759 (2012). https://doi.org/10.1016/j.scico.2010.10.003

    Article  MATH  Google Scholar 

  • Lorenzoli, D., Mariani, L., Pezzè, M.: Automatic generation of software behavioral models. In: W. Schäfer, M.B. Dwyer, V. Gruhn (eds.) 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany, May 10–18, 2008, pp. 501–510. ACM (2008). https://doi.org/10.1145/1368088.1368157

  • Markey, N.: Temporal logic with past is exponentially more succinct, concurrency column. Bull. EATCS 79, 122–128 (2003)

    MathSciNet  MATH  Google Scholar 

  • Markey, N.: Past is for free: on the complexity of verifying linear temporal properties with past. Acta Inf. 40(6–7), 431–458 (2004). https://doi.org/10.1007/s00236-003-0136-5

    Article  MathSciNet  MATH  Google Scholar 

  • Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science, Providence, Rhode Island, USA, 31 October–1 November 1977, pp. 46–57. IEEE Computer Society (1977). https://doi.org/10.1109/SFCS.1977.32

  • Reinbacher, T., Brauer, J., Horauer, M., Steininger, A., Kowalewski, S.: Past time LTL runtime verification for microcontroller binary code. In: G. Salaün, B. Schätz (eds.) Formal Methods for Industrial Critical Systems—16th International Workshop, FMICS 2011, Trento, Italy, August 29–30, 2011. Proceedings, Lecture Notes in Computer Science, vol. 6959, pp. 37–51. Springer (2011). https://doi.org/10.1007/978-3-642-24431-5_5

  • Reiss, S.P., Renieris, M.: Encoding program executions. In: Proceedings of the 23rd International Conference on Software Engineering, ICSE 2001, 12–19 May 2001, Toronto, Ontario, Canada, pp. 221–230 (2001). https://doi.org/10.1109/ICSE.2001.919096

  • Robillard, M.P., Bodden, E., Kawrykow, D., Mezini, M., Ratchford, T.: Automated API property inference techniques. IEEE Trans. Softw. Eng. 39(5), 613–637 (2013). https://doi.org/10.1109/TSE.2012.63

    Article  Google Scholar 

  • Spiliopoulou, M.: Managing interesting rules in sequence mining. In: J.M. Zytkow, J. Rauch (eds.) Principles of Data Mining and Knowledge Discovery, Third European Conference, PKDD ’99, Prague, Czech Republic, September 15–18, 1999, Proceedings, Lecture Notes in Computer Science, vol. 1704, pp. 554–560. Springer (1999). https://doi.org/10.1007/978-3-540-48247-5_73

  • Thummalapenta, S., Xie, T.: Mining exception-handling rules as sequence association rules. In: 31st International Conference on Software Engineering, ICSE 2009, May 16–24, 2009, Vancouver, Canada, Proceedings, pp. 496–506. IEEE (2009). https://doi.org/10.1109/ICSE.2009.5070548

  • van der Aalst, W.M.P., de Beer, H.T., van Dongen, B.F.: Process mining and verification of properties: An approach based on temporal logic. In: R. Meersman, Z. Tari, M. Hacid, J. Mylopoulos, B. Pernici, Ö. Babaoglu, H. Jacobsen, J.P. Loyall, M. Kifer, S. Spaccapietra (eds.) On the Move to Meaningful Internet Systems 2005: CoopIS, DOA, and ODBASE, OTM Confederated International Conferences CoopIS, DOA, and ODBASE 2005, Agia Napa, Cyprus, October 31–November 4, 2005, Proceedings, Part I, Lecture Notes in Computer Science, vol. 3760, pp. 130–147. Springer (2005). https://doi.org/10.1007/11575771_11

  • Weimer, W., Necula, G.C.: Mining temporal specifications for error detection. In: N. Halbwachs, L.D. Zuck (eds.) Tools and Algorithms for the Construction and Analysis of Systems, 11th International Conference, TACAS 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4–8, 2005, Proceedings, Lecture Notes in Computer Science, vol. 3440, pp. 461–476. Springer (2005). https://doi.org/10.1007/978-3-540-31980-1_30

  • Yan, X., Han, J., Afshar, R.: Clospan: Mining closed sequential patterns in large databases. In: D. Barbará, C. Kamath (eds.) Proceedings of the Third SIAM International Conference on Data Mining, San Francisco, CA, USA, May 1–3, 2003, pp. 166–177. SIAM (2003). https://doi.org/10.1137/1.9781611972733.15

  • Yang, J., Evans, D., Bhardwaj, D., Bhat, T., Das, M.: Perracotta: mining temporal API rules from imperfect traces. In: L.J. Osterweil, H.D. Rombach, M.L. Soffa (eds.) 28th International Conference on Software Engineering (ICSE 2006), Shanghai, China, May 20–28, 2006, pp. 282–291. ACM (2006). https://doi.org/10.1145/1134325

Download references

Acknowledgements

This work is partially supported by Shanghai Science and Technology Committee Rising-Star Program (No. 18QB1402000), Shanghai Municipal Economic and Informatization Commission Project (2018-GYHLW-02012), Science and Technology Commission of Shanghai Municipality Project (No. 18ZR1411600), Fundamental Research Funds for the Central Universities.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yanhong Huang.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Shi, J., Xiong, J. & Huang, Y. General past-time linear temporal logic specification mining. CCF Trans. HPC 3, 393–406 (2021). https://doi.org/10.1007/s42514-021-00079-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s42514-021-00079-4

Keywords

Navigation