Abstract
In recent years, research efforts have been directed towards the use of Machine Learning (ML) techniques to support and automate activities such as specification mining, risk assessment, program analysis, and program repair. The focus has largely been on the use of machine learning black box methods whose inference mechanisms are not easily interpretable and whose outputs are not declarative and guaranteed to be correct. Hence, they cannot readily be used to inform the elaboration and revision of declarative software models identified to be incorrect or incomplete. On the other hand, recent advances in ML have witnessed the emergence of new logic-based machine learning approaches that overcome such limitations and which have been proven to be well-suited for many software engineering tasks. In this chapter, we present a survey of the state-of-the-art of logic-based machine learning techniques, highlight their expressivity, define their different underlying semantics, and discuss their efficiency and the heuristics they adopt to guide the search for solutions. We then demonstrate the application of this type of machine learning to (declarative) specification refinement and revision as a complementary task to program analysis.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This follows the standard Occam’s razor principle for which simpler hypotheses are better.
- 2.
We omit a full definition of an abductive algorithm as this would fall outside the scope of this chapter. The reader is referred to [20] for further details.
- 3.
The parameter \(\textit{max}^{h}_{i}\) is included as variables in a body literal can either be from input variables in the head literal or output variables in other body literals, giving \(\textit{max}^{h}_{i} + \textit{max}_{o} \times (d-1)\) as the total number of variables that can serve as a inputs to a body literal.
- 4.
We focus here on specifications with a single stable model.
References
Clausal discovery. Mach. Learn. 26, 99–146 (1997)
Gebser, M., et al.: Potassco: the Potsdam answer set solving collection. AI Commun. 24, 107–124 (2011)
Alrajeh, D., Kramer, J., Russo, A., Uchitel, S.: Learning operational requirements from goal models. In: 31st International Conference on Software Engineering, ICSE 2009, Vancouver, Canada, Proceedings, 16–24 May 2009, pp. 265–275 (2009)
Alrajeh, D., Kramer, J., Russo, A., Uchitel, S.: Elaborating requirements using model checking and inductive learning. IEEE Trans. Softw. Eng. 39(3), 361–383 (2013). https://doi.org/10.1109/TSE.2012.41
Alrajeh, D., Russo, A., Uchitel, S.: Inferring operational requirements from scenarios and goal models using inductive learning. In: Proceedings of the 2006 International Workshop on Scenarios and State Machines: Models, Algorithms, and Tools, pp. 29–36 (2006)
Apt, K.R., Bol, R.: Logic programming and negation: a survey. J. Log. Program. 19, 9–71 (1994)
Asteasuain, F., Braberman, V.: Declaratively building behavior by means of scenario clauses. Requir. Eng. 1–36 (2016). https://doi.org/10.1007/s00766-015-0242-2
Athakravi, D., Corapi, D., Broda, K., Russo, A.: Learning through hypothesis refinement using answer set programming. In: Zaverucha, G., Santos Costa, V., Paes, A. (eds.) ILP 2013. LNCS (LNAI), vol. 8812, pp. 31–46. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44923-3_3
Athakravi, D.: Inductive logic programming using bounded hypothesis space. Ph.D. thesis, Imperial College London (2015)
Attie, P., Cherri, A., Bab, K.D.A., Sakr, M., Saklawi, J.: Model and program repair via sat solving. In: 2015 ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMOCODE), pp. 148–157 (2015)
Baral, C.: Knowledge representation, reasoning and declarative problem solving. Cambridge University Press (2003)
Cavezza, D.G., Alrajeh, D.: Interpolation-based GR(1) assumptions refinement. In: Legay, A., Margaria, T. (eds.) TACAS 2017. LNCS, vol. 10205, pp. 281–297. Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-54577-5_16
Challagulla, V., et al.: Empirical assessment of machine learning based software defect prediction techniques. Int. J. Artif. Intell. Tools 17, 389–400 (2008)
Clarke, E., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement for symbolic model checking. J. ACM 50(5), 752–794 (2003)
Cohen, W.W.: Inductive specification recovery: understanding software by learning from example behaviors. Autom. Softw. Eng. 2(2), 107–129 (1995)
Corapi, D., Russo, A., Lupu, E.: Inductive logic programming as abductive search. In: Technical Communications of the 26th International Conference on Logic Programming, Schloss Dagstuhl Leibniz-Zentrum fuer Informatik, vol. 2010, pp. 54–63 (2010)
Corapi, D., Russo, A., Lupu, E.: Inductive logic programming in answer set programming. In: Muggleton, S.H., Tamaddoni-Nezhad, A., Lisi, F.A. (eds.) ILP 2011. LNCS (LNAI), vol. 7207, pp. 91–97. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31951-8_12
Corapi, D.: Nonmonotonic inductive logic programming as abductive search. Ph.D. thesis, Imperial College London (2011)
David, C., Kroening, D., Lewis, M.: Using program synthesis for program analysis. In: Davis, M., Fehnker, A., McIver, A., Voronkov, A. (eds.) LPAR 2015. LNCS, vol. 9450, pp. 483–498. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48899-7_34
Denecker, M., Schreye, D.: SLDNFA: an abductive procedure for abductive logic programs. J. Log. Program. 34(2), 111–167 (1998)
Ding, Z., Zhou, Y., Zhou, M.: Modeling self-adaptive software systems with learning petri nets. IEEE Trans. Syst. Man Cybern. Syst. 46(4), 483–498 (2016)
Fenton, N., et al.: On the effectiveness of early life cycle defect prediction with Bayesian nets. Empir. Softw. Eng. 13, 499–537 (2008)
Flach, P., Lavrač, N.: Learning in clausal logic: a perspective on inductive logic programming. In: Kakas, A.C., Sadri, F. (eds.) Computational Logic: Logic Programming and Beyond. LNCS (LNAI), vol. 2407, pp. 437–471. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45628-7_17
Fürnkranz, J., Hüllermeier, E.: Pairwise preference learning and ranking. In: Lavrač, N., Gamberger, D., Blockeel, H., Todorovski, L. (eds.) ECML 2003. LNCS (LNAI), vol. 2837, pp. 145–156. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-39857-8_15
Athakravi, D., Alrajeh, D., Broda, K., Russo, A., Satoh, K.: Inductive learning using constraint-driven bias. In: Davis, J., Ramon, J. (eds.) ILP 2014. LNCS (LNAI), vol. 9046, pp. 16–32. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23708-4_2
Gabel, M., Su, Z.: Symbolic mining of temporal specifications. In: 2008 ACM/IEEE 30th International Conference on Software Engineering, pp. 51–60 (2008). https://doi.org/10.1145/1368088.1368096
Gabel, M., Su, Z.: Testing mined specifications. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, pp. 4:1–4:11 (2012). https://doi.org/10.1145/2393596.2393598
Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. pp. 1070–1080. MIT Press, Cambridge (1988)
Greenyer, J., Gritzner, D., Glade, N., Gutjahr, T., König, F.: Scenario-based specification of car-to-x systems. In: Gemeinsamer Tagungsband der Workshops der Tagung Software Engineering 2016 (SE 2016), Wien, 23–26 February 2016, pp. 118–123 (2016)
Gulwani, S., et al.: Inductive programming meets the real world. Commun. ACM 58(11), 90–99 (2015)
Gulwani, S., Jha, S., Tiwari, A., Venkatesan, R.: Synthesis of loop-free programs. SIGPLAN Not. 46(6), 62–73 (2011)
Harman, M.: The role of artificial intelligence in software engineering. In: Proceedings of the 1st International Workshop on Realizing AI Synergies in Software Engineering (2012)
Horvath, T.: A model of user preference learning for content-based recommender systems. Comput. Inform. 28(4), 453–481 (2012)
Lifschitz, L.: What is answer set programming? In: AAAI, pp. 1594–1597 (2008)
Jackson, M.: The meaning of requirements. Ann. Softw. Eng. 3, 5–21 (1997). http://dl.acm.org/citation.cfm?id=590564.590577
Kimber, T., Broda, K., Russo, A.: Induction on failure: learning connected horn theories. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS (LNAI), vol. 5753, pp. 169–181. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04238-6_16
Kowalski, B., Satoh, K.: Obligation as optimal goal satisfaction. J. Philos. Log. 1–31 (2017)
Kowalski, R., Kuehner, D.: Linear resolution with selection function. Artif. Intell. 2, 227–260 (1971)
Kowalski, R., Sergot, M.: A logic-based calculus of events. New Gener. Comput. 4(1), 67–95 (1986)
van Lamsweerde, A.: Requirements Engineering: From System Goals to UML Models to Software Specifications. Wiley, Hoboken (2009)
Law, M., Russo, A., Broda, K.: Learning weak constraints in answer set programming. TPLP 15, 511–525 (2015)
Law, M., Russo, A., Broda, K.: The complexity and generality of learning answer set programs. Artif. Intell. 259, 110–146 (2018)
Le Goues, C., et al.: A systematic study of automated program repair: fixing 55 out of 105 bugs for $8 each. In: Proceedings of the 34th International Conference on Software Engineering, pp. 3–13 (2012)
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)
Letier, E., Lamsweerde, A.V.: Deriving operational software specifications from system goals. In: Proceedings of 10th ACM FSE Symposium, pp. 119–128 (2002)
Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987). https://doi.org/10.1007/978-3-642-83189-8
Lo, D., Khoo, S.C., Liu, C.: Mining temporal rules for software maintenance. J. Softw. Maint. Evol. Res. Pract. 20(4), 227–247 (2008)
Long, F., Rinard, M.: Automatic patch generation by learning correct code. SIGPLAN Not. 51(1), 298–312 (2016)
Lorenzoli, D., Mariani, L., Pezzè, M.: Automatic generation of software behavioral models. In: Proceedings of the 13th international conference on Software engineering (2008). https://doi.org/10.1145/1368088.1368157, http://portal.acm.org/citation.cfm?doid=1368088.1368157
Turliuc, C.R., Dickens, L., Russo, A., Broda, K.: Probabilistic abductive logic programming using Dirichlet priors. Int. J. Approx. Reason. 78, 223–240 (2016)
Markitanis, A., et al.: Learning user behaviours in real mobile domains. In: Latest Advances in Inductive Logic Programming, pp. 43–51. Imperial College Press (2015)
Menzies, T.: Practical machine learning for software engineering and knowledge engineering. In: Handbook of Software Engineering and Knowledge Engineering (2001)
Minker, J.: An overview of nonmonotonic reasoning and logic programming. J. Log. Program. Spec. Issue 17, 95–126 (1993)
Moyle, S.: Using theory completion to learn a robot navigation control program. In: Matwin, S., Sammut, C. (eds.) ILP 2002. LNCS (LNAI), vol. 2583, pp. 182–197. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-36468-4_12
Muggleton, S.: Inverse entailment and progol. New Gener. Comput. Spec. issue Inductive Log. Program. 13, 245–286 (1995)
Muggleton, S., Feng, C.: Efficient induction of logic programs. In: ALT (1990)
Muggleton, S.: Inductive logic programming. New Gener. Comput. 8(4), 295–318 (1991). https://doi.org/10.1007/BF03037089
Muggleton, S.: Inverse entailment and progol. New Gener. Comput. 13(3&4), 245–286 (1995). https://doi.org/10.1007/BF03037227
Nienhuys-Cheng, S., de Wolf, R.: Foundations of Inductive Logic Programming. LNAI, vol. 1228. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-62927-0
Nuffelen, B.V.: Abductive constraint logic programming: implementation and applications. Ph.D. thesis, K.U. Leuven (2004)
Plotkin, G.: A note on inductive generalization. Mach. Intell. 5, 153–163 (1969)
Plotkin, G.: A further note on inductive generalization. Mach. Intell. 6, 101–124 (1971)
Pople, H.: In the mechanization of abductive logic. In: Proceedings of the 3rd International Joint Conference on Artificial Intelligence, pp. 147–152 (1973)
Păsăreanu, C.S., Giannakopoulou, D., Bobaru, M.G., Cobleigh, J.M., Barringer, H.: Learning to divide and conquer: applying the l* algorithm to automate assume-guarantee reasoning. Form. Methods Syst. Des. 32(3), 175–205 (2008)
Quinlan, J.R., Cameron-Jones, R.M.: Induction of logic programs: foil and related systems. New Gener. Comput. 13, 287–312 (1995)
De Raedt, L., Kersting, K.: Probabilistic inductive logic programming. In: Ben-David, S., Case, J., Maruoka, A. (eds.) ALT 2004. LNCS (LNAI), vol. 3244, pp. 19–36. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30215-5_3
Ray, O.: Nonmonotonic abductive inductive learning. J. Appl. Log. 7, 329–340 (2009)
Ray, O., Broda, K., Russo, A.: A hybrid abductive inductive proof procedure. Log. J. IGPL 12(5), 371–397 (2004)
Ray, O.: Automated abduction in scientific discovery. In: Magnani, L., Li, P. (eds.) Model-Based Reasoning in Science, Technology, and Medicine. SCI, vol. 64, pp. 103–116. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71986-1_5
Sakama, C., Inoue, K.: Brave induction: a logical framework for learning from incomplete information. Mach. Learn. 76(1), 3–35 (2009)
Sankaranarayanan, S., Ivančić, F., Gupta, A.: Mining library specifications using inductive logic programming. In: Proceedings of the 30th International Conference on Software Engineering, pp. 131–140 (2008)
Shapiro, E.Y.: An algorithm that infers theories from facts. In: Proceedings of the 7th International Joint Conference on Artificial Intelligence, vol. 1, pp. 446–451 (1981)
Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., Saraswat, V.: Combinatorial sketching for finite programs. SIGOPS Oper. Syst. Rev. 40(5), 404–415 (2006)
Sutcliffe, A., Maiden, N.A.M., Minocha, S., Manuel, D.: Supporting scenario-based requirements engineering. IEEE TSE J. 24, 1072–1088 (1998)
Weimer, W., Nguyen, T., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: Proceedings of the 31st International Conference on Software Engineering, ICSE 2009, pp. 364–374. IEEE Computer Society, Washington, DC (2009)
Wrobel, S.: First order theory refinement. In: Advances in Inductive Logic Programming, pp. 14–33 (1996)
Yamamoto, A.: Which hypotheses can be found with inverse entailment? In: Lavrač, N., Džeroski, S. (eds.) ILP 1997. LNCS, vol. 1297, pp. 296–308. Springer, Heidelberg (1997). https://doi.org/10.1007/3540635149_58
Acknowledgement
We would like to acknowledge Duangtida Athakravi, Krysia Broda, Domenico Corapi, Tim Kimber, Jeff Kramer, Jiefei Ma, Oliver Ray and Sebastián Uchitel for their contributions to the material presented in this Chapter.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Alrajeh, D., Russo, A. (2018). Logic-Based Learning: Theory and Application. In: Bennaceur, A., Hähnle, R., Meinke, K. (eds) Machine Learning for Dynamic Software Analysis: Potentials and Limits. Lecture Notes in Computer Science(), vol 11026. Springer, Cham. https://doi.org/10.1007/978-3-319-96562-8_9
Download citation
DOI: https://doi.org/10.1007/978-3-319-96562-8_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-96561-1
Online ISBN: 978-3-319-96562-8
eBook Packages: Computer ScienceComputer Science (R0)