<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Insertion Modeling System And Constraint Programming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander A. Letichevsky</string-name>
          <email>let@cyfra.net</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olexander A.Letychevskyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladimir S. Peschanenko</string-name>
          <email>vladimirius@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Igor O. Blynov</string-name>
          <email>anubis.igor@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitry M. Klionov</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Glushkov Institute of Cybernetics, Academy of Sciences of</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Kherson State University</institution>
        </aff>
      </contrib-group>
      <fpage>51</fpage>
      <lpage>64</lpage>
      <abstract>
        <p>The paper relates to practical aspects of insertion modeling. Insertion modeling system is an environment for the development of insertion machines, used to represent insertion models of distributed systems. The architecture of insertion machines and insertion modeling system IMS is presented. Insertion machine for constraint programming is specified as an example, and as a starting point of 'verifiable programming' project.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Insertion modeling is the approach to modeling complex distributed systems
based on the theory of interaction of agents and environments [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1–3</xref>
        ].
Mathematical foundation of this theory was presented in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. During the last decade
insertion modeling was applied to the verification of requirements for software
systems [
        <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8 ref9">5–9</xref>
        ].
      </p>
      <p>
        First time the theory of interaction of agents and environments was proposed
as an alternative to well known theories of interaction such as Milner’s CCS [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
and pi-calculus [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], Hoare’s CSP [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], Cardelli’s mobile ambients [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and so
on. The idea of decomposition of a system to a composition of environment
and agents inserted into this environment implicitly exists in all theories of
interaction and for some special case it appears explicitly in the model of mobile
ambients.
      </p>
      <p>
        Another source of ideas for insertion modeling is the search of universal
programming paradigms such as Gurevich’s ASM [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], Hoare’s unified theories of
programming [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], rewriting logic of Meseguer [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. These ideas were taken as a
basis for the system of insertion programming [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] developed as the extension
of algebraic programming system APS [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. Now this system initiated the
development of insertion modeling system IMS which started in Glushkov Institute
of Cybernetics. The development of this system is based on the version of APS
enhanced by the former student of the author V.Peschanenko. The first version
of IMS and some simple examples of its use are available from [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>To implement the insertion model in IMS one must develop insertion machine
with easily extensible input language, the rules to compute insertion functions
and a program of interpretation and analyzing of insertion models. The
architecture, input languages and examples of insertion machines and insertion modeling
system are considered in the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The Architecture of Insertion Modeling System</title>
      <p>
        Insertion modeling system is an environment for the development of insertion
machines and performing experiments with them. The notion of insertion
machine was first introduced in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] and it was used as a tool for programming
with some special class of insertion functions. Later this notion was extended
for more wide area of applications, different levels of abstraction, and multilevel
structures.
      </p>
      <p>Insertion model of a system represent this system as a composition of
environment and agents inserted into it. Contrariwise the whole system as an agent
can be inserted into another environment. In this case we speak about internal
and external environment of a system. Agents inserted into the internal
environment of a system themselves can be environments with respect to their internal
agents. In this case we speak about multilevel structure of agent or environment
and about high level and low level environments.</p>
      <p>
        As usually, insertion function is denoted as E[u] were E is the state of
environment and u is the state of an agent (agent in a given state). E[u] is a new
environment state after insertion an agent u. So, the expression E[u[v], F [x, y, z]]
denotes the state of a two level environment with two agents inserted into it. At
the same time E is an external environment of a system F [x, y, z] and F is an
internal environment of it. All agents and environments are labeled or attributed
transition systems (labeled systems with states labeled by attribute labels [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]).
The states of transition systems are considered up to bisimilarity. This means
that we should adhere to the following restriction in the definition of states: if
E ∼B E0 and u ∼B u0 then E[u] ∼B E0[u0].
      </p>
      <p>The main invariant of bisimilarity is the behavior beh(E) of transition system
in the state E (an oriented tree with edges labeled by actions and nodes labeled
by attribute labels). Therefore the restriction above can be written as follows:
beh(E) = beh(E0) ∧ beh(u) = beh(u0) ⇒ beh(E[u]) = beh(E0[u0])
Behaviors themselves can be considered as states of transition systems. If the
states are behaviors then the relation above is valid automatically, because in this
case beh(E) = E, beh(u) = u. Otherwise the correctness of insertion function
must be proved in addition to its definition. In any case we shall identify the
states with the corresponding behaviors independently from their representation.</p>
      <p>
        To define finite behaviors we use the language of behavior algebra (a kind of
process algebra defined in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). This algebra has operation of prefixing,
nondeterministic choice, termination constants (Δ, 0, ⊥) and approximation relation. For
attributed transition systems we introduce the labeling operator for behaviors.
To define infinite behaviors we use equations in behavior algebra. Usually these
equations have the form of recursive definitions ui = Fi(u), i ∈ I. Left hand sides
of these definitions can depend on parameters ui(xi) = Fi(u, x), i ∈ I. To define
the attribute labels we use the set of attributes, symbols taking their values in
corresponding data domains. These attributes constitute a part of a state of a
system and change their values in time. All attributes are devided to external
(observable) and internal (nonobservable). By default the attribute label of a
state is the set of values of all observable attributes for this state.
      </p>
      <p>The general architecture of insertion machine is represented on the fig. 1.</p>
      <p>The main component of insertion machine is model driver, the component
which controls the machine movement along the behavior tree of a model. The
state of a model is represented as a text in the input language of insertion
machine and is considered as an algebraic expression. The input language include
the recursive definitions of agent behaviors, the notation for insertion function,
and possibly some compositions for environment states. The state of a system
must be reduced to the form E[u1, u2, . . . ]. This functionality is performed by
the module called agent behavior unfolder. To make the movement, the state of
environment must be reduced to the normal form</p>
      <p>X ai.Ei + ε
i∈I
where ai are actions, Ei are environment states, ε is a termination constant. This
functionality is performed by the module environment interactor. It computes
the insertion function calling if it is necessary the agent behavior unfolder. If
the infinite set I of indices in the normal is allowed, then the weak normal form
a.F + G is used, where G is arbitrary expression of input language.</p>
      <p>Two kinds of insertion machines are considered: real type or interactive and
analytical insertion machines. The first ones exist in the real or virtual
environment, interacting with it in the real or virtual time. Analytical machines
intended for model analyses, investigation of its properties, solving problems
etc. The drivers for two kinds of machines correspondingly are also divided on
interactive and analytical drivers.</p>
      <p>Interactive driver after normalizing the state of environment must select
exactly one alternative and perform the action specified as a prefix of this
alternative. Insertion machine with interactive driver operates as an agent inserted into
external environment with insertion function defining the laws of functioning
of this environment. External environment, for example, can change a
behavior prefix of insertion machine according to their insertion function. Interactive
driver can be organized in a rather complex way. If it has criteria of successful
functioning in external environment intellectual driver can accumulate the
information about its past, develop the models of external environment, improve
the algorithms of selecting actions to increase the level of successful functioning.
In addition it can have specialized tools for exchange the signals with external
environment (for example, perception of visual or acoustical information, space
movement etc.).</p>
      <p>Analytical insertion machine as opposed to interactive one can consider
different variants of making decision about performed actions, returning to choice
points (as in logic programming) and consider different paths in the behavior
tree of a model. The model of a system can include the model of external
environment of this system, and the driver performance depends on the goals of
insertion machine. In the general case analytical machine solves the problems
by search of states, having the corresponding properties(goal states) or states in
which given safety properties are violated. The external environment for
insertion machine can be represented by a user who interacts with insertion machine,
sets problems, and controls the activity of insertion machine.</p>
      <p>Analytical machine enriched by logic and deductive tools can be used for
symbolic modeling. The state of symbolic model is represented by means of
properties of the values of attributes rather then their concrete values.</p>
      <p>General architecture of insertion modeling system is represented on fig. 2.
High level model driver provides the interface between the system and external
environment including the users of the system. Design tools based on algebraic
programming system APS are used for the development of insertion machines
and model drivers for different application domains and modeling technologies.
Verification tools are used for the verification of insertion machines, proving
their properties statically or dynamically. Dynamic verification uses generating
symbolic model traces by means of special kinds of analytical model drivers and
deductive components.</p>
      <p>The repository of insertion machines collects already developed machines and
their components which can be used for the development of new machines as
their components or templates for starting. Special library of APLAN functions
supports the development and design in new projects. The C++ library for IMS
supports APLAN compilers and efficient implementation of insertion machines.
Deductive system provides the possibility of verification of insertion models.</p>
    </sec>
    <sec id="sec-3">
      <title>Input Languages of Insertion Machines</title>
      <p>Input language of insertion machine is used to describe the properties of a model
and its behavior. This description consists of the following parts: environment
description, behavior description (including the behavior of environment and the
behaviors of agents), and insertion function. The behavior description has the
following very simple syntax:
&lt;behavior&gt;::= Delta | bot | 0 | &lt; action &gt; | &lt;action&gt; . &lt;behavior&gt; |
&lt;behavior&gt; + &lt;behavior&gt;|
&lt;environment state&gt;[&lt;list of named agent behaviors separated by ,&gt;]|
&lt;functional expression&gt;
&lt;named agent behavior&gt;::=&lt;agent name&gt;:&lt;behavior&gt;</p>
      <p>Therefore, the language of behavior algebra (termination constants,
prefixing and nondeterministic choice) is extended by functionals expressions and
explicit representation of insertion function. The syntax and semantics of actions,
environment states, and functional expressions are defined in the environment
description. We shall not consider all possibilities and details of environment
description language restricting ourselves by making only some necessary
comments.</p>
      <p>First of all note, that all main components of behavior algebra language
(actions, environment states, and functional expressions) are algebraic or logic
expressions of base language (terms and formulas). This language is a
multisorted (multitype) first order logic language. The signature of this language is
defined in the environment description. Functional and predicate symbols can
be interpreted and uninterpreted. Interpreted symbols have fixed domains and
interpretations given by algorithms of computing values or reducing to canonical
forms. All uninterpreted symbols have types and their possible interpretations
are restricted by definite domains and ranges. Uninterpreted functional
symbols are called attributes. They represent the changing part of the environment.
Attributes of arity 0 are called simple attributes, others are called functional
ones. Predicates are considered as functions ranging in Boolean type {0, 1}. If
an attribute f has functional type (τ1, τ2, . . .) → τ then attribute expressions
f (t1, t2, . . .) are available for all other expressions.
3.1</p>
      <p>Examples of Insertion Machines
The simplest insertion machines are machines for parallel and sequential
insertion. Insertion function is called sequential if E[u, v] = E[u; v] where ”;” means
sequential composition of behaviors. Special case of sequential insertion is a
strong sequential composition: E[u] = (E; u). This definition assumes that
actions of agents and environment are the same and environment is defined by
its behaviors. The sequentiality of this composition follows from associativity of
sequential composition of behaviors.</p>
      <p>Example of insertion machine with strong sequential insertion is represented
on fig. 3.</p>
      <sec id="sec-3-1">
        <title>Model Sequential</title>
        <p>interactor rs(P,Q,a)(</p>
        <p>Delta[P+Q]=Delta[P]+Delta[Q],
Delta[a.P]=a.Delta[P],
Delta[P]=Delta[unfold P],</p>
        <p>Q[P]=(Q;P)
)
);
unfolder rs(x,y)(
(x;y)=seq(x,y),
A=a.A+Delta,</p>
        <p>C=c.C+Delta
);
initial(C[A]);
terminal(Delta[Delta])
Fig. 3. Example of Strong Sequential Insertion
u →au0</p>
        <p>u=u+ε</p>
        <p>The function seq is a function from IMS library that defines the sequential
composition of behaviors:
(u; v) = X a.(u0; v) +</p>
        <p>X (ε; v), (0; v) = 0, (Δ; v) = v, (⊥; v) = ⊥
The function unfold reduces the behavior expression to normal form P ai.ui +ε.
This insertion machine generates a word cnam with nondeterministically chosen
m, n ≥ 0 and successfully terminates. We can define as the condition for the
goal state the equality m = n and the driver for this machine will terminate on
traces cnan.</p>
        <p>An example of sequential (not strong) insertion is shown on fig. 4.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Model Imperative(</title>
        <p>insertion rs(P,Q,H,a,x,y,u,v)(</p>
        <p>E[P+Q]=Delta[P]+Delta[Q],
E[define env H.P]=H[P],
E[(x:=y).P]=assign proc(E,x,y,P),
E[check(u,x,y).P]=if(compute obj(E,u),E[x;P],E[y;P]),
E[a.P]=a.Delta[P],</p>
        <p>E[P]=E[unfold P]
)where(</p>
        <p>assign proc:=proc(E,x,y,P)(E.x−→compute obj(E,y);return E[P])
);
behaviors rs(P,Q,x,y,z,u)(
(x;y)=seq(x,y),
(u→ else Q)=check(u,P,Q),
while(u,P)=check(u,(P;while(u,P)),Delta),
for(x,y,z,P)=(x;while(y,(P;z)))
);
initial(
define env obj(i:Nil,x:10,y:Nil,fact:Nil);
y:=1;for(i:=1,i ≤ x,i:=i+1,y:=y*i);
fact:=y
);
terminal rs(E)(E[Delta]=1,E=0)
)
Fig. 4. Model of Simple Imperative Language</p>
        <p>This example is a model of simple imperative language and can be considered
as insertion representation of its operational semantics.</p>
        <p>Insertion function is called a parallel insertion function if E[u, v] = E[u k v].
Special case of parallel composition is a strong parallel insertion:E[u] = E k u].
As in the case of strong sequential composition this definition assumes that
actions of environment and agents are the same. Example of a model with strong
parallel insertion is presented on the fig. 5. Functions synchr, lmrg, and delta
from IMS library are used for definition of parallel composition. Their meaning
can be define by the following formulas:
synchr(x, y) =</p>
        <p>X (a × b).(x0, y0),</p>
      </sec>
      <sec id="sec-3-3">
        <title>Model Parallel</title>
        <p>interactor rs(P,Q,a)(</p>
        <p>Delta[P+Q]=Delta[P]+Delta[Q],
Delta[a.P]=a.Delta[P],
Delta[P]=Delta[unfold P],</p>
        <p>Q[P]=(Q k P )
);
unfolder rs(x,y,n)(
(x;y)=seq(x,y),
x k y = synchr(x,y)+lmrg(x,y)+lmrg(y,x)+delta(x,y),
x |ˆ 1=x,
x |ˆ 2=synchr(x,x)+lmrg(x,x)+delta(x,x),
x |ˆ n= x k (x |ˆ(n-1))),
);
initial (Delta[((a;b) k (a;b));a+b ]);
terminal (Delta[Delta])
)
lmrg(x, y) = X a. (x0 k y) , delta(x, y) =</p>
        <p>X ε k μ
