# ARCHITECTURAL DESIGN VIA DECLARATIVE PROGRAMMING

### Luís Moniz Pereira, Ruben Duarte Viegas

#### Abstract

Problem solving by declarative theory building can be an extremely effective method for porting concepts and knowledge from the problem domain to the solution domain, by allowing the implementation of complete procedural constructs and enabling to produce sound solutions. If conveniently expressed, such a theory may be directly coded into a declarative programming language. If expressed within the paradigm of logic programming, then the theory itself represents the very procedure to obtain its desired solutions. The illustrative case study considered here is the obtention of architectural layouts from an adjacency graph: Given a list of imposed adjacencies among a set of planar rectangular spaces (represented by the graph’s nodes), the goal is to generate all permissible layouts schemas on the plane which respect the adjacencies, and to determine the minimal modular dimensions of such a set of spaces. Another aim of this article is also to show the guidelines of an effective translation of the theory constructed to solve the proposed problem in Logic Programming, making use of the combined power of two different semantics and their implementations, namely the Well Founded Semantics and the Stable Models one.

#### References

- Gelder, A. V., Ross, K. A., and Schlipf, J. S. (1991). The well-founded semantics for general logic programs. Journal of the ACM, 38(3):620-650.
- Pereira, L. M. (1974). Layout Schemes From Adjacency Graphs - a case study in problem solving by theory building. PhD thesis, Brunel University UK, published by Laboratório Nacional de Engenharia Civil (LNEC) Lisbon.
- Pereira, L. M. (1978). Artificial intelligence techniques in automatic layout design. In Artificial Intelligence and Pattern Recognition in Computer Aided Design, pages 159-173. North-Holland.
- Pereira, L. M., Alferes, J. J., and Damásio, C. (1992). The sidetracking meta-principle. Simpósio Brasileiro de Inteligeˆncia Artificial, pages 229-242.
- Pereira, L. M. and Pinto, A. (2005a). Implementing the revised stable models - an ASP-based approach. Submitted to Annals of Mathematics and Artificial Intelligence.
- Pereira, L. M. and Pinto, A. M. (2005b). Revised stable models - a semantics for logic programs. In Progress in Artificial Intelligence - Procs. 12th Portuguese Intl. Conf. on Artificial Intelligence (EPIA'05), LNAI 3808, pages 29-42. Springer.
- XASP (2005). XASP: Answer set programming with XSBProlog. http://xsb.sourceforge.net/packages/xasp.pdf.

#### Paper Citation

#### in Harvard Style

Moniz Pereira L. and Duarte Viegas R. (2007). **ARCHITECTURAL DESIGN VIA DECLARATIVE PROGRAMMING** . In *Proceedings of the Ninth International Conference on Enterprise Information Systems - Volume 2: ICEIS,* ISBN 978-972-8865-89-4, pages 363-369. DOI: 10.5220/0002346503630369

#### in Bibtex Style

@conference{iceis07,

author={Luís Moniz Pereira and Ruben Duarte Viegas},

title={ARCHITECTURAL DESIGN VIA DECLARATIVE PROGRAMMING},

booktitle={Proceedings of the Ninth International Conference on Enterprise Information Systems - Volume 2: ICEIS,},

year={2007},

pages={363-369},

publisher={SciTePress},

organization={INSTICC},

doi={10.5220/0002346503630369},

isbn={978-972-8865-89-4},

}

#### in EndNote Style

TY - CONF

JO - Proceedings of the Ninth International Conference on Enterprise Information Systems - Volume 2: ICEIS,

TI - ARCHITECTURAL DESIGN VIA DECLARATIVE PROGRAMMING

SN - 978-972-8865-89-4

AU - Moniz Pereira L.

AU - Duarte Viegas R.

PY - 2007

SP - 363

EP - 369

DO - 10.5220/0002346503630369