1 Introduction
Since photons move faster than electrons in the matter, and they dissipate lower power in the process, the new technology of silicon photonics is a great promise for smallscale ICT. It promises to provide unmatched communication bandwidth and reduced latencies with low energyperbit overhead. In recent years, remarkable advances of CMOScompatible silicon photonic components have made it possible to conceive optical links and switching fabrics for performance and power efficient communication on the silicon chip. One proposal is to have silicon photonicsenabled onchip interconnection networks implemented entirely in optics and using alltoall conflictfree communication (leveraging the principle of wavelengthselective routing).
Wavelengthrouted optical networks univocally associate the wavelength of an optical signal with a specific lightpath across the optical transport medium. They started to gain momentum in the domain of widearea networks when it became clear that the electronics inside the optical network nodes were becoming the data transmission bottleneck [Berthold et al. (2008)]. Consequently, lightpaths in wavelengthrouted networks were used to provide alloptical transmission between the source and the destination nodes [Chlamtac et al. (1992)]. This way, no opticaltoelectricaltooptical conversion and data processing were required at any intermediate node.
The recent advances of silicon photonics have raised a strong interest in using optical networks for onchip communication (Optical Networks on Chip). In this context, wavelength routing has been proposed as a way of relieving the latency and power overhead of electricallyassisted ONoC to resolve optical contention. In fact, WavelengthRouted Optical Networks on Chip are appealing as alloptical solutions for onchip communication, since they avoid any form of routing and arbitration through the selection of disjoint carrier wavelengths for initiatortarget pairs [Brière et al. (2007), Koohi et al. (2011), Tan et al. (2012)].
Switching fabrics in a wavelengthrouted ONoC are generally implemented with microring resonators [Bogaerts et al. (2012)]. These devices have a periodic transmittance characteristic, which means that they end up on resonance not only with one optical signal, but also with all those signals (if used) that are modulated on carrier wavelengths that are also resonant wavelengths of the microrings.
This issue raises a misrouting problem: one optical signal (or a significant fraction of its power) heading to a specific destination may end up being coupled onto another optical path, leading to a different destination. However, this problem has not been consistently addressed so far in ONoC literature, since the emphasis has been mainly on making the case for onchip optical communication. As a result, wavelengthrouted ONoC topologies are typically not refined with implementation details, but rather assessed by means of highlevel power macromodels. The ultimate implication is that physical parameters such as microring resonator radii and carrier wavelengths are not selected, but simply addressed by means of symbolic assignments. Hence, the misrouting concern (in this paper explicitly addressed as a routing fault) is left in the background.
The unmistakable evidence of this trend is given by the fact that whenever research teams come up with actual photonic integrated circuits of wavelengthrouted structures, the misrouting concern arises. For instance, in [Kaźmierczak et al. (2009)] a optical crossbar using wavelength routing is fabricated and tested. Since designers did not give too much importance to parameter selection during the design phase, they ended up choosing resonant peaks for their microring resonators that were not properly spaced throughout the available bandwidth. As a result, when injecting optical power on specific lightpaths, they detected significant power on unintended output ports of the device as well (an effect named optical crosstalk). Once deployed in a real system, their refined implementation may result in a misrouting fault and/or in errorprone communications, from the functional viewpoint. 4815479 consider this as a future optimization step of their work. Our research aims at bridging exactly this existing gap in wavelengthrouted ONoC literature.
In previous work [Peano et al. (2016)], we discussed the electronics and photonics design issues linked to the maximization of the parallelism in WRONoC. As explained in that paper, the optimal design was found using Answer Set Programming (ASP), a technology still not very well known in that research area. In this work, we take for granted the electronics and photonics issues and focus on the computational issues related to this hard optimization problem. We detail the ASP program used to solve the problem, and experimentally compare its performance with a
MixedInteger Linear Programming
(MILP) model. Another related problem was solved in [Nonato et al. (2017)] through a MILP formulation. In this paper, we address the same problem in another logic language, namely Constraint Logic Programming on Finite Domains (CLP(FD)), and show that the CLP(FD) formulation is competitive with MILP and that it is easier to modify.In the next section, we describe the two problems addressed in this paper. After some preliminaries (Section 3), we formalize the problem of maximizing the parallelism in a WRONoC (Section 4), then we describe the ASP program that solves such problem (Section 5). We then motivate the second problem, namely the uniform spreading of the selected resonances, and propose a CLP(FD) solution (Section 6). We show through experimental results (Section 7) that the proposed logic programming approaches have good performance with respect to mathematical programming formulations, and, finally, we conclude.
2 Problem description
In WRONoC, senders communicate with receivers; each sourcedestination pair is associated with an optical channel using a specific wavelength for the optical carrier: the information originating from one sender is routed toward the correct receiver depending on the used carrier wavelength. In the same way, each receiver is able to receive communications from each of the senders, distinguishing the correct sender through the wavelength of the carrier. For simplicity, instead of wavelength of the carrier we will often use just wavelength or carrier. Sender uses disjoint wavelengths to to communicate with receivers to , respectively; at the same time, receiver receives optical packets from senders to on different wavelengths to . More in general:

