<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">Sensors</journal-id>
<journal-title>Sensors</journal-title>
<issn pub-type="epub">1424-8220</issn>
<publisher>
<publisher-name>Molecular Diversity Preservation International (MDPI)</publisher-name></publisher></journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3390/s120708447</article-id>
<article-id pub-id-type="publisher-id">sensors-12-08447</article-id>
<article-categories>
<subj-group>
<subject>Article</subject></subj-group></article-categories>
<title-group>
<article-title>Detecting Service Chains and Feature Interactions in Sensor-Driven Home Network Services</article-title></title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Inada</surname><given-names>Takuya</given-names></name><xref ref-type="aff" rid="af1-sensors-12-08447"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Igaki</surname><given-names>Hiroshi</given-names></name><xref ref-type="aff" rid="af2-sensors-12-08447"><sup>2</sup></xref><xref ref-type="corresp" rid="c1-sensors-12-08447"><sup>*</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Ikegami</surname><given-names>Kosuke</given-names></name><xref ref-type="aff" rid="af1-sensors-12-08447"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Matsumoto</surname><given-names>Shinsuke</given-names></name><xref ref-type="aff" rid="af1-sensors-12-08447"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Nakamura</surname><given-names>Masahide</given-names></name><xref ref-type="aff" rid="af1-sensors-12-08447"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Kusumoto</surname><given-names>Shinji</given-names></name><xref ref-type="aff" rid="af2-sensors-12-08447"><sup>2</sup></xref></contrib></contrib-group>
<aff id="af1-sensors-12-08447">
<label>1</label> Graduate School of System Informatics, Kobe University, 1-1 Rokkodai-cho, Nada-ku, Kobe, Hyogo 657-8510, Japan; E-Mails: <email>inada@ws.cs.kobe-u.ac.jp</email> (T.I.); <email>ikegami@ws.cs.kobe-u.ac.jp</email> (K.I.); <email>shinsuke@cs.kobe-u.ac.jp</email> (S.M.); <email>masa-n@cs.kobe-u.ac.jp</email> (M.N.)</aff>
<aff id="af2-sensors-12-08447">
<label>2</label> Graduate School of Information Science and Technology, Osaka University, 1-5 Yamadaoka- Suita, Osaka 565-0871, Japan; E-Mail: <email>kusumoto@ist.osaka-u.ac.jp</email></aff>
<author-notes>
<corresp id="c1-sensors-12-08447">
<label>*</label>Author to whom correspondence should be addressed; E-Mail: <email>igaki@ist.osaka-u.ac.jp</email>; Tel.: +81-6-6879-4112; Fax: +81-6-6879-4114.</corresp></author-notes>
<pub-date pub-type="collection">
<year>2012</year></pub-date>
<pub-date pub-type="epub">
<day>25</day>
<month>06</month>
<year>2012</year></pub-date>
<volume>12</volume>
<issue>7</issue>
<fpage>8447</fpage>
<lpage>8464</lpage>
<history>
<date date-type="received">
<day>02</day>
<month>05</month>
<year>2012</year></date>
<date date-type="rev-recd">
<day>04</day>
<month>06</month>
<year>2012</year></date>
<date date-type="accepted">
<day>18</day>
<month>06</month>
<year>2012</year></date></history>
<permissions>
<copyright-statement>© 2012 by the authors; licensee MDPI, Basel, Switzerland.</copyright-statement>
<copyright-year>2012</copyright-year>
<license>
<p>This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).</p></license></permissions>
<abstract>
<p>Sensor-driven services often cause chain reactions, since one service may generate an environmental impact that automatically triggers another service. We first propose a framework that can formalize and detect such service chains based on ECA (event, condition, action) rules. Although the service chain can be a major source of feature interactions, not all service chains lead to harmful interactions. Therefore, we then propose a method that identifies feature interactions within the service chains. Specifically, we characterize the degree of deviation of every service chain by evaluating the gap between expected and actual service states. An experimental evaluation demonstrates that the proposed method successfully detects 11 service chains and 6 feature interactions within 7 practical sensor-driven services.</p></abstract>
<kwd-group>
<kwd>smart home</kwd>
<kwd>home network system</kwd>
<kwd>sensor-driven service</kwd>
<kwd>feature interactions</kwd>
<kwd>detection</kwd>
<kwd>validation</kwd></kwd-group></article-meta></front>
<body>
<sec sec-type="intro">
<label>1.</label>
<title>Introduction</title>
<p>Research and development of <italic>home network systems (HNS)</italic> draws great attention as a key technology for the smart homes [<xref ref-type="bibr" rid="b1-sensors-12-08447">1</xref>,<xref ref-type="bibr" rid="b2-sensors-12-08447">2</xref>]. In the HNS, household appliances (e.g., TV, DVD Recorder, air-conditioner, lamp, fan) and equipments (e.g., curtain, ventilator, ceiling light) are integrated via a network to achieve various value-added services. Moreover, introducing sensors (e.g., temperature, brightness, motion, electricity, touch) to the HNS can provide autonomous <italic>sensor-driven services</italic>. A sensor-driven service is triggered automatically, depending on a designated <italic>context</italic> characterized by sensor values. Examples of the sensor-driven services are listed as follows [<xref ref-type="bibr" rid="b3-sensors-12-08447">3</xref>]:
<list list-type="simple">
<list-item>
<p><bold>DVD Theater Service (DVD-T):</bold> This service allows a user to watch a movie in a theater-like atmosphere. When the user touches a touch sensor, a TV is turned on, a light is dimmed, a curtain is closed, and a DVD recorder is played.</p></list-item>
<list-item>
<p><bold>Automatic Light Control Service (ALC):</bold> This service automatically turns on a light when the room becomes dark. When the brightness is lower than 200 lx and the user is in the room, a light is automatically turned on.</p></list-item>
<list-item>
<p><bold>Automatic Room Heating Service (ARH):</bold> This service automatically heats the room with an air-conditioner. When the room temperature is colder than 14 °C, the air-conditioner is turned on with a heating mode of 28 °C.</p></list-item>
<list-item>
<p><bold>Energy Saving Air-Conditioning Service (ESAC):</bold> This service controls an air-conditioner for energy saving. When the total electricity exceeds 1,500 Wm and the air-conditioner is working in a heating mode, the temperature of the air-conditioner is adjusted to 25 °C.</p></list-item></list></p>
<p>These sensor-driven services work fine when they are used separately. However, when multiple services are deployed in the same environment, execution of a service successively triggers another service in a certain condition. We define this phenomena as <italic>service chain</italic>, representing a chain reaction of sensor-driven services within the HNS. The service chain often causes undesirable conflicts among services, known as the <italic>feature interaction problem</italic> [<xref ref-type="bibr" rid="b3-sensors-12-08447">3</xref>,<xref ref-type="bibr" rid="b4-sensors-12-08447">4</xref>]. For the above four services, we can observe the following service chains.</p>
<list list-type="simple">
<list-item>
<p><bold>Service Chain C1 (DVD-T⇒ALC):</bold> When a user runs DVD-T, a light is diminished and the room becomes dark. As a result, the condition “brightness is lower than 200 lx” holds. So, ALC is triggered and a light is turned on. This ruins the theater-like atmosphere of DVD-T.</p></list-item>
<list-item>
<p><bold>Service Chain C2 (ARH⇒ESAC):</bold> Suppose that the room temperature drops below 14 °C, and that ARH starts the air-conditioner with the temperature setting 28 °C to heat the room. In course of time, the electricity consumption rises greater than 1,500 Wm. As a result, ESAC is triggered and the temperature setting is adjusted to 25 °C. Thus, the temperature setting of ARH is overwritten by ESAC.</p></list-item>
<list-item>
<p><bold>Service Chain C3 (ALC⇒ESAC):</bold> Suppose that room brightness drops below 200 lx, and that ALC turns on a light. If the total electricity becomes greater than 1,500 Wm at this time, ESAC is automatically triggered.</p></list-item></list>
<p>In the above scenarios, the service chains C1 and C2 cause undesirable or unexpected behaviors for the users, whereas the service chain C3 causes nothing wrong. Thus, not all service chains are harmful, but they are potential factors of feature interactions. So, when deploying many sensor-driven services in the HNS, all service chains should be identified in advance. Furthermore, it is also important to extract harmful service chains automatically.</p>
<p>The goal of this paper is to propose a framework that can characterize and detect all potential service chains and feature interactions for given sensor-driven services within the HNS. Specifically, we first introduce the <italic>ECA (event, condition, action) rules</italic> to describe the sensor-driven services. We then develop the <italic>environment effect model</italic> to capture explicitly how each appliance affects the environment. Finally, we develop the <italic>service chain detection algorithm</italic> and <italic>feature interaction detection algorithm</italic>. The service chain detection algorithm can derive concrete conditions describing when the service chain occurs. In the feature interaction detection algorithm, we propose a severity evaluation method of each service chain by comparison between an expected state by a sensor-driven service and an actual state by a service chain including the sensor-driven service.</p>
<p>We conducted a case study with 7 practical services operated in our HNS. As a result, we could detect 11 service chains, in which 6 harmful feature interactions are identified.</p></sec>
<sec>
<label>2.</label>
<title>Preliminaries</title>
<sec>
<label>2.1.</label>
<title>Home Network System</title>
<p>A home network system (HNS) consists of multiple <italic>networked appliances</italic> connected to the local area network at home. Each networked appliance has control APIs, with which users or software agents can control the appliance via the network. Each appliance is generally equipped with a network adapter, a processor and a storage.</p>
<p>A HNS typically involves a <italic>home server</italic>, which manages all the appliances deployed. It also plays a role of <italic>gateway</italic> to the external network. More importantly, various value-added <italic>services</italic> are installed in the home server. When a service is requested, the home server executes APIs of the appliances according to the logic specified in the service. As seen in Section 1, a service can orchestrate different appliances at the same time. In our research group, we are building an actual HNS (CS27-HNS) using legacy home appliances [<xref ref-type="bibr" rid="b5-sensors-12-08447">5</xref>].</p></sec>
<sec>
<label>2.2.</label>
<title>Sensor-Driven Service in HNS</title>
<p>Introducing sensors to the HNS can make the services autonomous and context-aware. Since the sensors can capture events and contexts, we use them as triggers of the service. In this paper, we write <italic>sensor-driven service</italic> to represent any HNS service triggered by a sensor. For example, let us take Automatic Light Control Service (ALC) in Section 1. The condition “the brightness is lower than 200 lx” can be evaluated by a light sensor. Thus, ALC can be implemented as a program which invokes API 
<monospace>Light.on()</monospace> when the reading of the light sensor becomes less than 200.</p>
<p>The sensor-driven services are smart and convenient in the sense that they do not require human operations. However, if many services are deployed in the same environment, they often cause unexpected service chains, as seen in Section 1. Since the number of potential service chains grows combinatorially in the number of services, we need a systematic method to detect and resolve the service chains.</p></sec>
<sec>
<label>2.3.</label>
<title>Previous Work: Feature Interactions in HNS</title>
<p>In our previous work [<xref ref-type="bibr" rid="b3-sensors-12-08447">3</xref>,<xref ref-type="bibr" rid="b4-sensors-12-08447">4</xref>], we proposed an object-oriented modeling method to formalize and detect feature interactions in the HNS. In this method, we modeled every appliance (or an environment) as an <italic>object</italic> with <italic>properties</italic> and <italic>methods.</italic> The properties characterize the internal state of the appliance (or the environment), while the methods correspond to the API. Also, we defined every service as a sequence <italic>m</italic><sub>1</sub>(); <italic>m</italic><sub>2</sub>(); …; <italic>m<sub>n</sub></italic>() of the appliance methods. Then, we defined that a feature interaction between services <italic>s</italic><sub>1</sub> and <italic>s</italic><sub>2</sub> occurs if a method <italic>m</italic>() of <italic>s</italic><sub>1</sub> and another method <italic>m</italic>′() of <italic>s</italic><sub>2</sub> conflict, either locally on an appliance object (called, <italic>appliance interaction</italic>) or indirectly via an environment object (called, <italic>environment interaction</italic>). However, this method assumed that every service is triggered <italic>manually</italic> by the user. Thus, the sensor-driven services and the incidental service chains were beyond the scope.</p></sec></sec>
<sec>
<label>3.</label>
<title>Modeling Sensor-Driven Services and Service Chains</title>
<sec>
<label>3.1.</label>
<title>Describing Sensor-Driven Services with ECA Rules</title>
<p>In order to capture the nature of the sensor-driven services, we here introduce the <italic>ECA (event, condition, action) rules</italic> [<xref ref-type="bibr" rid="b6-sensors-12-08447">6</xref>] for the service description. A <italic>sensor-driven service S</italic> is defined by <italic>S</italic> = (<italic>E<sub>S</sub>, C<sub>S</sub>, A<sub>S</sub></italic>) where
<list list-type="bullet">
<list-item>
<p><italic>E<sub>S</sub></italic> is an <italic>event</italic> that triggers <italic>S</italic>, which is defined by a condition over a <italic>single</italic> environment property.</p></list-item>
<list-item>
<p><italic>C<sub>S</sub></italic> is an <italic>enabling condition</italic> to determine the execution of <italic>S</italic>. On detecting <italic>E<sub>S</sub>, S</italic> is actually executed only when <italic>C<sub>S</sub></italic> is satisfied. <italic>C<sub>S</sub></italic> is defined by a condition over appliance properties and environment properties.</p></list-item>
<list-item>
<p><italic>A<sub>S</sub></italic> is an <italic>action</italic> to be executed, which is defined by a sequence <italic>m</italic><sub>1</sub>(); <italic>m</italic><sub>2</sub>(); …; <italic>m<sub>n</sub></italic>() of appliance methods.</p></list-item></list></p>
<p>This model newly involves the event and condition, compared to the one in the previous work.</p>
<p><xref ref-type="fig" rid="f1-sensors-12-08447">Figure 1</xref> shows service descriptions of seven sensor-driven services, including the 4 services seen in Section 1 and 3 more described below.</p>
<list list-type="simple">
<list-item>
<p><bold>Automatic Room Cooling (ARC):</bold> This service automatically cools down the room, using an air-conditioner. When the room temperature is warmer than 25 °C, the air-conditioner is turned on with a cooling mode of 23 °C.</p></list-item>
<list-item>
<p><bold>Leaving Home (LH):</bold> This service shuts down all appliances when a user leaves home. When the user touches a button in the entrance, a TV, a DVD player, an air-conditioner and a light are turned off, and a curtain is closed.</p></list-item>
<list-item>
<p><bold>Energy Saving in Absence (ESIA):</bold> This service automatically turns off appliances for energy saving in user's absence. When a sensor detects that nobody is in the room, the service turns off a TV, a DVD player, an air-conditioner and a light.</p></list-item></list>
<p>In <xref ref-type="fig" rid="f1-sensors-12-08447">Figure 1</xref>, 
<monospace>env</monospace> denotes a prefix of an environment property. Each event (or condition) is supposed to be detected (or evaluated, respectively) by appropriate sensors in the HNS. In each action, 
<monospace>A.m()</monospace> denotes a method 
<monospace>m()</monospace> of an appliance 
<monospace>A</monospace>. Let us take the description of ALC. The event of ALC is 
<monospace>env.brightness &lt; 200</monospace>, specifying that the service is triggered when the brightness is less that 200 lx. The condition 
<monospace>env.absence == false</monospace> means that the service should be enabled only when somebody is in the room. If ALC is executed, the light is turned on with brightness level 10 as specified in the action 
<monospace>Light.setBrightness(10)</monospace>.</p></sec>
<sec>
<label>3.2.</label>
<title>Modeling Environmental Effects of Appliances</title>
<p>To detect the service chains, we have to know how much <italic>effect</italic> is given to the environment as a result of a service. Such effect is produced by appliance methods executed as an action of the service. For example, 
<monospace>Light.on()</monospace> increases 
<monospace>env.brightness</monospace>, and 
<monospace>Air-Conditioner.cooling()</monospace> decreases 
<monospace>env.temperature</monospace>. Therefore, we propose an <italic>environment effect model</italic> for each appliance, to define explicitly how the appliance gives the environmental effects.</p>
<p>As shown in Section 2.3, every appliance can be regarded as an object with internal states. Therefore, we model every appliance as an FSM (finite state machine) specifying the effects within transitions. Let <italic>d</italic> be an appliance. The <italic>environment effect model</italic> of <italic>d</italic> is defined by an FSM <italic>EM<sub>d</sub></italic> = (<italic>S<sub>d</sub>, M<sub>d</sub>, T<sub>d</sub>, s</italic><sub>0</sub>, <italic>e<sub>d</sub></italic>), where
<list list-type="bullet">
<list-item>
<p><italic>S<sub>d</sub></italic> is a set of states of <italic>d</italic>.</p></list-item>
<list-item>
<p><italic>M<sub>d</sub></italic> is a set of appliance methods of <italic>d</italic>.</p></list-item>
<list-item>
<p><italic>T<sub>d</sub></italic> : <italic>S<sub>d</sub></italic> × <italic>M<sub>d</sub></italic> → <italic>S<sub>d</sub></italic> is a state transition function.</p></list-item>
<list-item>
<p><italic>s</italic><sub>0</sub> ∈ <italic>S<sub>d</sub></italic> is the initial state.</p></list-item>
<list-item>
<p><italic>e<sub>d</sub></italic> is an environment effect function, associating each transition <italic>t</italic> ∈ <italic>T<sub>d</sub></italic> with a set of expressions over environment properties.</p></list-item></list></p>
<p><xref ref-type="table" rid="t1-sensors-12-08447">Tables 1</xref> shows the environment effect models of an air-conditioner, a TV and a light, respectively. Each table describes an FSM in a table form, where a row represent a state, a column represents a method. Each entry represents a state transition, containing the effects to the environment and the next state (labeled by 
<monospace>next</monospace>). In the effects, =, += and −= respectively represent substitution, addition and subtraction operators. For example, <xref ref-type="table" rid="t1-sensors-12-08447">Table 1(b)</xref> represents that the TV has two states OFF and ON. If method on() is executed within OFF, the state moves to ON. At this time, as the environment effects, the electricity is increased by 500 Wm, and the brightness is increased by 200 lx.</p>
<sec>
<title>Assumption 1</title>
<p>Effects of every appliance to environmental values by each appliance are reflected instantly.</p>
<p>For some environment properties, the effect may be given gradually For example, it takes time for an air-conditioner to change the room temperature in the designated value. However, in this paper we define the environment effect by an expected value converged after sufficient time.</p>
<p>We assume that every appliance <italic>d</italic> in the HNS is first in the initial state of <italic>EM<sub>d</sub></italic>. When a service <italic>S</italic> = (<italic>E<sub>S</sub>, C<sub>S</sub>, A<sub>S</sub></italic>) is executed, each method <italic>d.m</italic>() in <italic>A<sub>S</sub></italic> is executed one by one. Then, a corresponding transition <italic>t</italic> in <italic>EM<sub>d</sub></italic> occurs and environment effects <italic>e</italic>(<italic>t</italic>) are accumulated to the environment.</p></sec></sec>
<sec>
<label>3.3.</label>
<title>Service Chain</title>
<p>A service chain occurs when the result of one service triggers another service, successively. We try to formalize this mechanism using the proposed service description and the environment effect model. Let <italic>S<sub>A</sub></italic> = (<italic>E<sub>S<sub>A</sub></sub>, C<sub>S<sub>A</sub></sub>, A<sub>S<sub>A</sub></sub></italic>) and <italic>S<sub>B</sub></italic> = (<italic>E<sub>S<sub>B</sub></sub>, C<sub>S<sub>B</sub></sub>, A<sub>S<sub>B</sub></sub></italic>) be two services. A <italic>service chain</italic> from <italic>S<sub>A</sub></italic> to <italic>S<sub>B</sub></italic>, denoted by <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>, occurs when the environment effects produced in <italic>A<sub>S<sub>A</sub></sub></italic> create an environment (state) where <italic>E<sub>S<sub>B</sub></sub></italic> is satisfied. A chain <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> may cause another chain <italic>S<sub>B</sub></italic> ⇒ <italic>S<sub>C</sub></italic>, creating <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> ⇒ <italic>S<sub>C</sub></italic>. Also, if <italic>S<sub>B</sub></italic> triggers <italic>S<sub>A</sub></italic> again, then a loop <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> ⇒ <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> ⇒ … may be produced.</p>
<p>Note that the occurrence of <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> is <italic>conditional</italic>. That is, it depends on the current states of the appliances and the environment. For example, for ALC⇒ESAC in Section 1, if no other appliance is working before the execution of ALC, ESAC may not start. Therefore, it is important to identify the <italic>pre-condition</italic> of the service chain, explaining when the chain occurs. We denote [<italic>cond</italic>]<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> to represent that a chain <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> occurs when a pre-condition <italic>cond</italic> holds.</p></sec>
<sec>
<label>3.4.</label>
<title>Feature Interactions in Service Chain</title>
<p>Service Chain may cause feature interactions. However, all service chains do not lead to harmful feature interactions. In the chain scenarios described in section D, scenario C1 is considered as harmful one. In the scenario C1, service chain DVD-T-ALC prevents a user from watching a movie in a theater-like atmosphere contained in the requirement of DVD-T. On the other hand, in the chain scenario C2, ESAC makes preset temperature of the air-conditioner lower than a user's requirement in ARH. Although this scenario is also considered as a feature interaction, a user may accept the change of room temperature for 1 degree. Moreover, energy saving, which is one of the requirements in ESAC, is satisfied in the scenario.</p>
<p>The service chain causes various feature interactions which can be serious or acceptable. Then, we propose a method to evaluate the severity of feature interactions.</p></sec></sec>
<sec>
<label>4.</label>
<title>Detecting Service Chains among Sensor-Driven Services</title>
<sec>
<label>4.1.</label>
<title>Service Chains Detection Algorithm</title>
<p>Now we present an algorithm that can automatically detect the service chains among sensor driven services, using the proposed service description and the environment effect model. Specifically, for a given pair of services <italic>S<sub>A</sub></italic> = (<italic>E<sub>S<sub>A</sub></sub>, C<sub>S<sub>A</sub></sub>, A<sub>S<sub>A</sub></sub></italic>) and <italic>S<sub>B</sub></italic> = (<italic>E<sub>S<sub>B</sub></sub>, C<sub>S<sub>B</sub></sub>, A<sub>S<sub>B</sub></sub></italic>), the algorithm checks if <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> occurs. Moreover, if the chain occurs, the algorithm derives a concrete pre-condition <italic>cond</italic> such that [<italic>cond</italic>]<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> holds. Intuitively, the algorithm checks if the environment effects produced by <italic>A<sub>S<sub>A</sub></sub></italic> may create a situation where <italic>E<sub>S<sub>B</sub></sub></italic> is satisfied, as discussed in Section 3.3. It consists of the following nine steps.</p>
<list list-type="simple">
<list-item>
<p><bold>Step 1:</bold> Pick out an environment property <italic>p</italic> in <italic>E<sub>S<sub>B</sub></sub></italic>.</p></list-item>
<list-item>
<p><bold>Step 2:</bold> By analyzing <italic>A<sub>S<sub>A</sub></sub></italic>, obtain a set <italic>M<sub>p</sub></italic> = {<italic>m</italic><sub>1</sub>(), <italic>m</italic><sub>2</sub>(), …, <italic>m<sub>n</sub></italic>()} ⊆ <italic>A<sub>S<sub>A</sub></sub></italic> of appliance methods where every <italic>m<sub>i</sub></italic>() has an environment effect on <italic>p</italic>.</p></list-item>
<list-item>
<p><bold>Step 3:</bold> For every <italic>m<sub>i</sub></italic>() ∈ <italic>M<sub>p</sub></italic>, analyze the environment effect models and obtain a set <italic>T<sub>m<sub>i</sub></sub></italic> of any state transitions on which <italic>m<sub>i</sub></italic>() appears.</p></list-item>
<list-item>
<p><bold>Step 4:</bold> Construct a Cartesian product <italic>T<sub>p</sub></italic> = <italic>T</italic><sub><italic>m</italic><sub>1</sub></sub> × <italic>T</italic><sub><italic>m</italic><sub>2</sub></sub> × … × <italic>T<sub>m<sub>n</sub></sub></italic>. Each element <italic>tt</italic> = (<italic>t</italic><sub>1</sub>, <italic>t</italic><sub>2</sub>, …, <italic>t<sub>n</sub></italic>) ∈ <italic>T<sub>p</sub></italic> represents a sequence of transitions each of which has an environment effect on <italic>p</italic>.</p></list-item>
<list-item>
<p><bold>Step 5:</bold> For each <italic>tt</italic> = (<italic>t</italic><sub>1</sub>, <italic>t</italic><sub>2</sub>, …, <italic>t<sub>n</sub></italic>) ∈ <italic>T<sub>p</sub></italic>, calculate the <italic>total environment effect TE</italic>(<italic>tt</italic>) = Σ [<italic>e<sub>p</sub></italic>(<italic>t</italic><sub>1</sub>), <italic>e<sub>p</sub></italic>(<italic>t</italic><sub>2</sub>), …, <italic>e<sub>p</sub></italic>(<italic>t<sub>n</sub></italic>)], where <italic>e<sub>p</sub></italic>(<italic>t<sub>i</sub></italic>) is an environment effect added to the environment property <italic>p</italic> by the transition <italic>t<sub>i</sub></italic>. The semantics of Σ will be defined later.</p></list-item>
<list-item>
<p><bold>Step 6:</bold> Let <italic>s<sub>e</sub></italic> be any environment state where <italic>S<sub>B</sub></italic> is enabled (i.e., <italic>E<sub>S<sub>B</sub></sub></italic> holds), and let <italic>s<sub>d</sub></italic> be any state where <italic>S<sub>B</sub></italic> is disabled (i.e., ¬<italic>E<sub>S<sub>B</sub></sub></italic> holds). For each <italic>tt</italic> ∈ <italic>T<sub>p</sub></italic>, if there exists such a pair (<italic>s<sub>d</sub>, s<sub>e</sub></italic>) that <italic>TE</italic>(<italic>tt</italic>) changes the state <italic>s<sub>d</sub></italic> into <italic>s<sub>e</sub></italic>, then detect a service chain <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>. For this, we call <italic>tt potential transition sequence of the service chain</italic>.</p></list-item>
<list-item>
<p><bold>Step 7:</bold> If <italic>tt</italic> = (<italic>t</italic><sub>1</sub>, <italic>t</italic><sub>2</sub>, …, <italic>t<sub>n</sub></italic>) ∈ <italic>T<sub>p</sub></italic> is a potential transition sequence of the service chain, for each <italic>t<sub>i</sub></italic> (1 ≤ <italic>i</italic> ≤ <italic>n</italic>), derive a condition <italic>dcond<sub>i</sub></italic> of an appliance where <italic>t<sub>i</sub></italic> is executed. Then, make a conjunction <italic>dcond<sub>p</sub></italic> = <italic>dcond</italic><sub>1</sub> ∧ <italic>dcond</italic><sub>2</sub> ∧ … ∧ <italic>dcond<sub>n</sub></italic>, which is a pre-condition of the service chain w.r.t. the appliances. In addition, obtain a condition <italic>econd<sub>p</sub></italic> on the environment where <italic>s<sub>d</sub></italic> of Step 6 is satisfied, which is a pre-condition of the service chain w.r.t. the environment.</p></list-item>
<list-item>
<p><bold>Step 8:</bold> Validate that <italic>cond<sub>p</sub></italic> = <italic>dcond<sub>p</sub></italic> ∧ <italic>econd<sub>p</sub></italic> does not contradict to <italic>E<sub>S<sub>A</sub></sub></italic> ∧ <italic>C<sub>S<sub>A</sub></sub></italic>. If there is no contradiction, derive <italic>cond<sub>p</sub></italic> as the pre-condition of <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>. If there is a contradiction, <italic>S<sub>A</sub></italic> is disabled. So conclude that <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> does not occur. (End)</p></list-item></list>
<p>Let <italic>v<sub>i</sub></italic> be the value of the environment effect <italic>e<sub>p</sub></italic>(<italic>t<sub>i</sub></italic>). The semantics of Σ in Step 5 is defined by one of the following S1, S2 or S3, depending on the environment property <italic>p</italic> interested.</p>
<list list-type="simple">
<list-item>
<p><bold>S1(Arithmetic Sum):</bold> Σ [<italic>e<sub>p</sub></italic>(<italic>t</italic><sub>1</sub>), <italic>e<sub>p</sub></italic>(<italic>t</italic><sub>2</sub>), …, <italic>e<sub>p</sub></italic>(<italic>t<sub>n</sub></italic>)] = <italic>v</italic><sub>1</sub> + <italic>v</italic><sub>2</sub> + … + <italic>v<sub>n</sub></italic>. This semantics is taken when <italic>p</italic> is a <italic>cumulative</italic> property, including brightness, sound volume, <italic>etc.</italic></p></list-item>
<list-item>
<p><bold>S2(Maximum Value):</bold> Σ [<italic>e<sub>p</sub></italic>(<italic>t</italic><sub>1</sub>), <italic>e<sub>p</sub></italic>(<italic>t</italic><sub>2</sub>), …, <italic>e<sub>p</sub></italic>(<italic>t<sub>n</sub></italic>)] = <italic>max</italic>(<italic>v</italic><sub>1</sub>, <italic>v</italic><sub>2</sub>, …, <italic>v<sub>n</sub></italic>). This semantics is taken when the value of <italic>p</italic> is overwritten by the maximum one, including the temperature of heater, wind level, <italic>etc.</italic></p></list-item>
<list-item>
<p><bold>S3(Minimum Value):</bold> Σ [<italic>e<sub>p</sub></italic>(<italic>t</italic><sub>1</sub>), <italic>e<sub>p</sub></italic>(<italic>t</italic><sub>2</sub>), …, <italic>e<sub>p</sub></italic>(<italic>t<sub>n</sub></italic>)] = <italic>min</italic>(<italic>v</italic><sub>1</sub>, <italic>v</italic><sub>2</sub>, …, <italic>v<sub>n</sub></italic>). This semantics is taken when the value of <italic>p</italic> is converged to the minimum one, including the temperature of air-conditioner.</p></list-item></list>
<p>We briefly summarize the purpose of each step of the algorithm. Step 1 finds the key property <italic>p</italic> by which the service chain <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> may occur. Step 2 extracts appliance methods that potentially give an effect to <italic>p</italic>. Step 3 identifies all state transitions related to the methods within the environment effect models. Step 4 derives all possible combinations of the transitions affecting <italic>p</italic>. Step 5 calculates the total impact to <italic>p</italic> produced by each of the combinations. Step 6 examines if the total impact can trigger <italic>E<sub>S<sub>B</sub></sub></italic> or not. Step 7 derives the pre-condition of the service chain. Finally, Step 8 validates if the pre-condition does not contradicts to the enabling condition of <italic>S<sub>A</sub></italic>.</p>
<p>In our service chain detection method, the conditions under which the potential conflicts may arise are derived from static structures of service models. Since our method does not need to utilize an exhaustive search such as model checking, the state explosion problem does not occur if service complexity increases.</p></sec>
<sec>
<label>4.2.</label>
<title>Running Example</title>
<p>Using the proposed algorithm, we demonstrate to detect the service chain C1 (DVD-T⇒ALC) in Section 1. In this example, we use the service description in <xref ref-type="fig" rid="f1-sensors-12-08447">Figure 1</xref>, and the environment effect model of the appliances in <xref ref-type="table" rid="t1-sensors-12-08447">Table 1</xref>.</p>
<sec>
<label>4.2.1.</label>
<title>Detection of Service Chain (DVD-T ⇒ ALC)</title>
<p>In Step 1, we pick up 
<monospace>env.brightness</monospace> from <italic>E<sub>ALC</sub></italic> and know that the brightness is the key property of the service chain. In Step 2, we obtain methods 
<monospace>TV.on(), Light.setbrightness(1)</monospace> from <italic>A<sub>DVD</sub></italic><sub>–</sub><italic><sub>T</sub></italic>, since they have effects on 
<monospace>env.brightness</monospace>. In Step 3, we identify the corresponding transitions in the environment effect models. In <xref ref-type="table" rid="t1-sensors-12-08447">Table 1(b)</xref>, we find <italic>T</italic><sub><italic>TV.on</italic>()</sub> = {
<monospace>(OFF,on(),ON),(ON,on(),ON)</monospace>}. In <xref ref-type="table" rid="t1-sensors-12-08447">Table 1(c)</xref>, we find <italic>T<sub>Light.setbrightness</sub></italic><sub>(1)</sub> = {
<monospace>(OFF, setBrightness(1), ON), (ON, setBrightness(1), ON)</monospace>}. Step 4 constructs a product <italic>T<sub>TV.on</sub></italic><sub>()</sub> × <italic>T<sub>Ligh.setbrightness</sub></italic><sub>(1)</sub> to derive the following four transition sequences.</p>
<list list-type="bullet">
<list-item>
<p><italic>tt</italic><sub>1</sub> = 
<monospace>((OFF,on(),ON),(OFF,setBrightness(1),ON))</monospace></p></list-item>
<list-item>
<p><italic>tt</italic><sub>2</sub> = 
<monospace>((OFF,on(),ON),(ON,setBrightness(1),ON))</monospace></p></list-item>
<list-item>
<p><italic>tt</italic><sub>3</sub> = 
<monospace>((ON,on(),ON),(OFF,setBrightness(1),ON))</monospace></p></list-item>
<list-item>
<p><italic>tt</italic><sub>4</sub> = 
<monospace>((ON,on(),ON),(ON,setBrightness(1),ON))</monospace></p></list-item></list>
<p>Step 5 calculates the total the environment effect to env.brightness. Since the brightness is cumulative, we follow the Semantics S1.</p>
<list list-type="bullet">
<list-item>
<p><italic>TE</italic>(<italic>tt</italic><sub>1</sub>) =
<monospace>+200 + 100 = +300</monospace></p></list-item>
<list-item>
<p><italic>TE</italic>(<italic>tt</italic><sub>2</sub>) =
<monospace>+200 +100 (1−bLevel)=300 − 100 * bLevel</monospace></p></list-item>
<list-item>
<p><italic>TE</italic>(<italic>tt</italic><sub>3</sub>) =
<monospace>+ 0 + 100 = +100</monospace></p></list-item>
<list-item>
<p><italic>TE</italic>(<italic>tt</italic><sub>4</sub>) =
<monospace>+ 0 + 100(1 − bLevel)=100 − 100 * bLevel</monospace></p></list-item></list>
<p>In Step 6, let <italic>s<sub>d</sub></italic> be any state where <italic>ALC</italic> is not triggered, <italic>i.e.</italic>, ¬<italic>E<sub>ALC</sub></italic> = 
<monospace>env.brightness</monospace> ≥ 200 holds. Also, let <italic>s<sub>e</sub></italic> be any state where <italic>ALC</italic> is triggered, <italic>i.e., E<sub>ALC</sub></italic> = 
<monospace>env.brightness</monospace> &lt; 200 holds. Among <italic>tt</italic><sub>1</sub> to <italic>tt</italic><sub>4</sub>, we want to find any transition sequences that can change <italic>s<sub>d</sub></italic> to <italic>s<sub>e</sub></italic>. Since both <italic>tt</italic><sub>1</sub> and <italic>tt</italic><sub>3</sub> give positive impact to the brightness, they cannot move <italic>s<sub>d</sub></italic> to <italic>s<sub>e</sub></italic>. So, <italic>tt</italic><sub>2</sub> and <italic>tt</italic><sub>4</sub> are chosen as the potential transition sequences of the service chain.</p>
<p>In Step 7, we first derive the pre-condition of the service chain from <italic>tt</italic><sub>2</sub>. In order for the sequence <italic>tt</italic><sub>2</sub> to be executed, the TV must be OFF and the light is ON beforehand. So, <italic>dcond<sub>bright</sub></italic> = [TV is OFF ∧ Light is ON]. From ¬<italic>E<sub>ALC</sub></italic>, we obtain a condition 
<monospace>env.brightness</monospace> ≥ 200 to be satisfied <italic>before</italic> DVD-T. Also, as for the condition <italic>after</italic> DVD-T, we have 
<monospace>env.brightness</monospace> +<italic>TE</italic>(<italic>tt</italic><sub>2</sub>) &lt; 200 so that ALC is triggered. Therefore, <italic>econd<sub>bright</sub></italic> = [200 ≤ 
<monospace>env.brightness</monospace> &lt; 100 * bLevel−100]. Similarly, we derive the pre-condition from <italic>tt</italic><sub>4</sub>. As a result, we can see that the service chain DVD-T⇒ALC occurs when DVD-T is executed under the one of the following pre-conditions.</p>
<list list-type="bullet">
<list-item>
<p>
<monospace>cond1:</monospace> TV is OFF, Light is ON and a condition [200 ≤ 
<monospace>env.brightness</monospace> &lt; 100 * 
<monospace>bLevel</monospace>−100] holds, or</p></list-item>
<list-item>
<p>
<monospace>cond2:</monospace> TV is ON, Light is ON and a condition [200 ≤ 
<monospace>env.brightness</monospace> &lt; 100 * 
<monospace>bLevel</monospace>+100] holds.</p></list-item></list>
<p>These pre-conditions are validated in Step 8 that they do not disable DVD-T. So, we finally detect [
<monospace>cond1</monospace>] DVD-T⇒ALC and [
<monospace>cond2</monospace>] DVD-T⇒ALC.</p></sec></sec></sec>
<sec>
<label>5.</label>
<title>Estimation of the Severity of a Service Chain Using Prior Expectation of Sensor-Driven Service</title>
<sec>
<label>5.1.</label>
<title>Severity of a Service Chain</title>
<p>As described in Section 3.4, every service chain does not lead to harmful feature interactions. Then, we define the degree of severity of a service chain, in order to evaluate whether the service chain is harmful. Intuitively, we consider that the service chain is serious, when the state after a service execution differs from the state after a service chain significantly We define a set <italic>es</italic> = (<italic>v</italic><sub>1</sub>, <italic>v</italic><sub>2</sub>, …, <italic>v<sub>n</sub></italic>) of arbitrary value of environment properties <italic>p</italic><sub>1</sub>, <italic>p</italic><sub>2</sub>, …, <italic>p<sub>n</sub></italic> as an environmental state. When an environmental state <italic>es</italic>[<italic>S<sub>A</sub></italic>] at the time of <italic>S<sub>A</sub></italic> being executed independently and other environmental state of <italic>es</italic>[<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>] at the time of a service chain <italic>es</italic>[<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>] being executed are compared, we estimate that the gap between both environmental states is large.</p></sec>
<sec>
<label>5.2.</label>
<title>Prior Expectation in a Sensor-Driven Service</title>
<p>It is also dependent on the requirement(<italic>prior expectation</italic>) which a user expects to be satisfied by a service whether the service chain is serious or not. The prior expectation is expressed as a state of appliances and environment properties contained in the main purpose of a service. <xref ref-type="table" rid="t2-sensors-12-08447">Table 2</xref> shows examples of prior expectation in each service. In the table, the prior expectation in ARH is related to “indoor temperature”. Similarly, the prior expectation in ESAC is related to “electricity”. Therefore, when evaluating the degree of severity of a service chain, it is necessary to narrow down a state <italic>es</italic> in the view point of the prior expectation.</p>
<p>We define a projection <italic>es</italic> = (<italic>v</italic><sub>1</sub>, <italic>v</italic><sub>2</sub>, …, <italic>v<sub>n</sub></italic>) to <italic>I</italic> = {<italic>p<sub>i</sub></italic><sub>1</sub>, …, <italic>p<sub>ik</sub></italic>}(a set of environmental properties) as <italic>proj<sub>I</sub></italic>(<italic>es</italic>) = (<italic>v<sub>i</sub></italic><sub>1</sub>, …, <italic>v<sub>ik</sub></italic>). Let <italic>I<sub>A</sub></italic> be a set of environment properties related to the prior expectation in <italic>S<sub>A</sub></italic>. Moreover, let <italic>es</italic>[<italic>S<sub>A</sub></italic>] be a state at the time of <italic>S<sub>A</sub></italic> being executed independently, and <italic>es</italic>[<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>] be a state at the time of <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> being executed. Here, <italic>proj<sub>I<sub>A</sub></sub></italic>(<italic>es</italic>[<italic>S<sub>A</sub></italic>]) can be considered as a prior expectation expected by a user to <italic>S<sub>A</sub></italic>. Similarly, <italic>proj<sub>I<sub>A</sub></sub></italic>(<italic>es</italic>[<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>]) is regarded as an actual state at the time of <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> being executed.</p></sec>
<sec>
<label>5.3.</label>
<title>Estimation of Service Chain Severity</title>
<p>We estimate whether a service chain causes serious feature interaction or not, depending on whether the difference between <italic>proj<sub>I<sub>A</sub></sub></italic>(<italic>es</italic>[<italic>S<sub>A</sub></italic>]) which is expected by a user to <italic>S<sub>A</sub></italic> and <italic>proj<sub>I<sub>A</sub></sub></italic>(<italic>es</italic>[<italic>S<sub>A</sub></italic>]) is below a threshold value <italic>τ</italic>. Here, <italic>τ</italic> is a given value experientially by a user or the service creator.</p>
<sec>
<title>Assumption 2</title>
<p>A sensor-driven service <italic>S<sub>A</sub></italic> = (<italic>E<sub>S<sub>A</sub></sub>, C<sub>S<sub>A</sub></sub>, A<sub>S<sub>A</sub></sub></italic>) and <italic>S<sub>B</sub></italic> = (<italic>E<sub>S<sub>B</sub></sub>, C<sub>S<sub>B</sub></sub>, A<sub>S<sub>B</sub></sub></italic>) cause a service chain [<italic>cond</italic>]<italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic>. A set of properties which a user expects to the <italic>S<sub>A</sub></italic> is <italic>I<sub>A</sub></italic> = {<italic>p<sub>i</sub></italic><sub>1</sub>, …, <italic>p<sub>ik</sub></italic>}.</p>
<p>Each <italic>p<sub>ij</sub></italic> is given a threshold value <italic>τ</italic>(<italic>p<sub>ij</sub></italic>).</p>
<list list-type="simple">
<list-item>
<p><bold>Step 1:</bold> Create a set of state <italic>es</italic> = (<italic>v</italic><sub>1</sub>, <italic>v</italic><sub>2</sub>, …, <italic>v<sub>n</sub></italic>) which is formed by the <italic>cond</italic>.</p></list-item>
<list-item>
<p><bold>Step 2:</bold> In the <italic>es</italic>, the method of <italic>A<sub>S<sub>A</sub></sub></italic> is virtually invoked according to each appliance model. Let <italic>tt<sub>A</sub></italic> = (<italic>t</italic><sub>1</sub>, <italic>t</italic><sub>2</sub>, …, <italic>t<sub>s</sub></italic>) be a set of transition sequence of the appliance model performed. We calculate 
<inline-formula>
<mml:math id="mm1" display="inline">
<mml:semantics id="sm1">
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>s</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>A</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">]</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mn>1</mml:mn>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mn>2</mml:mn>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>n</mml:mi>
<mml:mo>′</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></inline-formula> by compounding the total environment effect <italic>TE</italic>(<italic>tt<sub>A</sub></italic>)(described in Section 4.1) to <italic>es.</italic></p></list-item>
<list-item>
<p><bold>Step 3:</bold> In the <italic>es, A<sub>S<sub>A</sub></sub></italic> and <italic>A<sub>S<sub>B</sub></sub></italic> are invoked in order. Let <italic>tt<sub>A,B</sub></italic> = (<italic>t</italic><sub>1</sub>, <italic>t</italic><sub>2</sub>, …, <italic>t<sub>l</sub></italic>) be a set of transition sequence performed in the service chain. We calculate 
<inline-formula>
<mml:math id="mm2" display="inline">
<mml:semantics id="sm2">
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>s</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>A</mml:mi></mml:msub>
<mml:mo>⇒</mml:mo>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>B</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">]</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mn>1</mml:mn>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mn>2</mml:mn>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>n</mml:mi>
<mml:mo>∗</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></inline-formula> by compounding the total environment effect <italic>TE</italic>(<italic>tt<sub>A,B</sub></italic>) to each element in <italic>es</italic>.</p></list-item>
<list-item>
<p><bold>Step 4:</bold> Calculate the gap between a state caused by prior expectation and an actual state by the service chain as follows. 
<inline-formula>
<mml:math id="mm3" display="inline">
<mml:semantics id="sm3">
<mml:mrow>
<mml:msub>
<mml:mtext mathvariant="italic">proj</mml:mtext>
<mml:mrow>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>A</mml:mi></mml:msub></mml:mrow></mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>A</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mtext mathvariant="italic">proj</mml:mtext>
<mml:mrow>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>A</mml:mi></mml:msub></mml:mrow></mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>A</mml:mi></mml:msub>
<mml:mo>⇒</mml:mo>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>B</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>2</mml:mn></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>k</mml:mi></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>−</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>2</mml:mn></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>k</mml:mi></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>2</mml:mn></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mn>2</mml:mn></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>k</mml:mi></mml:mrow></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>k</mml:mi></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></inline-formula></p></list-item>
<list-item>
<p><bold>Step 5:</bold> Determine <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> as a serious service chain if 
<inline-formula>
<mml:math id="mm4" display="inline">
<mml:semantics id="sm4">
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">|</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi></mml:mrow>
<mml:mo>′</mml:mo></mml:msubsup>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi></mml:mrow>
<mml:mo>∗</mml:mo></mml:msubsup></mml:mrow>
<mml:mo stretchy="false">|</mml:mo></mml:mrow>
<mml:mo>&gt;</mml:mo>
<mml:mi>τ</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mspace width="0.2em"/>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>≤</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>≤</mml:mo>
<mml:mi>k</mml:mi></mml:mrow>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></inline-formula> is true.</p></list-item></list>
<p>Here, if a service has multiple environment properties as the target of prior expectation, our algorithm calculates each severity separately. For instance, if a service has brightness property and temperature property as the target of prior expectation, severities of the service in the view point of brightness and temperature are calculated respectively, and the service is judged whether the service chain is a feature interaction or not.</p>
<p>Second, if a service does not include any prior expectation, it is difficult to capture the user's desire about the service. We assume the prior expectation depends on user's requirement or desire. Therefore, in our future approach, though the service chain is detected, the severity of the service is not calculated.</p>
<p>Our method to estimate the severity of service chains generates a set of state which satisfies the conditions. Though the set of state which satisfies the conditions may exist infinitely, environment properties not included in prior expectations are treated symbolically in our method. For example, a state about a service which includes brightness property as the prior expectation is expressed like (Temperature, Brightness, Electricity) = (x, 800, y) in internal implementation. An environment property included in a prior expectation may take various values. Two or more typical values should be checked for estimating severity. The typical values should reflect user's desire or some kinds of situation in which the service is invoked. Concrete methods to configure the property values for severity estimation are left for our future research.</p></sec></sec>
<sec>
<label>5.4.</label>
<title>Running Example</title>
<p>We evaluated the degree of severity about the service chain in Section 1. Here, we focused on three properties, such as temperature, brightness and electricity in HNS. Moreover, the threshold of deviation <italic>tau</italic> is 2 (°C), 500 (lx), and 500 (W), respectively.</p>
<sec>
<label>5.4.1.</label>
<title>Severity Evaluation of DVD-T⇒ALC</title>
<p>In Step 1, we create an environmental state <italic>es</italic> = (temperature, brightness, electricity)= (24, 800, 50) which may trigger the service chain. Here, current brightness setting of the light in the services is level 8. In Step 2, when only DVD-T is invoked, <italic>es</italic>[<italic>DVD</italic> − <italic>T</italic>] changes to (24, 100, 850). In Step 3, when DVD-T and ALC are invoked in order, <italic>es</italic>[<italic>DVD</italic> − <italic>T</italic> ⇒ <italic>ALC</italic>] changes to (24, 1000, 850). In Step 4, if <italic>I<sub>DVD</sub></italic><sub>−</sub><italic><sub>T</sub></italic> is {<italic>brightness</italic>}, the gap is calculated as follows. <italic>proj<sub>I<sub>DVD−T</sub></sub></italic>(<italic>es</italic>[<italic>DVD</italic> − <italic>T</italic>]) — <italic>proj<sub>I<sub>DVD−T</sub></sub></italic>(<italic>es</italic>[<italic>DVD</italic> − <italic>T</italic>] ⇒ <italic>ALC</italic>) = (100) − (1000)= (−900) That is, user's prior expectation of brightness in DVD-T has significant deviation: −900 from the actual environment state by the service chain. In Step 5, |−900| &gt; <italic>τ</italic>(brightness) = 500. As a result, this service chain can be considered serious.</p></sec></sec></sec>
<sec>
<label>6.</label>
<title>Implementation of Service Chain/feature Interaction Detection System</title>
<sec>
<label>6.1.</label>
<title>Architecture</title>
<p><xref ref-type="fig" rid="f2-sensors-12-08447">Figure 2</xref> shows the architecture of our service chain/feature interaction detection system. Our system consists of <italic>a state transition machine service, a service chain detection service, a severity evaluation service</italic> and <italic>an offline service chain/feature interaction detection controller</italic>. The chain detection controller detects service chains and feature interactions by invoking the service chain detection service and the severity evaluation service. Henceforth, the details of each component are explained.</p>
<sec>
<label>6.1.1.</label>
<title>State Transition Machine Service</title>
<p>The state transition machine service calculates the environment effect <italic>e</italic>(<italic>t</italic>) for each appliance based on the appliance model.</p>
<p>This service exhibits the following methods.</p>
<list list-type="simple">
<list-item>
<p><bold>imulate(String[] methods):SimulationResult[]</bold> This method receives an array of appliance method (String type) as an argument, and returns an array of the SimulationResult class. This method returns SimulationResult class which contains combination of the environment effect and the appliance state transition based on the given appliance method sequence. The SimulationResult has the following attributes.</p></list-item>
<list-item>
<p><bold>SimulationResult</bold>
<list list-type="simple">
<list-item>
<label>-</label>
<p>effects(Effect[]) : An array of the environment effect for each environment property</p></list-item>
<list-item>
<label>-</label>
<p>transitions(Transition[]) : An array of appliance transition sequence caused by appliance method execution</p></list-item></list></p></list-item>
<list-item>
<p><bold>Effect</bold>
<list list-type="simple">
<list-item>
<label>-</label>
<p>propertyName(String) : A name of an environment property</p></list-item>
<list-item>
<label>-</label>
<p>value(double) : Degree of environment effect</p></list-item>
<list-item>
<label>-</label>
<p>operator(String) : Operator is any one of ”=”,”+=”,”-=”.</p></list-item></list></p></list-item>
<list-item>
<p><bold>Transition</bold>
<list list-type="simple">
<list-item>
<label>-</label>
<p>deviceName(String) : Device name</p></list-item>
<list-item>
<label>-</label>
<p>preState(String) : A state before transition</p></list-item>
<list-item>
<label>-</label>
<p>postState(String) : A state after transition</p></list-item></list></p></list-item></list>
<p>This method controls Steps 2–5 in Section 4.1 and Steps 2 and 3 in Section 5.3.</p></sec>
<sec>
<label>6.1.2.</label>
<title>Service Chain Detection Service</title>
<p>The service chain detection service stores the service models and detects a service chain between given sensor-driven services. This service exhibits the following method.</p>
<list list-type="simple">
<list-item>
<p><bold>detectChain(String service1, String service2):boolean</bold> This method receives names of two sensor-driven services (a source service and a destination service), which may cause a chain reaction, as arguments, and returns a boolean value which indicates whether there exists a service chain. This method controls our service chain detection algorithm in 4.1. First, this method gets an action of the source service and an event of the destination service from the service models. Next, this method calculates a total environment effect of the source service with using the simulate() method in the state transition machine service.</p></list-item></list></sec>
<sec>
<label>6.1.3.</label>
<title>Severity Evaluation Service</title>
<p>The severity evaluation service stores service models, and evaluates degree of a severity of a given service chain. This service exhibits the following method.</p>
<list list-type="simple">
<list-item>
<p><bold>detectFI(String service1, String service2):boolean</bold> This method receives names of two sensor-driven services (a source service and a destination service), which may cause a chain reaction, as arguments, and returns a boolean value which indicates whether there exists a feature interaction. This method controls our severity evaluation algorithm in Section 5.3. First, this method gets method information in the service model. Next, this method calculates an environment state after execution of the source service, and another environment state after the occurrence of the service chain, respectively. Then, this method calculates the degree of deviation of the environment state for every property which is related to the prior expectation in the source service which may cause the chain reaction.</p></list-item></list></sec></sec>
<sec>
<label>6.2.</label>
<title>Implementation and Evaluation</title>
<p>The total lines of code of our program are about 4,300, and the programming language used for development is Java. We use the actual HNS(CS27-HNS) developed by our research group for sensor-driven services. All the services included in the service chain/feature interaction detection system were deployed under the following environments.</p>
<list list-type="bullet">
<list-item>
<p>Server Specification: 950 MB RAM 2.00 GHz WinXP Pro</p></list-item>
<list-item>
<p>Tomcat 5.5</p></list-item>
<list-item>
<p>Apache Axis 2.2</p></list-item>
<list-item>
<p>Java JDK5</p></list-item></list>
<p>We performed the service chain/feature interaction detection for the 7 services in <xref ref-type="fig" rid="f1-sensors-12-08447">Figure 1</xref>. Our system required about 16 seconds for detecting the service chains and the feature interactions.</p></sec></sec>
<sec sec-type="methods">
<label>7.</label>
<title>Case Study</title>
<p>To evaluate the proposed method, we have conducted a case study to detect all service chains and feature interactions among the seven sensor-driven services shown in <xref ref-type="fig" rid="f1-sensors-12-08447">Figure 1</xref>.</p>
<p><xref ref-type="table" rid="t3-sensors-12-08447">Table 3</xref> shows the result. In the table, a row represents a service triggered first (called first service, say <italic>S<sub>A</sub></italic>), and a column represents one triggered second (called second service, say <italic>S<sub>B</sub></italic>). Each entry shows whether a service chain <italic>S<sub>A</sub></italic> ⇒ <italic>S<sub>B</sub></italic> occurs or not. Out of all 42(= 7×6) possible combinations, 11 service chains and 6 feature interactions were automatically detected by our system (marked as Chain and FI in <xref ref-type="table" rid="t3-sensors-12-08447">Table 3</xref>). Scenarios of DVD-T⇒ALC and ARH⇒ESAC are the same as C1 and C2 in Section 1, respectively. Scenarios of other FIs are explained below.</p>
<sec>
<label>7.1.</label>
<title>Service Chain Scenario (ESIA⇒ARH)</title>
<p>In a day of winter, as nobody remains the room, ESIA turns off all the appliances. This situation makes the temperature decrease, and ARH is triggered in due course. The service chain violates the goal of energy-saving of ESIA.</p></sec>
<sec>
<label>7.2.</label>
<title>Service Chain Scenario (LH⇒ARH)</title>
<p>This service chain is similar to ESIA⇒ARH. As a user presses the button of LH, all the appliances are shut down. This makes the temperature decrease and has ARH triggered. This service chain is against the user's requirement that all the appliances should be off while leaving home.</p></sec>
<sec>
<label>7.3.</label>
<title>Service Chain Scenario (ARH⇒ARC)</title>
<p>As the temperature decreases, ARH is triggered to heat the room using the air-conditioner. This makes room warm enough to trigger ARC to cool the room, which violates the goal of ARH. The algorithm derives a pre-condition that the air-conditioner is OFF or working with the temperature setting 25 °C or less.</p></sec>
<sec>
<label>7.4.</label>
<title>Service Chain Scenario (LH⇒ALC)</title>
<p>If a user presses the button of LH in the night, all the appliances are shut down, and the room becomes dark. Then, ALC is triggered and the light is turned on again. The chain violates the user's requirement that all the appliances should be off while leaving home. The algorithm derives a pre-condition that [200 ≤ 
<monospace>env.brightness</monospace> &lt; 200 + 100* 
<monospace>Light.bLevel</monospace>, the light is ON, and TV is OFF].</p></sec></sec>
<sec sec-type="discussion">
<label>8.</label>
<title>Discussion</title>
<sec>
<label>8.1.</label>
<title>Advantage and Limitations</title>
<p>For given sensor-driven services, the proposed method can detect all potential service chains and feature interactions automatically. It also derives concrete pre-conditions for every service chain detected. Therefore, the proposed method can make service developers aware of unexpected service chains in advance. Furthermore, we could calculate the degree of severity of each service chain and judge the undesirable feature interactions resulting from the service chain.</p>
<p>In this sense, the proposed method is useful especially for the offline validation at the design stage of the services.</p>
<p>On the other hand, the detected harmful service chain needs to be resolved. However, this paper does not show the concrete resolution method for such service chains. It is necessary to define the suitable resolution method according to the degree of severity of the service chain. A service developer and a user are to determine the magnitude of the deviation experientially. More systematic determination method for the deviation is our future subject.</p>
<p>It is significant problem to determine adequate value of the <italic>τ</italic>. The value of <italic>τ</italic> is a criterion which indicates the degree of the severity of detected feature interactions. Accordingly, wrong value of <italic>τ</italic> does not capture the user's desire. On the other hand, since the value of <italic>τ</italic> depends on user's requirement, desire, or environment where sensor-driven services are deployed, it is significantly difficult to decide the value statically in advance. Currently, a method to configure the value of <italic>τ</italic> and resolve feature interactions are both left for our future research. In our next research, we consider about a method to use the value small enough as an initial value of <italic>τ</italic>. In the approach, feature interactions are detected based on the initial value of <italic>τ</italic>, and a user decides and conveys whether each feature interaction is acceptable or not. The recursive feedback process between the user and our system make the value of <italic>τ</italic> configured gradually.</p></sec>
<sec>
<label>8.2.</label>
<title>Related Work</title>
<p>Kolberg <italic>et al.</italic> [<xref ref-type="bibr" rid="b7-sensors-12-08447">7</xref>] presented a classification of feature interactions in smart home, where our service chains can be categorized as the <italic>sequential action interaction</italic> (SAI). However, the concrete detection method of the service chains was not described. Wilson <italic>et al.</italic> [<xref ref-type="bibr" rid="b8-sensors-12-08447">8</xref>] took the environment effects of the appliances for detecting feature interactions. However, since the amount of the effects was not explicitly considered, it would be difficult to derive detailed pre-conditions of the service chains. The ECA rules have been often used for detecting policy conflicts [<xref ref-type="bibr" rid="b6-sensors-12-08447">6</xref>,<xref ref-type="bibr" rid="b9-sensors-12-08447">9</xref>,<xref ref-type="bibr" rid="b10-sensors-12-08447">10</xref>]. These methods basically focused on action conflicts only, and the service chains were not explicitly considered. In [<xref ref-type="bibr" rid="b11-sensors-12-08447">11</xref>], we proposed a service-oriented framework that facilitates development of individual sensor-driven services. However, this method did not cover interactions among multiple services.</p>
<p>In distributed system, many techniques for detecting policy conflict based on policies such as Authorization Policy and Obligation policy have been proposed. Lupu <italic>et al.</italic> [<xref ref-type="bibr" rid="b12-sensors-12-08447">12</xref>] have classified policy conflicts occurring in distributed systems and proposed conflict resolution method according to the classification. Dunlop <italic>et al.</italic> [<xref ref-type="bibr" rid="b13-sensors-12-08447">13</xref>] have proposed dynamic and scalable policy conflict detection method. In the method, conflict DB stores the combination of the policies which may cause conflicts.</p>
<p>In the viewpoint of conflict detection, these researches differ from our proposed method detecting conflicts based on the service chain using the HNS component model. On the other hand, it is significant to apply the dynamic and scalable conflict detection method to our detection technique.</p>
<p>Charalambides <italic>et al.</italic> [<xref ref-type="bibr" rid="b14-sensors-12-08447">14</xref>] have proposed conflict analysis using Event Calculus in the domain of QoS management. In the analysis method, they used abductive reasoning to detect the potential conflicts. Furthermore, they have identified a number of potential conflicts, and have classified them. In the classification, the redundancy conflict and the mutual exclusion conflict can be considered as some kinds of feature interactions in HNS [<xref ref-type="bibr" rid="b4-sensors-12-08447">4</xref>] However, in this paper, we proposed FI detection method based on the service chain which differs from conventional FIs such as redundancy and mutual exclusion.</p>
<p>Shankar <italic>et al.</italic> [<xref ref-type="bibr" rid="b15-sensors-12-08447">15</xref>] have proposed a method to detect conflicts and cycles in policies based on their rule framework “Event-Condition-Precondition-Action-Postcondition” in pervasive systems. Their conflict detection method using the rule framework ECPAP resembles our proposed method. However, since they assume that the framework is used in general-purpose pervasive systems, the subjects peculiar to the sensor-driven services in HNS have not necessarily been solved. We have proposed our framework which takes multiple different kinds of environment properties into account. Furthermore, our framework provides the concrete conditions under which each potential conflict may arise and estimation of severity of the conflicts quantitatively.</p></sec></sec>
<sec sec-type="conclusions">
<label>9.</label>
<title>Conclusions</title>
<p>In this paper, we have proposed a method that detects service chains among sensor-driven services in the home network system (HNS), and evaluates the severity of the detected service chains. The proposed method adopts the ECA rules for the service description, and introduces the environment effect model to define the effect of the appliances to the environment, explicitly. We also implemented the proposed method as a tool and detected 11 service chains and 6 feature interactions among 7 practical services. Based on our method, we proposed systematic resolution schemes of undesirable service chains. Extending the method for general sensor services outside the HNS is also a challenging issue.</p></sec></body>
<back>
<ref-list>
<title>References</title>
<ref id="b1-sensors-12-08447"><label>1.</label><citation citation-type="web"><person-group person-group-type="author"><collab>Panasonic Electric Works Co., Ltd.</collab></person-group><article-title>eco ideas HOUSE</article-title><comment>Available online: <ext-link xlink:href="http://panasonic.co.jp/ecohouse/en/Homenetwork/index.html" ext-link-type="uri">http://panasonic.co.jp/ecohouse/en/Homenetwork/index.html</ext-link> (accessed on 20 June 2012)</comment></citation></ref>
<ref id="b2-sensors-12-08447"><label>2.</label><citation citation-type="web"><person-group person-group-type="author"><collab>Toshiba Lighting &amp; Technology Corporation</collab></person-group><article-title>Toshiba Network Appliance Feminity</article-title><comment>Available online: <ext-link xlink:href="http://feminity.toshiba.co.jp/feminity/feminity_eng/about/index.html" ext-link-type="uri">http://feminity.toshiba.co.jp/feminity/feminity_eng/about/index.html</ext-link> (accessed on 20 June 2012)</comment></citation></ref>
<ref id="b3-sensors-12-08447"><label>3.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Igaki</surname><given-names>H.</given-names></name><name><surname>Nakamura</surname><given-names>M.</given-names></name></person-group><article-title>Modeling and detecting feature interactions among integrated services of home network systems</article-title><source>IEICE Trans. Inf. Syst.</source><year>2010</year><volume>E93-D</volume><fpage>822</fpage><lpage>833</lpage><pub-id pub-id-type="doi">10.1587/transinf.E93.D.822</pub-id></citation></ref>
<ref id="b4-sensors-12-08447"><label>4.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Nakamura</surname><given-names>M.</given-names></name><name><surname>Igaki</surname><given-names>H.</given-names></name><name><surname>Yoshimura</surname><given-names>Y.</given-names></name><name><surname>Ikegami</surname><given-names>K.</given-names></name></person-group><article-title>Considering Online Feature Interaction Detection and Resolution for Integrated Services in Home Network System</article-title><conf-name>Proceedings of the 10th International Conference on Feature Interactions in Telecommunications and Software Systems (ICFI2009)</conf-name><conf-loc>Lisbon, Portugal</conf-loc><conf-date>11–12 June 2009</conf-date><fpage>191</fpage><lpage>206</lpage></citation></ref>
<ref id="b5-sensors-12-08447"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nakamura</surname><given-names>M.</given-names></name><name><surname>Tanaka</surname><given-names>A.</given-names></name><name><surname>Igaki</surname><given-names>H.</given-names></name><name><surname>Matsumoto</surname><given-names>K.</given-names></name></person-group><article-title>Constructing home network systems and integrated services using legacy home appliances and web services</article-title><source>Int. J. Web Serv. Res.</source><year>2008</year><volume>5</volume><fpage>82</fpage><lpage>98</lpage><pub-id pub-id-type="doi">10.4018/jwsr.2008010105</pub-id></citation></ref>
<ref id="b6-sensors-12-08447"><label>6.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>F.</given-names></name><name><surname>Turner</surname><given-names>K.J.</given-names></name></person-group><article-title>Policy Conflicts in Home Care System</article-title><conf-name>Proceedings of the 9th International Conference on Feature Interactions in Telecommunications and Software Systems (ICFI2007)</conf-name><conf-loc>Grenoble, France</conf-loc><conf-date>3–5 September 2007</conf-date><fpage>54</fpage><lpage>65</lpage></citation></ref>
<ref id="b7-sensors-12-08447"><label>7.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kolberg</surname><given-names>M.</given-names></name><name><surname>Magill</surname><given-names>E.</given-names></name><name><surname>Wilson</surname><given-names>M.E.</given-names></name></person-group><article-title>Compatibility issues between services supporting networked appliances</article-title><source>IEEE Commun. Mag.</source><year>2003</year><volume>41</volume><fpage>136</fpage><lpage>147</lpage></citation></ref>
<ref id="b8-sensors-12-08447"><label>8.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Wilson</surname><given-names>M.</given-names></name><name><surname>Kolberg</surname><given-names>M.</given-names></name><name><surname>Magill</surname><given-names>E.</given-names></name></person-group><article-title>Considering Side Effects in Service Interactions in Home Automation—an Online Approach</article-title><conf-name>Proceedings of the 9th International Conference on Feature Interactions in Software and Communication Systems (ICFI2007)</conf-name><conf-loc>Grenoble, France</conf-loc><conf-date>3–5 September 2007</conf-date><fpage>172</fpage><lpage>187</lpage></citation></ref>
<ref id="b9-sensors-12-08447"><label>9.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Layouni</surname><given-names>A.F.</given-names></name><name><surname>Logrippo</surname><given-names>L.</given-names></name><name><surname>Turner</surname><given-names>K.J.</given-names></name></person-group><article-title>Conflict detection in call control using first-order logic model checking</article-title><conf-name>Proceedings of 9th Int. Conf. on Feature Interactions in Software and Communications Systems (ICFI2007)</conf-name><conf-loc>Grenoble, France</conf-loc><conf-date>3–5 September 2007</conf-date><fpage>66</fpage><lpage>82</lpage></citation></ref>
<ref id="b10-sensors-12-08447"><label>10.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ter Beek</surname><given-names>M.H.</given-names></name><name><surname>Gnesi</surname><given-names>S.</given-names></name><name><surname>Montangero</surname><given-names>C.</given-names></name><name><surname>Semini</surname><given-names>L.</given-names></name></person-group><article-title>Detecting policy conflicts by model checking UML state machines</article-title><source>Featur. Interact. Softw. Commun. Syst. X</source><year>2009</year><volume>0</volume><fpage>59</fpage><lpage>74</lpage></citation></ref>
<ref id="b11-sensors-12-08447"><label>11.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Nakamura</surname><given-names>M.</given-names></name><name><surname>Matsuo</surname><given-names>S.</given-names></name><name><surname>Matsumoto</surname><given-names>S.</given-names></name><name><surname>Sakamot</surname><given-names>H.</given-names></name><name><surname>Igaki</surname><given-names>H.</given-names></name></person-group><article-title>Application Framework for Efficient Development of Sensor as a Service for Home Network System</article-title><conf-name>Proceedings of the IEEE International Conference on Services Computing (SCC2011)</conf-name><conf-loc>Washington DC, USA</conf-loc><conf-date>4–9 July 2011</conf-date><fpage>576</fpage><lpage>583</lpage></citation></ref>
<ref id="b12-sensors-12-08447"><label>12.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lupu</surname><given-names>E.</given-names></name><name><surname>Sloman</surname><given-names>M.</given-names></name></person-group><article-title>Conflicts in policy-based distributed systems management</article-title><source>IEEE Trans. Softw. Eng.</source><year>1999</year><volume>25</volume><fpage>852</fpage><lpage>869</lpage><pub-id pub-id-type="doi">10.1109/32.824414</pub-id></citation></ref>
<ref id="b13-sensors-12-08447"><label>13.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Dunlop</surname><given-names>N.</given-names></name><name><surname>Indulska</surname><given-names>J.</given-names></name><name><surname>Raymond</surname><given-names>K.</given-names></name></person-group><article-title>Dynamic Conflict Detection in Policy-Based Management Systems</article-title><conf-name>Proceedings of Sixth International Enterprise Distributed Object Computing Conference</conf-name><conf-loc>Lausanne, Switzerland</conf-loc><conf-date>17–20 September, 2002</conf-date><fpage>15</fpage><lpage>26</lpage></citation></ref>
<ref id="b14-sensors-12-08447"><label>14.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Charalambides</surname><given-names>M.</given-names></name><name><surname>Flegkas</surname><given-names>P.</given-names></name><name><surname>Pavlou</surname><given-names>G.</given-names></name><name><surname>Bandara</surname><given-names>A.</given-names></name><name><surname>Lupu</surname><given-names>E.</given-names></name><name><surname>Russo</surname><given-names>A.</given-names></name><name><surname>Dulav</surname><given-names>N.</given-names></name><name><surname>Sloman</surname><given-names>M.</given-names></name><name><surname>Rubio-Loyola</surname><given-names>J.</given-names></name></person-group><article-title>Policy Conflict Analysis for Quality of Service Management</article-title><conf-name>Proceedings of Sixth IEEE International Workshop on Policies for Distributed Systems and Networks</conf-name><conf-loc>Stockholm, Sweden</conf-loc><conf-date>6–8 June 2005</conf-date><fpage>99</fpage><lpage>108</lpage></citation></ref>
<ref id="b15-sensors-12-08447"><label>15.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Shankar</surname><given-names>C.</given-names></name><name><surname>Campbell</surname><given-names>R.</given-names></name></person-group><article-title>A Policy-Based Management Framework for Pervasive Systems Using Axiomatized Rule-Actions</article-title><conf-name>Proceedings of Fourth IEEE International Symposium on Network Computing and Applications</conf-name><conf-loc>Cambridge, MA, USA</conf-loc><conf-date>27–29 July 2005</conf-date><fpage>255</fpage><lpage>258</lpage></citation></ref></ref-list>
<sec sec-type="display-objects">
<title>Figures and Tables</title>
<fig id="f1-sensors-12-08447" position="float">
<label>Figure 1.</label>
<caption>
<p>Service description of sensor-driven services with ECA rules.</p></caption>
<graphic xlink:href="sensors-12-08447f1.gif"/></fig>
<fig id="f2-sensors-12-08447" position="float">
<label>Figure 2.</label>
<caption>
<p>Service chain/FI detection system Architecture.</p></caption>
<graphic xlink:href="sensors-12-08447f2.gif"/></fig>
<table-wrap id="t1-sensors-12-08447" position="float">
<label>Table 1.</label>
<caption>
<p>Environment Effect Model. (<bold>a</bold>) Air-Conditioner; (<bold>b</bold>) TV; (<bold>c</bold>) Light.</p></caption>
<table frame="above" rules="groups">
<thead>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="3" align="center" valign="top"><bold>Method</bold></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="3" align="center" valign="bottom">
<hr/></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th align="center" valign="top"><bold>off()</bold></th>
<th align="center" valign="top"><bold>heating(setTemp)</bold></th>
<th align="center" valign="top"><bold>cooling(setTemp)</bold></th></tr></thead>
<tbody>
<tr>
<td align="left" valign="middle" rowspan="11">State</td>
<td align="left" valign="middle" rowspan="3">OFF</td>
<td align="left" valign="top" rowspan="3">next : OFF</td>
<td align="left" valign="top">env. electricity += 1500</td>
<td align="left" valign="top">env. electricity += 1500</td></tr>
<tr>
<td align="left" valign="top">env. temperature = setTemp</td>
<td align="left" valign="top">env. temperature = setTemp</td></tr>
<tr>
<td align="left" valign="top">next : HEATING</td>
<td align="left" valign="top">next : COOLING</td></tr>
<tr>
<td align="left" valign="bottom" colspan="4">
<hr/></td></tr>
<tr>
<td align="left" valign="middle" rowspan="3">HEATING</td>
<td align="left" valign="top">env.electricity -= 1500</td>
<td align="left" valign="top">env. temperature = setTemp</td>
<td align="left" valign="top">env.temperature = setTemp</td></tr>
<tr>
<td align="left" valign="top">env.temperature =10</td>
<td align="left" valign="top" rowspan="2">next : HEATING</td>
<td align="left" valign="top" rowspan="2">next : COOLING</td></tr>
<tr>
<td align="left" valign="top">next : OFF</td></tr>
<tr>
<td align="left" valign="bottom" colspan="4">
<hr/></td></tr>
<tr>
<td align="left" valign="middle" rowspan="3">COOLING</td>
<td align="left" valign="top">env.electricity -= 1500</td>
<td align="left" valign="top">env.temperature = setTemp</td>
<td align="left" valign="top">env.temperature = setTemp</td></tr>
<tr>
<td align="left" valign="top">env.temperature =10</td>
<td align="left" valign="top" rowspan="2">next : HEATING</td>
<td align="left" valign="top" rowspan="2">next : COOLING</td></tr>
<tr>
<td align="left" valign="top">next : OFF</td></tr>
<tr>
<td align="left" valign="bottom" colspan="5">
<hr/></td></tr>
<tr>
<td colspan="5" align="center" valign="top">(<bold>a</bold>)</td></tr></tbody></table>
<table frame="above" rules="groups">
<thead>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="2" align="center" valign="top"><bold>Method</bold></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="2" align="center" valign="bottom">
<hr/></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th align="center" valign="top"><bold>off()</bold></th>
<th align="center" valign="top"><bold>on()</bold></th></tr></thead>
<tbody>
<tr>
<td align="left" valign="middle" rowspan="7">State</td>
<td align="left" valign="middle" rowspan="3">OFF</td>
<td align="left" valign="top" rowspan="3">next : OFF</td>
<td align="left" valign="top">env.electricity += 500</td></tr>
<tr>
<td align="left" valign="top">envbrightness += 200</td></tr>
<tr>
<td align="left" valign="top">next : ON</td></tr>
<tr>
<td align="left" valign="bottom" colspan="3">
<hr/></td></tr>
<tr>
<td align="left" valign="middle" rowspan="3">ON</td>
<td align="left" valign="top">electricity -= 500</td>
<td align="left" valign="top" rowspan="3">next : ON</td></tr>
<tr>
<td align="left" valign="top">env.brightness -= 200</td></tr>
<tr>
<td align="left" valign="top">next : OFF</td></tr>
<tr>
<td align="left" valign="bottom" colspan="4">
<hr/></td></tr>
<tr>
<td colspan="4" align="center" valign="top">(<bold>b</bold>)</td></tr></tbody></table>
<table frame="above" rules="groups">
<thead>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="3" align="center" valign="top"><bold>Method</bold></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th colspan="3" align="center" valign="bottom">
<hr/></th></tr>
<tr>
<th colspan="2" align="center" valign="top"/>
<th align="center" valign="top"><bold>off()</bold></th>
<th align="center" valign="top"><bold>on()</bold></th>
<th align="center" valign="top"><bold>setBrightness(setB)</bold></th></tr></thead>
<tbody>
<tr>
<td align="left" valign="middle" rowspan="9">State</td>
<td align="left" valign="top"/>
<td align="left" valign="top" rowspan="4">next : OFF</td>
<td align="left" valign="top">env.brightness +=</td>
<td align="left" valign="top">env.brightness += 100 * setB</td></tr>
<tr>
<td align="left" valign="top" rowspan="3">OFF</td>
<td align="left" valign="top">100 * this.bLevel</td>
<td align="left" valign="top">env.electricity +=50</td></tr>
<tr>
<td align="left" valign="top">env.electricity +=50</td>
<td align="left" valign="top">this.bLevel = setB</td></tr>
<tr>
<td align="left" valign="top">next : ON</td>
<td align="left" valign="top">next : ON</td></tr>
<tr>
<td align="left" valign="bottom" colspan="4">
<hr/></td></tr>
<tr>
<td align="left" valign="top"/>
<td align="left" valign="top">env.brightness -=</td>
<td align="left" valign="top" rowspan="4">next : ON</td>
<td align="left" valign="top">env.brightness +=</td></tr>
<tr>
<td align="left" valign="top" rowspan="3">ON</td>
<td align="left" valign="top">100 * this.bLevel</td>
<td align="left" valign="top">100 *(setB-this.bLevel)</td></tr>
<tr>
<td align="left" valign="top">env.electricity -=50</td>
<td align="left" valign="top">this.bLevel = setB</td></tr>
<tr>
<td align="left" valign="top">next : OFF</td>
<td align="left" valign="top">next : ON</td></tr>
<tr>
<td align="left" valign="bottom" colspan="5">
<hr/></td></tr>
<tr>
<td align="center" valign="top" colspan="5">(<bold>c</bold>)</td></tr></tbody></table></table-wrap>
<table-wrap id="t2-sensors-12-08447" position="float">
<label>Table 2.</label>
<caption>
<p>Service prior expectations.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th colspan="2" align="center" valign="top" rowspan="2"/>
<th colspan="3" align="center" valign="top" content-type="background-color:#CCFFCC">Environment Property</th></tr>
<tr>
<th align="center" valign="top">temperature</th>
<th align="center" valign="top">brightness</th>
<th align="center" valign="top">electricity</th></tr></thead>
<tbody>
<tr>
<td align="left" valign="middle" rowspan="7" content-type="background-color:#FF99CC">Service</td>
<td align="center" valign="top">DVD-T</td>
<td align="center" valign="top"/>
<td align="center" valign="top">○</td>
<td align="center" valign="top"/></tr>
<tr>
<td align="center" valign="top">ALC</td>
<td align="center" valign="top"/>
<td align="center" valign="top">○</td>
<td align="center" valign="top"/></tr>
<tr>
<td align="center" valign="top">ARH</td>
<td align="center" valign="top">○</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="center" valign="top">ESAC</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top">○</td></tr>
<tr>
<td align="center" valign="top">ARC</td>
<td align="center" valign="top">○</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="center" valign="top">LH</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top">○</td></tr>
<tr>
<td align="center" valign="top">ESIA</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top">○</td></tr></tbody></table></table-wrap>
<table-wrap id="t3-sensors-12-08447" position="float">
<label>Table 3.</label>
<caption>
<p>Service chain/Feature Interaction detection result.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th colspan="2" align="center" valign="top" rowspan="2"/>
<th colspan="7" align="center" valign="top" content-type="background-color:#CCFFCC">Second Service S<sub>B</sub></th></tr>
<tr>
<th align="center" valign="top">DVD-T</th>
<th align="center" valign="top">ALC</th>
<th align="center" valign="top">ARH</th>
<th align="center" valign="top">ESAC</th>
<th align="center" valign="top">ARC</th>
<th align="center" valign="top">LH</th>
<th align="center" valign="top">ESIA</th></tr></thead>
<tbody>
<tr>
<td align="center" valign="middle" rowspan="7" content-type="background-color:#FF99CC">First Service S<sub>A</sub></td>
<td align="left" valign="middle">DVD-T</td>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">ALC</td>
<td align="center" valign="top"/>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">ARH</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">ESAC</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain</td>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">ARC</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain</td>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">LH</td>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top" content-type="background-color:#969696"/>
<td align="center" valign="top"/></tr>
<tr>
<td align="left" valign="middle">ESIA</td>
<td align="center" valign="top"/>
<td align="center" valign="top">Chain</td>
<td align="center" valign="top">Chain<break/>FI</td>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top"/>
<td align="center" valign="top" content-type="background-color:#969696"/></tr></tbody></table></table-wrap></sec></back></article>
