Detecting Specification Errors in Declarative Languages with Constraints

  • Ethan K. Jackson
  • Wolfram Schulte
  • Nikolaj Bjørner
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7590)


Declarative specification languages with constraints are used in model-driven engineering to specify formal semantics, define model transformations, and describe domain constraints. While these languages support concise specifications, they are nevertheless prone to difficult semantic errors. In this paper we present a type-theoretic approach to the static detection of specification errors. Our approach infers approximations of satisfying assignments and represents them via a canonical regular type system. Type inference is experimentally efficient and type judgments are comprehensible by the user.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Chang, F.S.H., Jackson, D.: Symbolic model checking of declarative relational models. In: ICSE, pp. 312–320 (2006)Google Scholar
  2. 2.
    Boronat, A., Meseguer, J.: An algebraic semantics for mof. Formal Asp. Comput. 22(3-4), 269–296 (2010)MATHCrossRefGoogle Scholar
  3. 3.
    Jackson, E.K., Levendovszky, T., Balasubramanian, D.: Reasoning about Metamodeling with Formal Specifications and Automatic Proofs. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 653–667. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  4. 4.
    Klar, F., Königs, A., Schürr, A.: Model transformation in the large. In: ESEC/SIGSOFT FSE, pp. 285–294 (2007)Google Scholar
  5. 5.
    Winkelmann, J., Taentzer, G., Ehrig, K., Küster, J.M.: Translation of restricted ocl constraints into graph constraints for generating meta model instances by graph grammars. Electr. Notes Theor. Comput. Sci. 211, 159–170 (2008)CrossRefGoogle Scholar
  6. 6.
    Horváth, Á., Varró, D.: CSP(M): Constraint Satisfaction Problem over Models. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 107–121. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  7. 7.
    Jackson, E.K., Bjørner, N., Schulte, W.: Canonical regular types. In: ICLP (Technical Communications), pp. 73–83 (2011)Google Scholar
  8. 8.
    Nieuwenhuis, R., Oliveras, A.: Fast congruence closure and extensions. Inf. Comput. 205(4), 557–580 (2007)MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    de Moura, L.M., Bjørner, N.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  10. 10.
    Dart, P.W., Zobel, J.: A Regular Type Language for Logic Programs. In: Types in Logic Programming, pp. 157–187. MIT Press (1992)Google Scholar
  11. 11.
    Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. ACM Trans. Program. Lang. Syst. 27(1), 46–90 (2005)CrossRefGoogle Scholar
  12. 12.
    Gallagher, J.P., Puebla, G.: Abstract Interpretation over Non-deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs. In: Adsul, B., Ramakrishnan, C.R. (eds.) PADL 2002. LNCS, vol. 2257, pp. 243–261. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  13. 13.
    Cousot, P., Cousot, R.: Abstract Interpretation and Application to Logic Programs. J. Log. Program. 13(2&3), 103–179 (1992)MathSciNetMATHCrossRefGoogle Scholar
  14. 14.
    Benzaken, V., Castagna, G., Frisch, A.: CDuce: an XML-centric general-purpose language. In: Runciman, C., Shivers, O. (eds.) ICFP, pp. 51–63. ACM (2003)Google Scholar
  15. 15.
    Aiken, A., Murphy, B.R.: Implementing Regular Tree Expressions. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 427–447. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  16. 16.
    Aït-Kaci, H., Podelski, A.: Towards a Meaning of LIFE. J. Log. Program 16(3), 195–234 (1993)MATHCrossRefGoogle Scholar
  17. 17.
    Frisch, A., Castagna, G., Benzaken, V.: Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types. J. ACM 55(4) (2008)Google Scholar
  18. 18.
    Schäfer, M., de Moor, O.: Type inference for datalog with complex type hierarchies. In: POPL, pp. 145–156 (2010)Google Scholar
  19. 19.
    Fruhwirth, T., Shapiro, E., Vardi, M., Yardeni, E.: Logic programs as types for logic programs. In: LICS 1991, pp. 300–309 (1991)Google Scholar
  20. 20.
    Hermenegildo, M.V., Puebla, G., Bueno, F., López-García, P.: Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor). Sci. Comput. Program. 58(1-2), 115–140 (2005)MATHCrossRefGoogle Scholar
  21. 21.
    Chen, L., Miné, A., Wang, J., Cousot, P.: An Abstract Domain to Discover Interval Linear Equalities. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 112–128. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Ethan K. Jackson
    • 1
  • Wolfram Schulte
    • 1
  • Nikolaj Bjørner
    • 1
  1. 1.Microsoft ResearchRedmondUSA

Personalised recommendations