each sender uses different wavelengths to communicate with the different receivers;

each receiver receives information from different senders using different wavelengths.
Instead of using a new set of wavelengths, sender reuses the same wavelengths used by .
The communication flows of a WRONoC topology can thus be abstracted by means of a Latin Square, that is a matrix containing values such that each row and each column contains values. Each matrix value indicates the wavelength of the optical carrier that implements the communication between a specific senderreceiver pair.
The routing is done through optical devices called Photonic Switches; typical PS have two input and two output ports and have a base resonance wavelength. They consist of two microrings, and the base resonance wavelength depends on the radius of the rings. If the signal in the first input port resonates with the PS, then it is deviated toward the first output; otherwise it is passed to the second output port. The second input is treated symmetrically. A number of such devices build up a WRONoC, and various topologies have been proposed to ensure the correct routing of the information. Figure 1 shows one of such topologies, connecting four senders (A, B, C, and D) to four receivers ( to ), and using four wavelengths (). For example, if sender A uses wavelength , the signal resonates with the first PS and exits from the first output port; here it is sent to a PS that resonates with and is sent to its second output port. It then enters the first input port of a PS resonating with and is then sent to its second output port. Note that each of the four receivers can distinguish the origin of the information through the used wavelength; e.g., when senses a signal of wavelength , the sender must have been A.
It can be observed that each PS can resonate not only to its base wavelength, but also to a number of other harmonic wavelengths; Table 1 is an example of a very small instance showing the set of resonance wavelengths for different values of radii. This effect can be exploited to increase the communication parallelism, as a senderreceiver pair could communicate not only through the base wavelength but also using some of the harmonics. In such a case, the communication channel between two endpoints consists of two or more carriers, with different wavelengths, resonances of the same radius. However, it might be the case that the th harmonic of one PS could be equal (or too close) to the th harmonic of another one: in such a case the laser beam would be incorrectly deviated in the WRONoC topology, and a socalled misrouting or routing fault would occur.
In Figure 2 three possible radius values are available ; for each radius , there is a set of resonating wavelengths that can be selected as carriers. Suppose that ; this means that 2 radii must be selected (out of the 3 available). Note that ; this means that if both and are selected, wavelength cannot be selected as carrier, because it would be incorrectly routed, since it also resonates with radius . The same holds also for . Also, the wavelength is very close to ; in real settings there exist always imprecisions in the fabrication process, so it is not advisable to select wavelengths that are too close: a minimum distance should separate any two selected wavelengths.
One possible solution would be to select and ; in such a case, three wavelengths can be selected for each radius without routing faults: in fact for the set of wavelengths can be selected, while for any three wavelengths can be selected out of the four that do not conflict with : , , , and . The obtained parallelism is 3.
[nm]  [nm]  [nm]  [nm]  [nm]  [nm]  [nm]  

