<!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>Simple Graphic Language Developed For Systems Serving Housing and Communal Services</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>y Klu</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>tunov</string-name>
          <email>aeplatunov@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladislav Zhovnitsky</string-name>
          <email>vzhovnitsky@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladislav Klu</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>v Gor</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITMO University</institution>
          ,
          <addr-line>49 Kronverksky Pr., St. Petersburg, 197101</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>As a means to solve a number of functional tasks of automation of housing systems, a special problem-oriented programming language based on functional block diagrams (FDB) is proposed. The proposed language will improve the quality of the system by o ering: -Reduction of entry threshold; -Limiting user capabilities to increase security (protection against incompetence), providing an interface for working with the system, and not an API for programming the system; - Simpli cation of the perception of logic due to the simple logic of the low level of abstraction and the number of operations "if-&gt; then"; - Extending the boundaries of functionality due to the exibility of adding algorithms.</p>
      </abstract>
      <kwd-group>
        <kwd>Graphic programming languages</kwd>
        <kwd>Cyberphysical systems</kwd>
        <kwd>Housing and utilities</kwd>
        <kwd>Functional illiteracy</kwd>
        <kwd>1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The main functions of such systems are: monitoring obsolete power substations,
controlling outdoor lighting, collecting data on the consumption of various energy
carriers. The beginning of work - 2003. The work was carried out by LMT LLC
with the active participation of ITMO employees. At the moment, systems for
housing and communal services are complex scalable cyber-physical systems that
allow solving problems both in large cities and in small cottage villages.</p>
      <p>From our experience, the following were revealed:
{ Management systems for housing and communal services are complex
cyberphysical systems that require highly quali ed personnel during deployment
and operation;
{ AOLCS (Automated Outdoor Lighting Control System) "Luch" deployed in
about 30 cities of Russia and only two of them found such specialists.</p>
    </sec>
    <sec id="sec-2">
      <title>The most painful places are:</title>
      <p>{ System con guration (setting up controllers, setting up server components);
{ Application programming;
{ Low level of training of local specialists.</p>
      <p>
        A big problem is functional illiteracy [
        <xref ref-type="bibr" rid="ref1 ref6">1, 6</xref>
        ], which manifests itself even among
the senior sta of the units responsible for maintaining such systems. The habit
of local technical specialists to act within a limited number of templates makes
the introduction of modern technologies and automation systems problematic.
This report discusses the creation of a special programming language that would
allow, through high-level abstractions, to lower the entry threshold and help
employees solve simple problems of algorithmization and automation without
the need for serious retraining and advanced training courses.
      </p>
      <p>What are the speci cs of housing and communal services:
{ There are no people with the necessary set of competencies (in fact, the
competencies of a system administrator, an entry-level programmer, and a
competent PC user are su cient)
{ There is no way to independently obtain the necessary knowledge;
{ No higher education;
{ Functional illiteracy is common;
{ There is no desire to gain new knowledge (especially for local specialists
aged);
{ The local administration is very far from the problems of using automation
systems.</p>
      <p>Housing and communal services di ers from such industries as the oil
industry, nance, industry and retail in small nancing.Regional small cities are
experiencing a constant out ow of specialists to large nancial and industrial
centers. The local education system is limping. So it is necessary to abandon the
classical approaches to con guration and applied, user programming of
automation systems in favor of systems with the most simple, intelligent controls that
do not require the attention of specialists.</p>
      <p>
        The aim of this work is to solve the problem of introducing computer
technology into housing and communal services by using a tool - a language that
allows you to hide the high complexity of the system from the user by providing
an abstract interface.
At present, there are a large number of such visual programming languages
that are designed to solve various problems:
{ The Sequential Function Chart (SFC) is a graphical language for
programming industrial logic controllers PLC and structuring programs;
{ FBD is the language of Functional block diagrams like LD language of VP
(visual programming), where each block represents a mathematical
operation;
{ And other languages that solve a variety of problems, from languages for
teaching children programming [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and about the grammar of visual web
applications, to programming languages in rocket and space technology [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>A number of articles describe the way of thinking that people use at the
initial stages of their development. This way of thinking is conditioned re ex
thinking, that is, to solve the problem, a person uses ready-made templates that
are described by a simple formula: \if something else", going beyond such simple
recipes-algorithms, as a rule, drives a person into a dead end, absence the nished
template and the need for enumeration makes it di cult or impossible to solve
the problem. In order to solve problems using people with this way of thinking
described above, it is necessary to exclude all complex constructions that do not
t into the behavior predictable for humans.</p>
      <p>The language should be described by simple verbal constructions and should
be accessible for explanation in terms of frequently encountered things, such as
a water supply system or a motorway. Also, the language should not contain
abstract objects and mechanisms that are di cult to understand that go
beyond the everyday life of an ordinary person (for example: cycles, inheritance,
processes, queues, interrupts, and so on).</p>
      <p>
        There are examples of similar tools that are used to solve the problems
of managing and controlling home automation systems: IFTTT (If This Then
That), Blynk and the like. When developing such a system or programming
language, it is worth remembering such an important problem as user errors that
arise during the compilation of algorithms and system programming [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
In this work, we develop a language that allows combining various elements of
infrastructures and solve some problems of automation of objects, such as: turn
on watering plants depending on humidity and lighting, turn on and turn o
street lighting depending on precipitation and cloud cover, control thermostats
of an automated object when reaching user speci ed geographic coordinates, etc.
      </p>
      <p>
        The proposed language is a set of square-functional blocks representing any
action and having the following parameters: two inputs, one of which is inverse,
two outputs and some applied parameters. As a computation model for
implementing such a programming language, a process network computation model is
proposed [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], based on the interaction of processes through FIFO queues ( rst
in, rst out). The programming process consists in connecting the squares with
each other, when the faces of the squares are in contact - two processes are
connected, the output of one process is combined through queues (blocking queues,
if there is no data, the process is blocked until the data appears) with the input
of the other.
      </p>
      <p>SGL Key Ideas:
{ The SGL language is based on the discrete event model;
{ The operators of the language are logical elements, and the connections
between the elements are the faces of square elements;
{ SGL does not have Turing completeness, that is, it is impossible to implement
any computable function on it. Feedback for the implementation of automata
cannot be done.</p>
    </sec>
    <sec id="sec-3">
      <title>Language Features:</title>
      <p>{ Readability (ease of reading and understanding programs) and simplicity
(language consists of several types of constructions) come rst;
{ Lack of cycles;
{ Reliability;
{ Low cost.</p>
      <p>The programming process consists in connecting the squares with each other,
when the faces of the squares are in contact - two processes are connected, the
output of one process is combined through queues (blocking queues, if there is no
data, the process is blocked until the data appears) with the input of the other.
SGL language constructs are function blocks. The function block is presented as
a square with two inputs and two outputs.</p>
      <p>Function Block Composition:
{ Inputs (DIN, AIN, MODBUS cell, MQTT topic, etc.);
{ Outputs (DOUT, AOUT, MODBUS cell, MQTT topic, etc.);
{ Elementary logical elements (AND, NOT, OR-NOT, etc.);
{ Filters (averager, median lter, level limiter, etc.);
{ Complex functional blocks (annual schedule, control algorithm, etc.);</p>
      <p>As shown in the gure 2, X1, X2 - inputs, Y1, Y2 outputs Inputs X1 and X2
can have di erent meanings, for example, X1 - input for receiving data, X2
settings.</p>
      <p>Each unit is responsible for a speci c process, for example, determining the
user's location using geolocation or receiving data from a temperature sensor
installed on the object. The list of such blocks includes: geolocation, temperature
sensor, switch, triggers, inputs and outputs, message / noti cation generator,
timers, counters, etc. The list of tasks that can be solved is mainly limited by
the user's imagination, and the extension of this language by Adding a speci c
function block is not a high cost task.</p>
      <p>And also it is very important to notice that the most popular electronic device
available to the widest segments of the population is an Android smartphone.It
is logical to assume that the IDE for programming and tuning systems should
also be placed in a familiar environment for the user.</p>
      <p>An example of solving one of the problems of automation of a housing and
communal services object can be heating the room before the arrival of the system
user directly to the object. Such a problem is solved within the framework of the
developed language by connecting three blocks. The coordinate determination
unit (or constant geolocation speci ed in the unit settings) and the temperature
sensor transmit data to the thermostat inputs, as shown in Figure 2, which in
turn transmits signals to the relay control unit at the output.</p>
      <p>Implementation of local automation tools (if it is not an oil rig or a large
plant) requires a su ciently large investment related to the need for eld
technicians to travel expenses for business trips, maintenance, adjustment and
maintenance, as well as separation from the work process. There are two possible
solutions to this problem. Further training of eld sta is one of such solutions
that is not always e ective and often costly. And the second option is to lower
the threshold of entry and risk management, described above at the stage of
development of these systems.</p>
      <p>In conclusion on the ndings:
{ Outside of successful industries, it is very di cult to build a competent IT
infrastructure for servicing modern systems;
{ The programming tools used in conventional process control projects are too
complex for existing sta ;
{ To automate such an area as housing and communal services, it is necessary
to create as simple as possible, and preferably even completely automatic
cyberphysical systems;
{ SGL language allows you to reduce the entry threshold for creating simple
con guration systems; it is well accepted by service personnel accustomed
to working with electric networks;</p>
      <p>The visual programming language proposed as part of the development of
cyberphysical systems serving the housing and communal services allows expanding
the system's functionality through user programs, simplifying user interaction
with a complex engineering system and lowering the entry threshold for the
system.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Kulyutkin</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Adult education and the problem of functional illiteracy // Man and</article-title>
          <string-name>
            <surname>Education. -</surname>
          </string-name>
          <year>2008</year>
          .
          <article-title>- No. one. (in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Litvinov</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Realization of visual programming tools for robots for the study of computer science</article-title>
          in schools // Computer tools in education.
          <source>- 2013</source>
          .
          <article-title>- No. one. (in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kalentiev</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tyugashev</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <article-title>Use of graphic languages :in the life cycle of on-board software for spacecraft /</article-title>
          / Bulletin of Samara State Aerospace University named after Academician S.P.
          <string-name>
            <surname>Korolyov</surname>
          </string-name>
          (National Research University). -
          <fpage>2010</fpage>
          . - No.
          <fpage>2</fpage>
          . (in Russian)
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Palekar</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fernandes</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roesner</surname>
            <given-names>F.</given-names>
          </string-name>
          <article-title>Analysis of the Susceptibility of Smart Home Programming Interfaces to End User Error /</article-title>
          /IEEE Workshop on
          <article-title>the Internet of Safe Things (SafeThings)(SafeThings' 19)</article-title>
          . ACM, New York, NY, USA. {
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Stefanov</surname>
            <given-names>T.</given-names>
          </string-name>
          et al.
          <article-title>System design using Kahn process networks: the Compaan/Laura approach //Proceedings of the conference on Design, automation and test in EuropeVolume 1</article-title>
          . { IEEE Computer Society,
          <year>2004</year>
          . {
          <string-name>
            <surname>C.</surname>
          </string-name>
          <year>10340</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Baskakova</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soboleva</surname>
            <given-names>I</given-names>
          </string-name>
          .
          <article-title>New facets of functional illiteracy in the digital economy // Educational issues</article-title>
          .
          <year>2019</year>
          . (in Russian)
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>