

![0_image_0.png](0_image_0.png)

shown here, but can be also defined. The concept of expressions are not detailed in this paper since it is based on classical operatored expressions using boolean, set and arithmetic operators.

In the ECLiPSe **metamodel, we propose to define a model as a collection**
of predicates holding predicate elements and variables. Predicate elements are variable features or statements. Variables features is either a constant value assignment, a domain definition, an array or a set definition related to a variable. In fact, we consider that variables are implicitly declared through their features.

Considering the well-known problem of the social golfers, Figure 4 and 5 show two versions of the same problem using s-COMMA and ECLiPSe**languages. This**
problem considers a group of n = g × s **golfers that wish to play golf each week,**
arranged into g groups of s **golfers, the problem is to find a playing schedule for**
w **weeks such that no two golfers play together more than once.**
The s-COMMA **model is divided in a data file and a model file. The data file**
contains the golfer names encoded as an Enum **concept at line 1 and the problem** dimensions defined by means of constants (size of groups, number **of weeks, and** groups per week). The model file represents the generic social golfers problem using the Model **concept. The problem structure is captured by the three classes**
SocialGolfers, Group**, and** Week**, which are conformed to the** Class **concept. The** Group **class owns the** players **attribute corresponding to a set of golfers playing** together, each golfer being identified by a name given in the enumeration from the data file. In this class, the constraint zone groupSize **(lines 30 to 32) restricts** the size of the golfers group. The Week **class has an array of** Group **objects and the** constraint zone playOncePerWeek **ensures that each golfer takes part of a unique** group per week. Finally, the SocialGolfers **class has an array of** Week **objects** and the constraint zone differentGroups **states that each golfer never plays two** times with the same golfer throughout the considered weeks.