m  5  
m  6  
m  6  
m  7 
It is then important to select different radii, taken from the set of available radii , and for each selected radius select resonating wavelengths (taken from the set of harmonics of the radius ) such that each senderreceiver pair can use wavelengths (harmonics of the same radius) while avoiding routing faults; the objective is maximizing the number . This problem was solved in [Peano et al. (2016)] through an ASP formulation, that was only cited in that paper. In this paper, instead, we detail the ASP program in Section 5.
After finding the maximum parallelism obtainable, one has to choose a suitable solution amongst the (possibly, many) solutions providing the same optimal value of parallelism. In [Nonato et al. (2017)], it was found that the wavelengths found when solving the first problem could be unevenly spread in the available spectrum. This introduced a second problem: given and , find radii values and wavelengths ( per radius) such that the selected wavelengths are as evenly spread as possible. Such problem was solved in [Nonato et al. (2017)] with a MILP formulation. In this work, we address the same problem in another logic programming language, namely CLP(FD). We show that the CLP(FD) program is competitive in terms of performance with the MILP approach. Moreover, we found that a different formulation is more adherent to the WRONoC design problem, and that the CLP(FD) program can be easily modified to account for the revised formulation. The MILP approach, instead, must be subject to major rewriting in order to tackle this revised formulation.
The complete solution process consists of two phases: in the first, the maximum obtainable parallelism is obtained through an ASP program. The optimal value of parallelism is then provided to the second phase: a CLP(FD) program that, given a target value of parallelism, computes a set of wavelengths that 1) achieve the given parallelism level and 2) are as equally spaced as possible in the available spectrum.
3 Preliminaries
3.1 Answer Set Programming
Answer Set Programming (ASP) is a class of logic programming languages that rely on the stable model semantics [Gelfond and Lifschitz (1988)], also known as answer set semantics. We assume a basic familiarity with logic programming and its syntax; for an introduction the reader can refer to [Lloyd (1987)]. A logic program consists of a set of rules where is an atom (also called the head of the rule), and the are literals (called the body of the rule).
Literals and rules containing no variables are called ground. We denote as all possible instantiations of the rule of the program , on the basis of ground facts of the program. The ground istantiation of consists of all ground instances of rules in , i.e., . For any set of atoms from , let be the program obtained from by deleting each rule that has a negative literal in its body with and all negative literals in the bodies of the remaining rules. Since is negation free, it has a unique minimal Herbrand model. If this model coincides with , then is a Stable Model of [Gelfond and Lifschitz (1988)].
Among the dialects of ASP, we use the language of the grounder Gringo [Gebser et al. (2009)], that extends the basic logic programming syntax with a number of features.
Counting [Simons et al. (2002)]. If are atoms, and and are integers, the aggregate is true for every set of atoms including from to members of , i.e., . Trivial bounds can be omitted.
Summation. If are atoms and are integers, the aggregate is true for every set S of atoms such that the sum of over included members of is in the interval :
Usually, ASP solvers [Simons et al. (2002), Lin and Zhao (2004), Giunchiglia et al. (2006), Leone et al. (2006), Gebser et al. (2011)] work in two stages. In the first, called grounding, the program is converted into an equivalent ground program. The second stage is devoted to looking for stable models (answer sets) of the ground program.
3.2 Constraint Logic Programming on Finite Domains
Constraint Logic Programming (CLP) is a class of logic programming languages [Jaffar and Maher (1994)] that extends Prolog with the notion of constraints. Each language of the CLP class is identified with a sort; one of the most popular is CLP(FD), on the sort of Finite Domains. CLP(FD) is particularly suited to solve Constraint Satisfaction Problems. A CSP consists of a set of decision variables, each ranging on a finite domain, and subject to a set of relations called constraints. A solution to the CSP is an assignment of values taken from the domains to the respective variables, such that all the constraints are satisfied.
A Constraint Optimization Problem (COP) is a CSP with an additional objective function, that must be maximized or minimized. A solution of a COP is optimal if it satisfies all the constraints and, amongst the solutions of the CSP, it maximizes (or minimizes) the objective function.
4 Maximizing parallelism
We now give a formalization of the problem of finding the maximum parallelism. A set of possible radius values is given. For each , a set of resonance wavelengths is also given. Two wavelengths , are in conflict if for a given .
The core decisions concern which resonances should be selected for each radius. To model this decision we use the boolean variable to state whether the resonance wavelength is selected for radius . The problem can be formalized as the following COP:
(1)  
(2)  
(3)  
(4)  
(5) 
represents the number of selected resonances for radius . The objective function (1) maximizes the parallelism in the selected radius with the least parallelism, since the global network parallelism is bounded by the channel with lowest parallelism. In practice, we maximize the minimum parallelism that can be sustained by all of the wavelength channels. Constraints (2) define the number of selected elements in row . Constraints (3) define whether the radius is selected () or not (). Constraint (4) imposes to select exactly radii. Finally, Constraints (5) prevent routing faults; they are imposed for each and such that is conflicting with some resonance in radius .
Consider, for example, the instance in Table 1, suppose that , i.e., three radii must be selected, and , i.e., two wavelengths are in conflict only if they are identical. One solution is to select radii 2, 3, and 4, i.e., and (satisfying constraint 4). Notice that in Table 1 for all values of . From constraint 5, selecting such wavelength for some radius (e.g., for radius 2, i.e. ) means that all other radii must not be selected: contradiction. Thus clearly for all radii . Also, , so by constraint (5), they cannot be selected, since both radii 2 and 4 are selected. All other wavelengths can be selected; i.e. is a possible assignment. We have that , , and . The minimum of the notnull is , that is also the value of the objective function for this assignment.
5 An ASP program to compute maximum WRONoC parallelism
The ASP program takes as input an instance provided with facts
expressing the fact that the radius resonates at the wavelength ; due to variations in temperature and other uncertainties, the actual wavelength might change, with a maximum deviation , i.e., in the range .
Predicate radius is true for the available radii (the elements of the set ), while lambda is true for the available wavelengths for each radius (elements of the set ):
From the set of available wavelengths, some are chosen as transmission carriers. Predicate sL is true if the wavelength is chosen for the radius , i.e., iff in the COP of Eq. (15):
The set of chosen radii is then given by:
sR() is true iff in the COP of Eq. (15). The number of chosen radii must be equal to the number of devices that need to communicate:
(6) 
In order to avoid routing faults (constraint (5)), we define a conflict relation. Two wavelengths and are in conflict if they are selected for different radii and the intervals and have nonempty intersection.
Also, it might be the case that two wavelengths for the same radius are in conflict
Note that the conflict predicate depends only on the input data, and not on the wavelengths that must be chosen as carriers. The truth of the conflict atoms in the answer set is decided in the grounding phase, and does not require a search during the computation of the answer set.
If wavelength of radius is in conflict with some wavelength of radius , then and cannot be both selected; if two wavelengths are in conflict within the same radius, they cannot be selected:
Finally, the objective is to maximize the number of wavelengths selected for each radius. Predicate countR provides the number of selected resonances for each radius, and corresponds to constraint (2):
Predicate bp provides the minimum number of resonances that have been selected varying the radius; the objective is maximizing such value, as in Eq (1):
Predicate bp could be implemented following the definition (Eq. 1), i.e.:
however, a more efficient version is using chaining and an auxiliary predicate:^{1}^{1}1We thank one of the anonymous reviewers for suggesting this improved formulation.
where maxF computes the maximum number of wavelengths that might be selected, and that can be calculated during grounding.
6 Spacing the selected resonances
As will be shown in the experimental results (Section 7), the ASP program in Section 5 was very efficient in computing the maximum parallelism. On the other hand, after analyzing the provided solutions, it was found that often the selected wavelengths were unevenly spread in the available spectrum. Since, due to imprecisions in the fabrication process, the actual wavelengths might be different from the computed ones, it might be the case that two selected wavelengths become too close in the actual device, and the two wavelengths might be confused raising a routing fault. As often done in the electronic component industry, after fabrication each device is checked, and if it is not working properly it is discarded.
A secondlevel optimization could then be performed in order to select, amongst the possibly many resonances that provide the same optimal parallelism, those ones that are more evenly spread in the available spectrum, with the idea that maximizing the distance between selected wavelengths can reduce the likelihood that the actual wavelengths are too close, and, consequently, that the device has to be discarded.
The ASP program in Section 5 was then modified to take as input the parallelism to be achieved, and to have as objective to uniformly spread the selected resonances. The performances, however, were not satisfactory, and a complex MILP model, based on network flow, was devised [Nonato et al. (2017)]. Another logic programming based approach was developed in CLP(FD); we describe it in next section.
6.1 A Clp(fd) approach to the problem of spacing selected resonances
As already said, in this second optimization phase, we have as input a value of parallelism to be achieved. The objective is to select values of radii and resonance wavelengths ( for each radius) such that the selected wavelengths are as equally spread in the available spectrum as possible.
In the CLP program, we focused on modeling the problem with fewer variables than the MILP and ASP formulations. In MILP the problem is modeled with one variable for each pair stating that resonance is selected for radius . Similarly, in ASP there is predicate sL that is true if is selected for radius . In the CLP program, we have variables that range over the set of possible radii; each of the represents one chosen value of radius.
A common rule of thumb to have efficient CLP(FD) programs is to employ the socalled global constraints [Régin (1994)], i.e., constraints that involve a large number of variables and for which powerful propagation algorithms have been designed in the past. The idea is that using global constraints, the propagation can exploit more global information (opposed to the local information used in arcconsistency propagation and its variants) because each constraint has visibility of many variables at the same time.
Clearly, all the radii must be different, so we have
where alldifferent [Régin (1994)] imposes that all variables take different values.
The selected resonances are represented through an matrix ; each element ranges over the set of available wavelengths, and represents the th wavelength selected for radius .
Each of the variables in the th row of matrix is linked to the radius variable ; for each , should be a resonance wavelength of radius . This can be imposed through a table constraint [Zhou (2009)]. The table constraint is useful to define new constraints by listing the set of available tuples; in our case it lists the set of pairs for which is a radius and one of its corresponding resonance wavelengths.
Constraint Logic Programming is particularly effective at solving scheduling problems, mainly due to the effectiveness of the constraint. The constraint considers a set of tasks, each described with a start time, a duration and a resource consumption, and it ensures that in each time the sum of the resources consumed by the scheduled tasks does not exceed a given limit . Let be the list of start times, that of durations and that of resource consumptions,
is true if (see Figure 3)
The three lists , and can contain variables with domains or constant values, and the constraint removes, through constraint propagation, inconsistent values. In the particular case in which and , the constraint imposes that the tasks should not overlap in time.
In the problem of maximally spreading wavelengths, we model the selected wavelengths as tasks of a scheduling problem. Each of the elements of the matrix is considered as the start time of a task, with a total of tasks. All the tasks have the same duration: one variable models the duration of all the tasks. If we now impose^{2}^{2}2where we indicate with the list containing times element .
(7) 
this constraint imposes that all wavelengths do not overlap, and that they are spaced of at least units. The objective will be to find the maximum possible value for variable that does not cause any conflict.
To model conflicts between resonances, we recall that each resonance wavelength for a chosen radius must be different from all the wavelengths selected for another radius . We first explain how to model the relation between a radius and the set of resonance wavelengths, then we provide a set of global constraints to model conflicting wavelengths.
The relation between a radius and the corresponding resonances is imposed through an element constraint [Van Hentenryck and Carillon (1988)]. The constraint ensures that the th element of the list has value . We represent the set as a list of constrained variables ; the length of the list is the number of resonances in the radius with the maximum number of resonances . The th element of the list, , is subject to the constraint
where is the th column of Table 1. To account for the different number of resonances in different radii, the list is filled with dummy values.
Since the list of resonance wavelengths consists of different wavelengths, in order to model conflicts between the selected resonances for one radius and the resonance wavelengths for other radii one might impose
(8) 
that are alldifferent constraints, each containing variables. However, one might notice as well that all the elements in the matrix are different, meaning that instead of (8) one can impose
(9) 
that are constraints each containing variables.
Please, note the symbols: each radius has a number of resonance wavelengths, the th is named . Out of the , some are selected as carriers: the th wavelength selected for radius is named .
Finally, the objective is maximizing variable , that is a lower bound to the minimal distance between selected wavelengths.
6.1.1 Breaking Symmetries
The problem contains a number of symmetries:

