We extend the setting of Satisfiability Modulo Theories (SMT) by introducing a theory of costs C, where it is possible to model and reason about resource consumption and multiple cost functions, e.g., battery, time, and space. We define a decision procedure that has all the features required for the integration withint the lazy SMT schema: incrementality, backtrackability, construction of conflict sets, and deduction. This naturally results in an SMT solver for the disjoint union of C and any other theory T . This framework has two important applications. First, we tackle the problem of Optimization Modulo Theories: rather than checking the existence of a satisfying assignment, as in SMT, we require a satisfying assignment that minimizes a given cost function. We build on the decision problem for SMT with costs, i.e., finding a satisfying assigniment with cost within an admissibility range, and propose two algorithms for optimization. Second, we use multiple cost functions to deal with PseudoBoolean constraints. Within the SMT(C) framework, the effectively PseudoBoolean constraints are dealt with by the cost solver, while the other constraints are reduced to pure boolean reasoning. We implemented the proposed approach within the MathSAT SMT solver, and we experimentally evaluated it on a large set of benchmarks, also from industrial applications. The results clearly demonstrate the potential of the approach.
Satisfiability Modulo the Theory of Costs: Foundations and Applications
Cimatti, Alessandro;Griggio, Alberto;Sebastiani, Roberto;
2010-01-01
Abstract
We extend the setting of Satisfiability Modulo Theories (SMT) by introducing a theory of costs C, where it is possible to model and reason about resource consumption and multiple cost functions, e.g., battery, time, and space. We define a decision procedure that has all the features required for the integration withint the lazy SMT schema: incrementality, backtrackability, construction of conflict sets, and deduction. This naturally results in an SMT solver for the disjoint union of C and any other theory T . This framework has two important applications. First, we tackle the problem of Optimization Modulo Theories: rather than checking the existence of a satisfying assignment, as in SMT, we require a satisfying assignment that minimizes a given cost function. We build on the decision problem for SMT with costs, i.e., finding a satisfying assigniment with cost within an admissibility range, and propose two algorithms for optimization. Second, we use multiple cost functions to deal with PseudoBoolean constraints. Within the SMT(C) framework, the effectively PseudoBoolean constraints are dealt with by the cost solver, while the other constraints are reduced to pure boolean reasoning. We implemented the proposed approach within the MathSAT SMT solver, and we experimentally evaluated it on a large set of benchmarks, also from industrial applications. The results clearly demonstrate the potential of the approach.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.