Implementing and Testing a Formal Framework for Constraint-Based Routing over Scale-free Networks Stefano Bistarelli Dipartimento di Matematica e Informatica Universit` a di Perugia, Via Vanvitelli 1, Perugia, Italy bista@dipmat.unipg.it Francesco Santini IMT Istituto di Studi Avanzati Piazza San Ponziano 6, Lucca, Italy f.santini@imtlucca.it Abstract We propose a formal model to represent and solve the Constraint-Based Routing problem in networks. To attain this, we model the network adapting it to a weighted or graph (unicast delivery) or and-or graph (multicast deliv- ery), where the weight on a connector corresponds to the cost of sending a packet on the network link modelled by that connector. We use the Soft Constraint Logic Pro- gramming (SCLP) framework as a convenient declarative programming environment in which to solve the routing problem. In particular, we show how the semantics of an SCLP program computes the best route in the correspond- ing graph. The costs on the connectors can be described also as vectors (multidimensional costs), with each com- ponent representing a different Quality of Service metric value. At last, we provide an implementation of the frame- work over scale-free networks with the ECLiPSe program- ming environment, and we present the obtained results. Keywords: Constraint-Based Routing, Quality of Ser- vice, Scale-free Networks, Soft Constraint Logic Program- ming. 1 Introduction Towards the second half of the nineties, Internet En- gineering Task Force (IETF) and the research community have proposed many models and mechanisms to meet the demand for network Quality of Service (QoS). The classical routing problem has consequently been extended to include and to guarantee the QoS [35]: QoS routing [35, 15] de- notes a class of routing algorithms that base path selection * Partially supported by Istituto di Informatica e Telematica (IIT-CNR) Pisa, and Dipartimento di Scienze, Universit` a “G. d’Annunzio”, Pescara, Italy. decisions on a set of QoS requirements or constraints, in ad- dition to the destination. As defined in [15], QoS is a set of service requirements to be met by the network while trans- porting a flow. Service requirements have to be expressed in some measurable metric, such as bandwidth, number of hops, delay, jitter, cost and loss probability of packets. In this paper we propose a formal framework based on Soft Constraint Logic Programming (SCLP) [4, 6] in which it is possible to represent and solve QoS-Routing [9] (and CBR in general). First, we will describe how to represent a network configuration in a corresponding or graph (for the unicast delivery scheme) or and-or graph (for multi- cast), mapping network nodes to graph nodes and links to graph connectors. In the following, we will generally use the term and-or graph, or simply graph. QoS link costs will be translated into multidimensional costs for the asso- ciated connectors. Afterwards, we will propose the SCLP framework [4, 6] as a convenient declarative programming environment in which to specify and solve such problem. SCLP programs are an extension of usual Constraint Logic Programming (CLP) programs where logic programming is used in conjunction with soft constraints, that is, con- straints which can be satisfied at a certain level. In partic- ular, we will show how to represent an and-or graph as an SCLP program, and how the semantics of such a program computes the best route the corresponding weighted and-or graph (with route we will consider both multicast tree and unicast paths). SCLP is based on the general structure of c-semiring (or simply semiring), having the two operations × and +: the × is used to combine the costs, while the par- tial order defined by + operation (see Section 3), is used to compare the costs. Notice that the cartesian product of two semirings is a semiring [7], and this can be fruitfully used to describe multi-criteria problems. In Section 6, we will sug- gest an implementation of the proposed framework to re- ally test the performance on scale-free networks generated ad-hoc. In scale-free networks some nodes act as “highly 13 International Journal On Advances in Networks and Services, vol 2 no 1, year 2009, http://www.iariajournals.org/networks_and_services/