The order in which the resonance wavelengths appear in one of the rows of the matrix is not important: given a solution, another solution can be obtained by swapping two elements. More importantly, swapping two elements in an assignment that is not a solution, provides another nonsolution.

Swapping the order of two radii (both in the list of radii and as rows of the matrix) provides an equivalent solution.
Removing symmetries is considered important to speedup the search. We tried several strategies, and the best was the following:

the rows of the matrix are sorted in ascending order. This could be done imposing , but since all wavelengths must be at least units apart, the following constraint gives stronger propagation:

the first column of the matrix is sorted in ascending order:
6.1.2 Objective function
As previously said, the objective is to maximize the value assigned to variable , that represents the minimum distance between two selected resonances.
Adding known bounds of the objective function can strengthen the propagation. Clearly, the maximum possible value for is obtained if all the selected wavelengths are equally spaced. As resonances are selected, the following bound holds:
Given the symmetry breaking constraints, , while is the maximum of the last column of the matrix: .
6.2 A refined CLP(FD) approach
As will be shown in the experimental results (Section 7), the CLP approach just shown did not reach the performance of the MILP program in [Nonato et al. (2017)]. However, a closer look to the set of selected wavelengths (both in the MILP and in the CLP approaches) showed that a further refinement of the problem formulation was necessary. In fact, in order to minimize the likelihood of routing faults, a selected resonance should be as far as possible not only from the other selected resonances , but also from all the resonance wavelengths of the selected radii ( for all the selected and all ), independently from the fact that they are also selected as carriers or not.
Considering this effect, the MILP model in [Nonato et al. (2017)] can no longer be used and a major rewriting is required, because the problem can no longer be modeled as a constrained shortest path.
The CLP program, instead, can be easily modified to account for this effect. A first tentative would be to consider also the (nonselected) resonance wavelengths of selected radii as tasks. The alldifferent Constraints in Eq. (9) can be rewritten as constraints, in which the tasks corresponding to selected wavelengths have duration , while those corresponding to nonselected wavelengths have a very short duration (value 1nm is suitable in our instances):
where the symbol ++ stands for list concatenation. However, with this approach each selected resonance would be at least units from the following resonance (either selected or nonselected), but no constraint prevents it to be very close to the preceding nonselected resonance.
A possible solution would be to represent selected resonances as tasks with start time and duration , i.e., would be the center of the task instead of its start time. This modification introduces a large overhead, due to the fact that the constraint associated with the summation operator propagates very poorly.
A more effective CLP(FD) modeling is to introduce a duration also for nonselected resonances (of selected radii). However, this would introduce a minimal distance also between two nonselected wavelengths, a constraint which is not required for WRONoC, and would lead to suboptimal solutions. We decided to use the resource parameter of the cumulative constraint to avoid the collision between tasks of nonselected resonances. Each of the nonselected resonances is modelled as a task of duration and using 1 resource unit (see Figure 4). The limit of resources is exactly , so that tasks of nonselected resonances can overlap. Each selected resonance is modeled as a task of duration and using all resources ():
In this way a task corresponding to a selected resonance cannot overlap neither with tasks of selected resonances, nor with those of nonselected resonances, and must be at least at distance from any other resonance of selected radii.
7 Experimental results
In the experimental campaign in [Peano et al. (2016)], the focus was computing the maximum obtainable parallelism varying the fabrication parameters, including the possible deviations of the laser wavelengths and the radius imprecisions during fabrication of the device. In this work, instead, we report the timing results of the ASP formulation and of a MILP model.
We considered a set of radii ranging from 5nm to 30nm in steps of 0.25nm; this yields 104 possible radii. In order to compute the corresponding resonance wavelengths, an Electromagnetic Model [Parini et al. (2011)] computes the transmission responses; with the selected values of radii, 1850 resonances are obtained, with a number of resonances per radius ranging from 5 to 28.
We compare the ASP program described in Section 5 with a MILP model that is a linearization (with standard techniques) of the problem defined in Section 4. The employed ASP solver is clasp 4.5.4, and the MILP solver is Gurobi 7.0.1; Gurobi was run through its Python interface. All experiments were run on a computer with an Intel Core i73720QM CPU running at 2.60GHz, with 16GB RAM, using Linux Mint 18.1 64bit. All experiments were performed using only one core. All the code and instances are available on the web.^{3}^{3}3http://www.ing.unife.it/en/research/research1/informationtechnology/computerscience/artificialintelligencegroup/researchprojects/wronoc/
The results are plotted in Figure 5 for ideal lasers (left), and for nm (right). The ASP program has usually better performances than the MILP model, and in particular in the nonideal case, in which finding an assignment satisfying all constraints is more difficult, while Gurobi seems more efficient in the case with less tight constraints, in which the difficulty is more driven by the need to find an optimal solution.
7.1 Maximally spreading resonances
The second set of experiments assesses the performance of Logic Programming approaches in the problem of selecting carrier wavelengths maximally spread on the available spectrum. We compare the performance of the CLP(FD) program described in Section 6.1 with the MILP flow model in the same instances considered in [Nonato et al. (2017)] and for which Gurobi did not run out of memory.
MILP  CLP(FD)  refined CLP(FD)  

