Abstract
This paper helps reduce the cost of invariant checking in cases where access to data is expensive. Assume that a set of variables satisfy a given invariant and a request is received to update a subset of them. We reduce the set of variables to inspect, in order to verify that the invariant is still satisfied. We present a formal model of this scenario, based on a simple query language for the expression of invariants that covers the core of a realistic query language. We present an algorithm which simplifies a representation of the invariant, along with a mechanically verified proof of correctness. We also investigate the underlying invariant checking problem in general and show that it is co-NP hard, i.e., that solutions must be approximations to remain tractable. We have seen a factor of thirty performance improvement using this algorithm in a case study.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: A modular reusable verifier for object-oriented programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 364–387. Springer, Heidelberg (2006)
Barnett, M., Leino, K.R.M., Schulte, W.: The spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development – Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. An EATCS Series, vol. XXV. Springer (2004)
Blakeley, J.A., Coburn, N., Larson, P.-Å.: Updating derived relations: Detecting irrelevant and autonomously computable updates. ACM Trans. Database Syst. 14(3), 369–400 (1989)
Blaustein, B.T.: Enforcing database assertions: Techniques and applications. Number 21-81. Thesis, Ph.D (1981)
Böckenhauer, H.-J., Hromkovič, J., Mömke, T., Widmayer, P.: On the hardness of reoptimization. In: Geffert, V., Karhumäki, J., Bertoni, A., Preneel, B., Návrat, P., Bieliková, M. (eds.) SOFSEM 2008. LNCS, vol. 4910, pp. 50–65. Springer, Heidelberg (2008)
Bry, F., Manthey, R., Martens, B.: Integrity verification in knowledge bases. In: Voronkov, A. (ed.) RCLP 1990 and RCLP 1991. LNCS, vol. 592, pp. 114–139. Springer, Heidelberg (1992)
Chalin, P., Kiniry, J.R., Leavens, G.T., Poll, E.: Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 342–363. Springer, Heidelberg (2006)
Cook, S.A.: The complexity of theorem-proving procedures. In: Proceedings of the Third Annual ACM Symposium on Theory of Computing, STOC 1971, pp. 151–158. ACM (1971)
Cordy, J.R., Halpern-Hamu, C.D., Promislow, E.: TXL: a rapid prototyping system for programming language dialects. Comput. Lang. 16(1), 97–107 (1991)
de Moura, L., Bjørner, N.S.: Z3: An efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)
Elkan, C.: Independence of logic database queries and updates. In: Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Nashville, Tennessee, April 2-4, pp. 154–160. ACM Press (1990)
Gomes, C.P., Kautz, H., Sabharwal, A., Selman, B.: Chapter 2 satisfiability solvers. In: van Harmelen, V.L.F., Porter, B. (eds.) Handbook of Knowledge Representation. Foundations of Artificial Intelligence, vol. 3, pp. 89–134. Elsevier (2008)
Gupta, A., Sagiv, Y., Ullman, J.D., Widom, J.: Constraint checking with partial information. In: Proceedings of the Thirteenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Minneapolis, Minnesota, May 24-26, pp. 45–55. ACM Press (1994)
Gupta, A., Widom, J.: Local verification of global integrity constraints in distributed databases. In: SIGMOD Conference, pp. 49–58. ACM Press (1993)
Hammer, M., Sarin, S.K.: Efficient monitoring of database assertions (abstract). In: Lowenthal, E.I., Dale, N.B. (eds.) Proceedings of the 1978 ACM SIGMOD International Conference on Management of Data, Austin, Texas, May 31-June 2, p. 159. ACM (1978)
Hsu, A., Imielinski, T.: Integrity checking for multiple updates. In: Proceedings of the 1985 ACM SIGMOD International Conference on Management of Data, SIGMOD 1985, pp. 152–168. ACM (1985)
Ibrahim, H.: Checking integrity constraints - how it differs in centralized, distributed and parallel databases. In: 17th International Workshop on Database and Expert Systems Applications, DEXA 2006, pp. 563–568 (2006)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial evaluation and automatic program generation. Prentice Hall international series in computer science. Prentice Hall (1993)
Leavens, G.T., Poll, E., Clifton, C., Cheon, Y., Ruby, C., Cok, D., Kiniry, J.: JML reference manual (June 30, 2004)
Levy, A.Y., Sagiv, Y.: Queries independent of updates. In: Proceedings of the 19th International Conference on Very Large Data Bases, Dublin, Ireland, August 24-27, pp. 171–181 (1993)
Nicolas, J.-M.: Logic for improving integrity checking in relational data bases. Acta Inf. 18, 227–253 (1982)
Tompa, F.W., Blakeley, J.A.: Maintaining materialized views without accessing base data. Information Systems 13(4), 393–406 (1988)
Truemper, K.: Design of Logic-based Intelligent Systems. Wiley-Interscience publication, John Wiley & Sons (2004)
Vyatkin, V.: Event-driven traversal of logic circuits for re-evaluation of boolean functions in reactive systems. In: Broy, M., Zamulin, A.V. (eds.) PSI 2003. LNCS, vol. 2890, pp. 319–328. Springer, Heidelberg (2004)
Wos, L., Carson, D., Robinson, G.: The unit preference strategy in theorem proving. In: Proceedings of the Fall Joint Computer Conference, Part I, AFIPS 1964 (Fall, Part I), October 27-29, pp. 615–621. ACM (1964)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thomsen, J.G., Clausen, C., Andersen, K.J., Danaher, J., Ernst, E. (2013). Reducing Lookups for Invariant Checking. In: Castagna, G. (eds) ECOOP 2013 – Object-Oriented Programming. ECOOP 2013. Lecture Notes in Computer Science, vol 7920. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39038-8_18
Download citation
DOI: https://doi.org/10.1007/978-3-642-39038-8_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39037-1
Online ISBN: 978-3-642-39038-8
eBook Packages: Computer ScienceComputer Science (R0)