x →aa0
x=x+ε
y=y+μ
3.2</p>
        <p>Restrictions on Insertion Functions
The most typical restriction is additivity. Insertion function is called additive if
E[u+v] = E[u]+E[v], (E +F )[u] = E[u]+F [u]. Another restriction, which allow
to reduce the number of considered alternatives when behaviors are analyzed is
the commutativity of insertion function: E[u, v] = E[v, u]. Especially the parallel
insertion is a commutative one. Some additional equations: 0[u] = 0, Δ[u] =
u, ⊥[u] = bot.</p>
        <p>The state of environment is called indecomposable if from E = F [u] it follows
that E = F and u = Δ. Equality means bisimilarity. The set of all
indecomposable states constitutes the kernel of a system. Indecomposable states (if they
exist) can be considered as states of environment without inserted agents. For
indecomposable states usually the following equations hold: E[0] = 0, E[Δ] =
E, E[⊥] = ⊥.</p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] the classification of insertion functions was presented: one-step
insertion, head insertion, and look-ahead insertion. Later we shall use insertion
functions with the following main rule:
        </p>
        <p>E →a E0, α : u →b β : u0
E[α : u] →c E0[β : u0]
, P (E, a, α, b, β, c),
where P is a continuous predicate. Continuous means that the value of this
predicate depends only on some part of behavior tree in the environment state
E, which has a finite height (prefix of the tree E of finite height). Hereby, this
rule refers to a head insertion. The rules for indecomposable environment states
and for termination constants should be added to the main rule.</p>
        <p>The next rule</p>
        <p>E →a E0, u →b β : u0</p>
        <p>E [u] →c E0[u0]