508.68  14.45  10.41  
563.47  24.81  393.14  
2973.77  Time Out  2303.85 
The experiments were run on the same computer given earlier, using Gurobi 7.0.1 as MILP solver and ECLPS 6.1 [Schimpf and Shen (2012)] as CLP(FD) solver. The timeout was 3600s. While the MILP approach is very effective in the largest instance, the CLP(FD) program is more effective in the small instances. On the other hand, the refined CLP(FD) program, that models more closely the requirements of the WRONoC architecture, is better than the MILP approach in all instances. Note also that the MILP program [Nonato et al. (2017)] is very tailored toward solving the problem of maximally spreading the selected resonances and has to be completely rewritten for modifications of the problem, such as adding further constraints or changing the objective function. The Logic Programming approaches, instead, are more general and modifiable, as can be seen from the relatively small modifications required to extend the first CLP approach (Section 6.1) to the refined CLP program (Section 6.2).
It is also worth noting that Gurobi is a commercial program, while both clingo and ECLPS are developed as opensource programs.
8 Conclusions
We presented two problems arising in the industry of optoelectronic components, in particular in WavelengthRouted Optical Network on Chip (WRONoC) design. The first problem, published in [Peano et al. (2016)] arose because in the electronic research the maximal communication parallelism obtainable with a WRONoC was unknown. The problem was solved with an ASP program, that was mentioned, but not described in detail, in [Peano et al. (2016)]. We described the ASP program and compared experimentally its performance with a MixedInteger Linear Programming (MILP) approach.
The second problem [Nonato et al. (2017)] comes from the observation that, once the maximum parallelism level is found, it is also of interest to design the WRONoC
in the safest way, despite small variations that might occur in the fabrication process. In order to maximize the probability that the device is able to function correctly, the selected wavelengths used as carriers have to be as far as possible one from the other. Such problem was approached in
[Nonato et al. (2017)] through a MILP formulation. In this work, we presented a Constraint Logic Programming on Finite Domains (CLP(FD)) program, showed that it has performances competitive with the MILP approach and found that it is easier to modify it to take into consideration further aspects in the WRONoC design.In both cases, Logic Programming approaches have proven to be competitive with mathematical programming technologies, and that Logic Programming has promising techniques to address problems in the new area of WavelengthRouted Optical Network on Chip (WRONoC) design.
In future work, we plan to address the two described problems combining the best features of CLP and ASP; a number of Constraint Answer Set Programming solvers have been proposed and are natural candidates for this research direction [Mellarkod et al. (2008), Wittocx et al. (2008), Drescher and Walsh (2010), Janhunen et al. (2011), Balduccini and Lierler (2012), Liu et al. (2012), Bartholomew and Lee (2014), Susman and Lierler (2016)].
References
 Balduccini and Lierler (2012) Balduccini, M. and Lierler, Y. 2012. Practical and methodological aspects of the use of cuttingedge ASP tools. In Practical Aspects of Declarative Languages  14th International Symposium, PADL 2012, Philadelphia, PA, USA, January 2324, 2012. Proceedings, C. V. Russo and N. Zhou, Eds. Lecture Notes in Computer Science, vol. 7149. Springer, 78–92.

