27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C. Correctness of configuration files<br />

We define correctness of configuration files in order to check<br />

configuration files. First, we define a configuration file which<br />

is represented using configuration file model.<br />

CFile = { (n,v)| n ∈ PN, v ∈ PV }<br />

A configuration file (CFile) is defined as set of combination<br />

of setting item and parameter.<br />

Second, we define four properties in order to define correctness<br />

of configuration files.<br />

• constraint on combination of setting item and parameter<br />

s conf ⇔∀(a, b) ∈ CFile. b ∈ Conf(a)<br />

This constraint means that combinations of item and<br />

parameter which are written in a configuration file have<br />

to be defined in configuration file model.<br />

• constraint on dependency between combinations of setting<br />

item and parameter<br />

s rel ⇔∃x y. (x, y) ∈ Rel ∧ x ∈ CFile → y ∈ CFile<br />

This constraint means that if a combination of setting<br />

item and parameter is written in a configuration file and<br />

requires other combinations, required combinations have<br />

to be written in the configuration file.<br />

• constraint on relation between requirements<br />

This constraint means that if an element of requirement<br />

is chosen and requires other elements of requirement,<br />

required elements have to be chosen.<br />

• constraint on relations between requirement and configuration<br />

file<br />

s req ⇔∀r ∈ CR. Req(r) ∈ CFile<br />

This constraint means that if a requirement is chosen and<br />

relates to combinations of setting item and parameter,<br />

the combinations of setting item and parameter have to<br />

be written in a configuration file.<br />

Correctness of CFile is defined that CFile satisfies above<br />

properties.<br />

V. METHOD FOR MAKING CONFIGURATION FILES<br />

The workflow of our method is shown in Fig. 3.<br />

Fig. 3.<br />

Workflow of the Method<br />

We already defined configuration file model and correctness<br />

of configuration files. Properties which are used in order to<br />

prevent configuration file errors are organized in configuration<br />

file model. However, the properties are not easy to apply<br />

check configuration files because there is a gap between<br />

configuration file model and configuration file description.<br />

One solution is that to describe configuration file model and<br />

configuration files in common description method. Therefore,<br />

we use the feature diagram to describe configuration file model<br />

and configuration files. Besides, constraints of the feature<br />

diagrams are used to check correctness of configuration file.<br />

A. Configuration model<br />

Configuration model is a model that configuration file model<br />

is described using the feature diagram. Configuration model<br />

consists of requirement model which is a feature diagram<br />

of requirement, config model which is a feature diagram<br />

of configuration file, and correspondence relations between<br />

feature diagrams.<br />

A configuration model is described as following method.<br />

Requirement model is described by analyzing commonality<br />

and variability of functions of application. Config model is<br />

described by analyzing candidates of combinations of setting<br />

item and parameter. Combinations of setting item and parameter<br />

have some patterns. So, we analyzed syntax of httpd.conf,<br />

which is configuration file of Apache web server, and extracted<br />

five patterns of combinations. The patterns are as follows.<br />

• Pattern 1. setting item needs one parameter which is<br />

selected from set of candidates of parameter.<br />

• Pattern 2. setting item needs some parameters which are<br />

selected from set of candidates of parameter.<br />

• Pattern 3. setting item needs two parameters which are<br />

selected from different set of candidates of parameter.<br />

• Pattern 4. setting item needs one parameter which is selected<br />

from candidates of parameter and some parameters<br />

which are selected from different set of candidates of<br />

parameter.<br />

• Pattern 5. setting item does not need parameter.<br />

The above patterns are used for constraints when combinations<br />

of setting item and parameter are chosen. Besides,<br />

the patterns are described using feature diagram. In order to<br />

describe the patterns, our method uses Mandatory, Optional,<br />

Alternative and Or relations of the feature diagram. Each<br />

pattern is described as follows.<br />

• Pattern 1 is described by Alternative relation.<br />

• Pattern 2 is described by Or relation.<br />

• Pattern 3 is described by two Alternative relations.<br />

• Pattern 4 is described by Alternative and Or relation.<br />

• Pattern 5 is described only parent.<br />

Additionally, there are dependency relations of combinations<br />

of setting item and parameter. These relations are able<br />

to describe by composition rules of the feature diagram.<br />

An example of configuration model is shown in Fig. 4. In<br />

Fig. 4, the upper side diagram is requirement model and the<br />

under side diagram is config model. Dotted line arrows from<br />

requirement model to config model represent correspondence<br />

relations between requirement model and config model.<br />

B. Error detection<br />

We deal with checking correctness of configuration files as<br />

checking validity of chosen features from configuration model.<br />

Therefore, our consistency checking method checks whether<br />

set of features which are chosen from configuration model<br />

is an instance. An instance means a set of features which<br />

satisfies constraints of the feature diagram. In order to detect<br />

674

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!