, P (E, a, c),
is the particular case for the head insertion rule in combination with additivity
and parallel insertion or commutativity requirements. Such rule will be named
permitted rule. It could be interpreted by as follows: agent can execute the action
a, and environment permits to execute this action. Predicate E for permitted
rule will be named permitted predicate.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Constraint Programming</title>
      <p>
        Constraint programming is a powerful paradigm for solving combinatorial search
problems that draws on a wide range of techniques from artificial intelligence,
computer science, databases, programming languages, and operations research.
Constraint programming is currently applied with success to many domains, such
as scheduling, planning, vehicle routing, configuration, networks, and
bioinformatics [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ].
      </p>
      <p>
        The Constraint programming paradigm has some resemblance to traditional
Operations Research (OR) approach, in that the general path to a solution is:
1. analyzing the problem to solve, in order to understand clearly which are its
parts;
2. determining which conditions(relationships) hold among those parts: these
relationships and conditions are key to the solving, for they will be used to
model the problem;
3. stating such conditions(relationships) as equations; to achieve this step not
only the right variables and relationships must be chosen: as we will see,
Constraint programming usually offers a series of different constraint systems,
some of which are better suited than others for a given task;
4. setting up these equations and solving them to produce a solution; this
is usually transparent to the user, because the language itself has built-in
solvers [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ].
      </p>
      <p>There are, however, notable differences with OR, mainly in the possibility