Bartholomew and
Lee (2014)
Bartholomew, M. and Lee, J. 2014.
System aspmt2smt: Computing ASPMT theories by SMT solvers.
In
Logics in Artificial Intelligence  14th European Conference, JELIA 2014, Funchal, Madeira, Portugal, September 2426, 2014. Proceedings
, E. Fermé and J. Leite, Eds. Lecture Notes in Computer Science, vol. 8761. Springer, 529–542.  Berthold et al. (2008) Berthold, J., Saleh, A. A. M., Blair, L., and Simmons, J. M. 2008. Optical networking: Past, present, and future. Journal of Lightwave Technology 26, 9 (May), 1104–1118.
 Bogaerts et al. (2012) Bogaerts, W., De Heyn, P., Van Vaerenbergh, T., De Vos, K., Selvaraja, S. K., Claes, T., Dumon, P., Bienstman, P., Van Thourhout, D., and Baets, R. 2012. Silicon microring resonators. Laser Photonics Rev. 6, 1, 47–73.
 Brière et al. (2007) Brière, M., Girodias, B., Bouchebaba, Y., Nicolescu, G., Mieyeville, F., Gaffiot, F., and O’Connor, I. 2007. System level assessment of an optical NoC in an MPSoC platform. In 2007 Design, Automation Test in Europe Conference Exhibition. IEEE, 1–6.
 Chlamtac et al. (1992) Chlamtac, I., Ganz, A., and Karmi, G. 1992. Lightpath communications: an approach to high bandwidth optical WAN’s. IEEE Transactions on Communications 40, 7 (Jul), 1171–1182.
 Drescher and Walsh (2010) Drescher, C. and Walsh, T. 2010. A translational approach to constraint answer set solving. TPLP 10, 46, 465–480.
 Gebser et al. (2009) Gebser, M., Kaminski, R., Ostrowski, M., Schaub, T., and Thiele, S. 2009. On the input language of ASP grounder Gringo. In LPNMR, E. Erdem, F. Lin, and T. Schaub, Eds. LNCS, vol. 5753. Springer, 502–508.
 Gebser et al. (2011) Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T., and Schneider, M. 2011. Potassco: The Potsdam Answer Set Solving Collection. AI Communications 24, 2, 107–124.
 Gelfond and Lifschitz (1988) Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Proceedings of International Logic Programming Conference and Symposium, R. Kowalski, Bowen, and Kenneth, Eds. MIT Press, 1070–1080.
 Giunchiglia et al. (2006) Giunchiglia, E., Lierler, Y., and Maratea, M. 2006. Answer set programming based on propositional satisfiability. 36, 4, 345–377.
 Jaffar and Maher (1994) Jaffar, J. and Maher, M. J. 1994. Constraint logic programming: a survey. J. Log. Program. 19/20, 503–581.
 Janhunen et al. (2011) Janhunen, T., Liu, G., and Niemelä, I. 2011. Tight integration of nonground answer set programming and satisfiability modulo theories. In Working notes of the 1st Workshop on Grounding and Transformations for Theories with Variables. Vancouver, BC, Canada, 1–13.
 Kaźmierczak et al. (2009) Kaźmierczak, A., Bogaerts, W., Drouard, E., Dortu, F., RojoRomeo, P., Gaffiot, F., Van Thourhout, D., and Giannone, D. 2009. Highly integrated optical crossbar in silicononinsulator technology. Journal of Lightwave Technology 27, 16 (Aug), 3317–3323.
 Koohi et al. (2011) Koohi, S., Abdollahi, M., and Hessabi, S. 2011. Alloptical wavelengthrouted NoC based on a novel hierarchical topology. In Proceedings of the Fifth ACM/IEEE International Symposium. 97–104.
 Leone et al. (2006) Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., and Scarcello, F. 2006. The DLV system for knowledge representation and reasoning. ACM Trans. Comput. Log. 7, 3, 499–562.
 Lin and Zhao (2004) Lin, F. and Zhao, Y. 2004. ASSAT: computing answer sets of a logic program by SAT solvers. Artif. Intell. 157, 12, 115–137.
 Liu et al. (2012) Liu, G., Janhunen, T., and Niemelä, I. 2012. Answer set programming via mixed integer programming. In Principles of Knowledge Representation and Reasoning: Proceedings of the Thirteenth International Conference, KR 2012, Rome, Italy, June 1014, 2012, G. Brewka, T. Eiter, and S. A. McIlraith, Eds. AAAI Press.
 Lloyd (1987) Lloyd, J. W. 1987. Foundations of Logic Programming, 2nd Edition. Springer.
 Mellarkod et al. (2008) Mellarkod, V. S., Gelfond, M., and Zhang, Y. 2008. Integrating answer set programming and constraint logic programming. Ann. Math. Artif. Intell. 53, 14, 251–287.
 Nonato et al. (2017) Nonato, M., Bertozzi, D., Gavanelli, M., and Peano, A. 2017. A network model for routingfaultfree wavelength selection in WRONoCs design. In International Network Optimization Conference 2017. Electronic Notes in Discrete Mathematics.
 Parini et al. (2011) Parini, A., Ramini, L., Bellanca, G., and Bertozzi, D. 2011. Abstract modelling of switching elements for optical networksonchip with technology platform awareness. In Proceedings of the Fifth International Workshop on Interconnection Network Architecture: OnChip, MultiChip. INAOCMC ’11. ACM, New York, NY, USA, 31–34.
 Peano et al. (2016) Peano, A., Ramini, L., Gavanelli, M., Nonato, M., and Bertozzi, D. 2016. Design technology for faultfree and maximallyparallel wavelengthrouted optical networksonchip. In Proceedings of ICCAD’16, the IEEE/ACM International Conference on ComputerAided Design, Austin, Texas. IEEE/ACM, 3:1–3:8. http://doi.acm.org/10.1145/2966986.2967023.
 Régin (1994) Régin, J. 1994. A filtering algorithm for constraints of difference in CSPs. In Proc. 12th National Conf. on Artificial Intelligence, B. HayesRoth and R. E. Korf, Eds. AAAI Press / The MIT Press, 362–367.
 Schimpf and Shen (2012) Schimpf, J. and Shen, K. 2012. Eclps  from LP to CLP. TPLP 12, 12, 127–156.
 Simons et al. (2002) Simons, P., Niemelä, I., and Soininen, T. 2002. Extending and implementing the stable model semantics. Artif. Intell. 138, 12 (June), 181–234.
 Susman and Lierler (2016) Susman, B. and Lierler, Y. 2016. SMTbased constraint answer set solver EZSMT (system description). In Technical Communications of the 32nd International Conference on Logic Programming, ICLP 2016 TCs, October 1621, 2016, New York City, USA, M. Carro, A. King, N. Saeedloei, and M. De Vos, Eds. OASICS, vol. 52. Schloss Dagstuhl  LeibnizZentrum fuer Informatik, 1:1–1:15.
 Tan et al. (2012) Tan, X., Yang, M., Zhang, L., Jiang, Y., and Yang, J. 2012. A generic optical router design for photonic networkonchips. Journal of Lightwave Technology 30, 3 (Feb), 368–376.
 Van Hentenryck and Carillon (1988) Van Hentenryck, P. and Carillon, J. 1988. Generality versus specificity: An experience with AI and OR techniques. In Proc. 7th National Conf. on Artificial Intelligence, H. E. Shrobe, T. M. Mitchell, and R. G. Smith, Eds. AAAI Press / The MIT Press, 660–664.
 Wittocx et al. (2008) Wittocx, J., Marien, M., and Denecker, M. 2008. The IDP system: a model expansion system for an extension of classical logic. In Proceedings of Workshop on Logic and Search, Computation of Structures from Declarative Descriptions (LaSh). 153–165.
 Zhou (2009) Zhou, N.F. 2009. Encoding table constraints in CLP(FD) based on pairwise AC. In Logic Programming, 25th International Conference, ICLP 2009, Pasadena, CA, USA, July 1417, 2009. Proceedings, P. M. Hill and D. S. Warren, Eds. Lecture Notes in Computer Science, vol. 5649. Springer, 402–416.
Comments
There are no comments yet.