Abstract
At universities, some fields of study offer multiple branches to graduate in. These branches are defined by mandatory and optional courses. Configuring a branch manually can be a difficult task, especially if some courses have already been attended. Hence, a tool providing guidance on choosing courses is desired. Feature models enable modelling such behaviour, as they are designed to define valid configurations from a set of features. Unfortunately, the branches contain constraints instructing to choose at least k out of n courses in essence. Encoding some of these constraints naïvely in propositional calculus is practically infeasible. We develop a new encoding by combining existing approaches. Furthermore, we report on our experience of encoding the constraints of the computer science master at TU Braunschweig and discuss the impact for research on configurability.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Apel, S., Batory, D., Kästner, C., Saake, G.: Feature-Oriented Software Product Lines (2013)
Bailleux, O., Boufkhad, Y.: Efficient CNF encoding of boolean cardinality constraints. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 108–122. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45193-8_8
Batory, D.: Feature models, grammars, and propositional formulas. In: Obbink, H., Pohl, K. (eds.) SPLC 2005. LNCS, vol. 3714, pp. 7–20. Springer, Heidelberg (2005). https://doi.org/10.1007/11554844_3
Benavides, D., Segura, S., Ruiz-Cortés, A.: Automated analysis of feature models 20 years later: a literature review. Inf. Syst. 35(6), 615–708 (2010)
Chen, J.: A new SAT encoding of the at-most-one constraint. In: Proceedings of the Constraint Modelling and Reformulation (2010)
Czarnecki, K., Helsen, S., Eisenecker, U.: Formalizing cardinality-based feature models and their specialization. Softw. Process: Improv. Pract. 10, 7–29 (2005)
Czarnecki, K., Kim, C.H.P.: Cardinality-based feature modeling and constraints: a progress report, pp. 16–20 (2005)
Frisch, A.M., Giannaros, P.A.: SAT encodings of the at-most-k constraint. some old, some new, some fast, some slow. In: Proceedings of the Ninth International Workshop of Constraint Modelling and Reformulation (2010)
Frisch, A.M., Peugniez, T.J.: Solving non-boolean satisfiability problems with stochastic local search. In: IJCAI, vol. 2001, pp. 282–290 (2001)
Frisch, A.M., Peugniez, T.J., Doggett, A.J., Nightingale, P.W.: Solving non-boolean satisfiability problems with stochastic local search: a comparison of encodings. J. Autom. Reason. 35(1–3), 143–179 (2005). https://doi.org/10.1007/s10817-005-9011-0
Günther, T.: Explaining satisfiability queries for software product lines. Master’s thesis, Braunschweig (2017). https://doi.org/10.24355/dbbs.084-201711171100. https://publikationsserver.tu-braunschweig.de/receive/dbbs_mods_00065308
Klieber, W., Kwon, G.: Efficient CNF encoding for selecting 1 from n objects. In: Proceedings of the International Workshop on Constraints in Formal Verification (2007)
Krieter, S., et al.: FeatureIDE: empowering third-party developers, pp. 42–45 (2017). https://doi.org/10.1145/3109729.3109751
Krieter, S., Thüm, T., Schulze, S., Schröter, R., Saake, G.: Propagating configuration decisions with modal implication graphs, pp. 898–909, May 2018. https://doi.org/10.1145/3180155.3180159
Kučera, P., Savický, P., Vorel, V.: A lower bound on CNF encodings of the at-most-one constraint. In: Gaspers, S., Walsh, T. (eds.) SAT 2017. LNCS, vol. 10491, pp. 412–428. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66263-3_26
Mannion, M.: Using first-order logic for product line model validation, pp. 176–187 (2002)
Meinicke, J., Thüm, T., Schröter, R., Benduhn, F., Leich, T., Saake, G.: Mastering Software Variability with FeatureIDE. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-61443-4
Mendonça, M.: Efficient reasoning techniques for large scale feature models. Ph.D. thesis, University of Waterloo, Canada (2009)
Sinz, C.: Towards an optimal CNF encoding of boolean cardinality constraints. In: van Beek, P. (ed.) CP 2005. LNCS, vol. 3709, pp. 827–831. Springer, Heidelberg (2005). https://doi.org/10.1007/11564751_73
Thüm, T., Apel, S., Kästner, C., Schaefer, I., Saake, G.: Analysis strategies for software product lines: a classification and survey, pp. 57–58, Gesellschaft für Informatik (GI), Bonn, Germany, March 2015
Wiegand, J., et al.: Eclipse: a platform for integrating development tools. IBM Syst. J. 43(2), 371–383 (2004)
Acknowledgements
We thank Moritz Kappel, Chico Sundermann, Timo Günther, Marc Kassubeck, Jan-Philipp Tauscher, and Moritz Mühlhausen for reviewing our paper in the earlier stages. Additional thanks go to the SEFM reviewers for giving very detailed and constructive remarks.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Bittner, P.M., Thüm, T., Schaefer, I. (2019). SAT Encodings of the At-Most-k Constraint. In: Ölveczky, P., Salaün, G. (eds) Software Engineering and Formal Methods. SEFM 2019. Lecture Notes in Computer Science(), vol 11724. Springer, Cham. https://doi.org/10.1007/978-3-030-30446-1_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-30446-1_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-30445-4
Online ISBN: 978-3-030-30446-1
eBook Packages: Computer ScienceComputer Science (R0)