Solving linear constraints on finite domains through parsing

  • Miguel Filgueiras
  • Ana Paula Tomás
Part of the Lecture Notes in Computer Science book series (LNCS, volume 541)


In this paper we present results from ongoing research which allows the use of parsing methods to solve a particular kind of constraints, namely linear constraints on finite domains. Solving this kind of constraints is equivalent to solving systems of linear Diophantine equations on a finite subset of the naturals. We associate, to such a system, a definite-clause grammar that can be used to enumerate its solutions, and define a class of grammars, the connected grammars, for which the set of successful derivations covers the set of non-negative solutions of the associated system. This definition is based on a study of cycles in context-free grammars using compiler construction concepts and techniques.


Linear Constraint Derivation Tree Finite Domain Reducible Graph Back Edge 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Aho et al. 1986]
    Alfred V. Aho, R. Sethi and J. D. Ullman, Compilers — Principles, Techniques and Tools. Addison-Wesley, 1986.Google Scholar
  2. [Boudet et al. 1990]
    Alexandre Boudet, E. Contejean and H. Devie, A new AC Unification algorithm with an algorithm for solving systems of Diophantine equations. In Proceedings of the 5th Conference on Logic and Computer Science, IEEE, 1990.Google Scholar
  3. [Bradley 1970]
    Gordon Bradley, Algorithm and Bound for the Greatest Common Divisor of n Integers, Comm. ACM, 13(7), 1970.Google Scholar
  4. [Chou and Collins 1982]
    Tsu-Wu J. Chou and G. E. Collins, Algorithms for the solution of systems of linear Diophantine equations. SIAM J. Comput., 11(4), 687–708, 1982.Google Scholar
  5. [Cohen 1990]
    Jacques Cohen, Constraint Logic Programming Languages. Comm. ACM, 33(7), 1990.Google Scholar
  6. [Colmerauer 1987]
    Alain Colmerauer, Opening the Prolog III Universe. Byte, 12(9), 1987.Google Scholar
  7. [Dincbas et al. 1988]
    M. Dincbas, P. van Hentenryck, H. Simonis, A. Aggoun, T. Graf, F. Berthier, The constraint Logic Programming language CHIP. In Proceedings of the International Conference on Fifth Generation Computer Systems, ICOT, 1988.Google Scholar
  8. [Filgueiras 1990]
    Miguel Filgueiras, Systems of Linear Diophantine Equations and Logic Grammars, Centro de Informática da Universidade do Porto, 1990.Google Scholar
  9. [Filgueiras and Tomás 1990]
    Miguel Filgueiras, Ana Paula Tomás, Relating Grammar Derivations and Systems of Linear Diophantine Equations. Centro de Informática da Universidade do Porto, 1990.Google Scholar
  10. [Greenberg 1971]
    H. Greenberg, Integer Programming, Academic Press, 1971.Google Scholar
  11. [Guckenbiehl and Herold 1985]
    Thomas Guckenbiehl and A. Herold, Solving Linear Diophantine Equations. Memo SEKI-85-IV-KL, Universität Kaiserslautern, 1985.Google Scholar
  12. [Haas 1989]
    Andrew Haas, A parsing algorithm for Unification Grammar. Computational Linguistics, 15(4), 1989.Google Scholar
  13. [Hopcroft and Ullman 1969]
    John E. Hopcroft and J. D. Ullman, Formal Languages and Their Relation to Automata. Addison-Wesley, 1969.Google Scholar
  14. [Huet 1978]
    Gérard Huet, An algorithm to generate the basis of solutions to homogeneous linear Diophantine equations. Information Processing Letters, 7(3), 1978.Google Scholar
  15. [Jaffar et al. 1986]
    Joxan Jaffar, J.-L. Lassez and M. Maher, Logic Programming language scheme. In D. DeGroot and G. Lindstrom (eds.), Logic Programming: Functions, Relations, and Equations, Prentice-Hall, 1986.Google Scholar
  16. [Jaffar and Lassez 1987]
    Joxan Jaffar and J.-L. Lassez, Constraint Logic Programming. In Proceedings of the 14th POPL Conference, 1987.Google Scholar
  17. [Mitra et al. 1970]
    G. Mitra, D. B. C. Richards and K. Wolfenden, An improved algorithm for the solution of integer programs by the solution of associated Diophantine equations. R.I.R.O., 1970.Google Scholar
  18. [Pereira and Warren 1980]
    F. Pereira and D. H. D. Warren, Definite Clause Grammars for language analysis — a survey of the formalism and a comparison with Augmented Transition Networks. Artificial Intelligence, 13, 1980.Google Scholar
  19. [Pottier 1990]
    Loïc Pottier, Solutions Minimales des Systèmes Diophantiens Linéaires: Bornes et Algorithmes. Rapport de Recherche no. 1292, I.N.R.I.A., 1990.Google Scholar
  20. [Tomás and Filgueiras 1991a]
    A. P. Tomás and M. Filgueiras, A New Method for Solving Linear Constraints on the Natural Numbers. This volume.Google Scholar
  21. [Tomás and Filgueiras 1991b]
    A. P. Tomás and M. Filgueiras, A Congruence-based Method for Finding the Basis of Solutions to Linear Diophantine Equations. Centro de Informática da Universidade do Porto, 1991.Google Scholar
  22. [van Hentenryck 1989]
    P. van Hentenryck, Constraint Satisfaction in Logic Programming, MIT Press, 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Miguel Filgueiras
    • 1
  • Ana Paula Tomás
    • 1
  1. 1.Centro de InformáticaUniversidade do PortoPortoPortugal

Personalised recommendations