of selecting different domains of constraints, and in the dynamic, generation
of those constraints. This seamless combination of programming and equation
solving accounts for some of the unique components of Constraint Programming:
– the use of sound mathematical methods: well-known and proved algorithms
are provided as intrinsic, builtin components of Constraint programming
languages and tools;
– the provision of means to perform programmed search, especially in
Constraint programming (were search is implicit in language itself);
– the possibility of developing modular, hybrid models, when necessary: many
Constraint programming systems offer different constraint systems, which
can be combined to model the various parts of the problem using the tool
more adequate for them;
– the flexibility provided by the programming language used, which allows
the programmer to create the equations to be solved dynamically, possibly
depending on the input data.</p>
      <p>
        As with any other computational approach, all problems are amenable to be
tackled with Constraint programming; notwithstanding, there are some types of
problems which can be solved with comparatively little effort using Constraint
programming based tools. Those applications share some general characteristics:
– No general, efficient algorithms exist (NP-completeness): specific techniques
(heuristics) must be used. These are usually problems with a heavy
combinatorial part, and enumerating solutions is often impractical altogether.
A fast program using usual programming paradigms is often too hard and
complicated to produce, and normally it is so tied to the particular problem
that adapting it to a related problem is not easy.
– The problem specification has a dynamic component: it should be easy to
change programs rapidly to adapt. This has points in common with the
previous item: Constraint programming tools have builtin algorithms which
have been tuned to show good behavior in a variety of scenarios, so updating
the program to new conditions amounts to changing the setting up of the
equations.
– Decision support required: either automatically in the program or in
cooperation with the user. Many decisions can be encoded in mathematical formulae,
which appear as rules and which are handled by the internal solvers, so
(although, of course, not always) there is no need to program explicit decision
trees [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ].
      </p>
      <p>Among the applications with these characteristics, the following may be
cited: planning, scheduling, resource allocation, logistics, circuit design and
verification, finite state machines, financial decision making, transportation, spatial
databases, etc.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Insertion Machine for Constraint Programming</title>
      <p>
        Some example of insertion machines and restrictions for insertion function are
in [
        <xref ref-type="bibr" rid="ref23 ref3 ref9">3, 9, 23</xref>
        ]. In this section we try to show how to use insertion modelling for
constraint programming [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. The problems of constraint programming, where
a main goal is behavior of the system, is the closest to the insertion modelling.
For example, the problem of wolf-goat-cabbage [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] (A farmer wishes to transfer
(by boat) a wolf, a goat, and a cabbage from the left bank of a river to the
right bank. If left unsupervised, the wolf will eat the goat and the goat will eat
the cabbage, but nothing will happen as long as the farmer is near. Beside the
farmer there is only a place for one item in the boat).
      </p>
      <p>Let’s consider a formalization of this problem in insertion modelling. Let E
be the next enviroment:
obj(
constraints : rs(x, y, z)(
obj(W olf : lef t, Goat : lef t, x, F erryman : right) = 0,
obj(W olf : right, Goat : right, x, F erryman : lef t) = 0,
obj(x, Goat : lef t, Cabbage : lef t, F erryman : right) = 0,
obj(x, Goat : right, Cabbage : right, F erryman : lef t) = 0,
obj(W olf : z, x, y, F erryman : z) = 1,
obj(x, Goat : z, y, F erryman : z) = 1,
obj(x, y, Cabbage : z, F erryman : z) = 1
);
initial : obj(</p>
      <p>W olf : lef t,
Goat : lef t,
Cabbage : lef t,</p>
      <p>F erryman : lef t
)
)
where initial is initial state where all creatures are in left bank of the river,
constraits are constraint equations with right part of 0 define non possible cases
(0 is the neutral element of non-deterministic choice + of insertion modeling)
and with 1 if ferryman could transport thous creatures in that case. These both
values are covered by two different states of ferry: 1 is just before ferry and 0
after.</p>
      <p>The coresponded input data could be defined in the following way:
(f erry W olf k f erry Goat k f erry Cabbage).assetion constraints
So, the transition relation of the system is defined in fig. 6.</p>
      <p>ϕ [p] −f−e−rr−y−→x ϕi [p] , constraints(ϕ) = 1
ϕ [p] −a−s−s−et−io−n−c−o−n−st−r−ai−n−t→s 0, constraints(ϕ) = 0
ϕ [p] −f−e−rr−y−→x 0, constraints(ϕi) = 0 ∨ ¬constraints(ϕ) = 1
ϕ [p] −a−s−s−et−io−n−c−o−n−st−r−ai−n−t→s ϕ [p] , ¬constraints(ϕ) = 0
Fig. 6. Relations of System’s Transitions</p>
      <p>where ϕi is a new environment state without acception of constration
equation.</p>
      <p>Insertion modelling system has found 1 goal trace - all creatures are in other
coast and 10 visited traces - those traces cover all possible behaviors of such
system.
Typically IMS generated trace is defined by user. It could look like sequance
of actions or environment states etc. For this example, to simplify the view of
the traces we propose to use one uninterpreted action transport:
transport(¬(c = ϕi.F erryman), F erryman, x),
where operation . returns state of the ferryman and ¬ returns other coast.
So, goal state trace has the next view:
init
transport(right, F erryman, Shegoat)
transport(lef t, F erryman, N il)
transport(right, F erryman, W olf )
transport(lef t, F erryman, Shegoat)
transport(right, F erryman, Cabbage)
transport(lef t, F erryman, N il)
transport(right, F erryman, Shegoat)
where init is the initial state and N il means that ferryman is ferried along.</p>
      <p>In general case, insertion machine for constraint programming should use:
1. assetion constraints agents action in agent behaviour and initial state.
2. Environment description should have non empty section constraints.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>The main concepts of insertion modeling system has been considered in the
present paper. The system was successfully used for the development of
prototypes of the tools for industrial VRS (Verification of Requirement Specification)
system and research projects in Glushkov Institute of Cybernetics. Now it is used
for the development of program verification tool and ‘verifiable programming’
project, and for constraint programming. The system continues its enhancement
and new features are added while developing new projects.</p>
      <p>The far goal in the developing of IMS consists of getting of sufficiently rich
cognitive architecture to its basis, which could be used in the artificial intelligence
research.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D.R.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          :
          <article-title>A universal interpreter for nondeterministic concurrent programming languages</article-title>
          .In M. Gabbrielli (eds.),
          <article-title>Fifth Compulog network area meeting on language design and semantic analysis methods (</article-title>
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          :
          <article-title>A general theory of action languages</article-title>
          .
          <source>Cybernetics and System Analyses</source>
          , vol.
          <volume>1</volume>
          ,
          <fpage>16</fpage>
          -
          <lpage>36</lpage>
          (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          :
          <article-title>A Model for Interaction of Agents and Environments</article-title>
          . In D. Bert,
          <string-name>
            <given-names>C.</given-names>
            <surname>Choppy</surname>
          </string-name>
          , P. Moses, (eds.).
          <source>Recent Trends in Algebraic Development Techniques. LNCS</source>
          , vol.
          <year>1827</year>
          , pp.
          <fpage>311</fpage>
          -
          <lpage>328</lpage>
          . Springer (
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          <article-title>: Algebra of behavior transformations and its applications</article-title>
          . In V.B.
          <string-name>
            <surname>Kudryavtsev</surname>
            and
            <given-names>I.G</given-names>
          </string-name>
          .Rosenberg (eds).
          <source>Structural theory of Automata</source>
          , Semigroups, and
          <source>Universal Algebra, NATO Science Series II. Mathematics, Physics and Chemistry</source>
          , vol.
          <volume>207</volume>
          , pp.
          <fpage>241</fpage>
          -
          <lpage>272</lpage>
          . Springer (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Jervis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          , and
          <string-name>
            <surname>T.</surname>
          </string-name>
          <article-title>Weigert: Leveraging UML to Deliver Correct Telecom Applications</article-title>
          . In L. Lavagno, G. Martin,
          <string-name>
            <given-names>and B.</given-names>
            <surname>Selic</surname>
          </string-name>
          , (eds.).
          <article-title>UML for Real: Design of Embedded Real-Time Systems</article-title>
          . Kluwer Academic Publishers. Amsterdam (
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Letichevsky</given-names>
            <surname>Jr.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          , T. Weigert:
          <article-title>Basic Protocols, Message Sequence Charts, and the Verification of Requirements Specifications</article-title>
          .
          <source>Computer Networks</source>
          , vol.
          <volume>47</volume>
          ,
          <fpage>662</fpage>
          -
          <lpage>675</lpage>
          (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          , and T. Weigert:
          <article-title>Validation of Embedded Systems</article-title>
          . In R. Zurawski, (eds.).
          <source>The Embedded Systems Handbook</source>
          , CRC Press, Miami (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          , jr.,
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          , and
          <string-name>
            <surname>T.</surname>
          </string-name>
          <article-title>Weigert: System Specification with Basic Protocols</article-title>
          .
          <source>Cybernetics and System Analyses</source>
          , vol.
          <volume>4</volume>
          ,
          <fpage>479</fpage>
          -
          <lpage>493</lpage>
          (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Letichevsky</given-names>
            <surname>Jr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Nikitchenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          , and T. Weigert:
          <article-title>Insertion modeling in distributed system design</article-title>
          .
          <source>Problems of Programming</source>
          , vol.
          <volume>4</volume>
          ,
          <fpage>13</fpage>
          -
          <lpage>39</lpage>
          (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. R. Milner:
          <article-title>Communication and Concurrency</article-title>
          . Prentice
          <string-name>
            <surname>Hall</surname>
          </string-name>
          (
          <year>1989</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. R. Milner:
          <article-title>Communicating and Mobile Systems: the Pi Calculus</article-title>
          . Cambridge University Press (
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>C.A.R. Hoare</surname>
          </string-name>
          : Communicating Sequential Processes. Prentice
          <string-name>
            <surname>Hall</surname>
          </string-name>
          (
          <year>1985</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Cardelli</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          and
          <string-name>
            <surname>A.D.</surname>
          </string-name>
          <article-title>Gordon: Mobile Ambients</article-title>
          .
          <source>In Foundations of Software Science and Computational Structures</source>
          , Maurice Nivat (eds.), LNCS vol.
          <volume>1378</volume>
          , pp.
          <fpage>140</fpage>
          -
          <lpage>155</lpage>
          . Springer (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. Y. Gurevich: Evolving Algebras 1993:
          <article-title>Lipari Guide</article-title>
          . In E. Borger (eds.),
          <source>Specification and Validation Methods</source>
          , Oxford University Press, pp.
          <fpage>9</fpage>
          -
          <lpage>36</lpage>
          (
          <year>1995</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>C. A. R.</given-names>
            <surname>Hoare</surname>
          </string-name>
          and He Jifeng:
          <article-title>Unifying Theories of Programming</article-title>
          . Prentice Hall International Series in Computer Science (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. J. Meseguer:
          <article-title>Conditional rewriting logic as a unified model of concurrency</article-title>
          .
          <source>Theoretical Computer Science</source>
          ,
          <volume>73</volume>
          -
          <fpage>155</fpage>
          (
          <year>1992</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vyshemirsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          <article-title>Jr: Insertion programming</article-title>
          .
          <source>Cybernetics and System Analyses</source>
          , vol.
          <volume>1</volume>
          ,
          <fpage>19</fpage>
          -
          <lpage>32</lpage>
          (
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>J.V.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.V.</given-names>
            <surname>Konozenko</surname>
          </string-name>
          : Computations in APS.
          <source>Theoretical Computer Science</source>
          ,
          <volume>145</volume>
          -
          <fpage>171</fpage>
          (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>19. Insertion Modeling System, http://apsystem.org.ua</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. Dexter Kozen David Harel and
          <string-name>
            <given-names>Jerzy</given-names>
            <surname>Tiuryn: Dynamic Logic</surname>
          </string-name>
          (
          <year>2000</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>C. A. R. Hoare</surname>
          </string-name>
          :
          <article-title>An axiomatic basis for computer programming</article-title>
          .
          <source>Communications of the ACM</source>
          , vol.
          <volume>12</volume>
          (
          <issue>10</issue>
          ),
          <fpage>576</fpage>
          -
          <lpage>580</lpage>
          (
          <year>1969</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22. R. W. Floyd:
          <article-title>Assigning meanings to programs</article-title>
          .
          <source>Proceedings of the American Mathematical Society Symposia on Applied Mathematics</source>
          , vol.
          <volume>19</volume>
          ,
          <fpage>19</fpage>
          -
          <lpage>31</lpage>
          (
          <year>1967</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <given-names>A.A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.V.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.A.</given-names>
            <surname>Volkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.V.</given-names>
            <surname>Vyshemirsky</surname>
          </string-name>
          : Insertion Modelling.
          <source>Cybernetics ans System Anilises</source>
          , vol.
          <volume>1</volume>
          ,
          <fpage>19</fpage>
          -
          <lpage>23</lpage>
          (
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <given-names>F.</given-names>
            <surname>Rossi</surname>
          </string-name>
          , P. van Beek,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <article-title>Walsh: Handbook of Constraint Programming. Elsevier Science Inc</article-title>
          ., New York, NY, USA (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25. R. Bartak:
          <article-title>Tutorial on Filtering Techniques in Planning and Scheduling</article-title>
          .
          <source>The English Lake District</source>
          , Cumbria, UK (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <given-names>K.</given-names>
            <surname>Marriott</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <article-title>Stuckey: Programming with Constraints: An Introduction</article-title>
          . MIT Press (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Farmer</surname>
          </string-name>
          , Wolf, Goat and Cabbage Problem, http://wiki.visualprolog.com/index.php?title=Farmer, Wolf, Goat and Cabbage.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>