<!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>Models of Class Specification Intersection of Object- Oriented Programming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dmitriy Buy</string-name>
          <email>buy@unicyb.kiev.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Serhiy Kompan</string-name>
          <email>skompan@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Taras Shevchenko National University of Kyiv, Faculty of Cybernetics</institution>
          ,
          <addr-line>03680 Academician Glushkov Avenue 4d, Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>590</fpage>
      <lpage>594</lpage>
      <abstract>
        <p>This paper describes the application of heterogeneous algebraic system for the construction of the formal model of object database instead of object algebra. Complete formalization of the operation of intersection of class specifications is given.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>object-oriented programming</kwd>
        <kwd>object database</kwd>
        <kwd>object algebra</kwd>
        <kwd>class specification</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In applications of information technologies there is a problem of construction of the
so-called dependable and stable systems and infrastructures – the systems which
behave stably under all, especially, critical working circumstances. Similarity of risks
and increasing actuality of their decline to an acceptable level for critical applications
led to the appearance of a special term “safeware”, by the analogy with the terms
“hardware”, “software”, “firmware” etc., which combines two components: safe –
secure and ware – a product, an item. This term was suggested and patented by the
leading expert of NASA on the questions of infrastructure security, professor
N. Leveson, who registered the appearance of a modern field of knowledge called
safeware engineering [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. We mention a fundamental statement both obvious, and
elusive in its nature: it’s impossible to talk about stability of a working system,
especially of the infrastructure, if there is no formal model of its operation which has been
constructed and verified. Moreover, for the construction of a formal model, more or
less complex, not “toylike”, there should exist a mathematical apparatus with the help
of which software developers create a formal model and verify it according to the
source demands of a customer could.
      </p>
      <p>
        For the full confidence in the fact that informational system will work stably (will
be dependable and stable), one should single out system components, describe them
formally and verify. Indeed, nowadays there is nothing instead of a “divide and rule”
approach to cope with this difficulty. In fact, one of the most important components
of any complex system (infrastructure) is databases. That’s why there should exist an
appropriate formal model. For the relational databases such a formal model has been
already constructed and explored considerably. This issue is exhaustively covered in
the literature, beginning from the pioneering works by E.F. Codd (see, e.g. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], the
first textbooks [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ] and modern textbooks [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]). We mention only a collection of
works done by the collaborators of Taras Shevchenko National University of Kiev on
the natural generalization of classical results of the databases relational approaches
[714].
      </p>
      <p>
        Nowadays, there are a lot of formal models of object-oriented databases (OODB)
[
        <xref ref-type="bibr" rid="ref15 ref16 ref17 ref18 ref19 ref20">15-20</xref>
        ]. Each of these models elaborates OODB to a certain extent by applying
certain mathematical apparatus. The analysis of research papers dedicated to OODB has
shown that authors overlook the question arising from the necessity to construct a new
class specification with the two given specifications. For example, the construction of
a super class from two specified classes (the operation of intersection of class
specification), the construction of a subclass from two super classes (the operation of union
of class specification). The intersection of class specifications is important, in our
opinion, as it provides for the opportunity to construct the core of a new program with
two programs which allows integrating these two programs that results in the
Framework version. This paper is dedicated to the exploration of the operation intersection
of class specifications and refining conditions under which the intersection of classes
is possible.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Practical results</title>
      <p>
        The authors of this paper have conducted a number of investigations in the field under
research: for example, in the article [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] it has been suggested to consider an object
algebraic system as a model. Formally it can be formulated like this:
 , ;obj ; spec ,  , where  is a set of objects’ classes,  is a set of class
specification, obj is a set of operations over objects, spec is a set of operations over
class specifications, and a relation      is a partial order which formalizes
inheritance. The main objective of this article is specification of the intersection
operation  and the difference of class specifications.
      </p>
      <p>
        Let’s start with the intersection operation  . Let us formalize the notion of a class:
by a class we mean a pair K  s,   , where s is a functional binary relation which
associates an attribute with its meaning (from a universal domain D ), and  is a
functional binary relation, which brings to conformity a method with its signature.
Therefore [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], the relations s and  determine a class specification.
      </p>
      <p>The intersection operation (of class specifications) is an operation of the form
 :      , where:  s1, 1    s2 ,  2  s1  s2 , 1   2  , where  is a
standard set-theoretical intersection.</p>
      <p>We will demonstrate some results concerning the structure of a partially ordered
set (poset) F,  , where</p>
      <p>
        is a set of all the functional binary relations (on the
universal domain ), а is an ordinary set-theoretical inclusion. These results will
supplement the results of the paper [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. All undetermined notions and designations are
understood in terms of this paper.
      </p>
      <p>Lemma 1. For the arbitrary functional binary relations and the following
equality is true: f  g  ( f  g) (domf  domg) □</p>
      <p>def</p>
      <p>
        Proof. ■ Let us start with X  domf  domg . Let us use generally valid properties
of the set-theoretical restriction operation (a binary ratio on a set) (monotony,
distributivity etc.) [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>Firstly, we have an inclusion dom( f  g)  domf  domg  X . Secondly, from this
the next chain of equalities and inequalities follows:
f  g  ( f  g) dom( f  g)  ( f  g) X  f X  g X  f  g .</p>
      <p>Thus, f  g  ( f  g) X  ( f  g ) (domf  domg ) □
def
Below  is a relation of consistency: f  g  f X  g X , where</p>
      <p>
        def
X  domf  domg . In [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] the main property of consistency was determined as:
f  g  f  g is a functional binary relation.
      </p>
      <p>The following lemma’s corollary forms another criterion of consistency.</p>
      <p>Corollary (the criterion of consistency of functional binary relations). Let f , g be
arbitrary
functional
binary
relations,
and
f  g  dom( f  g)  X , ( f  g)  dom( f  g)  X . □</p>
      <p>Proof. ■ The proof is performed by using a Lemma 1 and
inclusion dom( f  g)  X . It’s important to note that the second (the first) equivalence is
a formal corollary of the first one (of the second one accordingly). □</p>
      <p>As for the structure of the poset F, , there are two statements.</p>
      <p>Statement 1. Poset</p>
      <p>F,</p>
      <p>is a lower semilattice, and at the same time,
inff , g  f  g . □</p>
      <p>
        The proof results from the fact that is a commutative idempotent semigroup and
from a well-known connection between such semigroups and lower semilattices (see,
e.g. [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]).
      </p>
      <p>More complete information about the poset F, is given by the following
statement.</p>
      <p>Statement 2. (the structure of poset F, ). The following statements are true:
1. The empty function f is the smallest element (“a bottom”)
def
X  domf  domg .</p>
      <sec id="sec-2-1">
        <title>Then:</title>
        <p>2. The largest element in poset F, </p>
        <p>exists if and only if the universe D is
singleton
3. The infimum exists for any nonempty set F and inf F   f F f
4. The supremum of the set F exists if and only if in the case when the set F is
restricted, and supF  f F f</p>
      </sec>
      <sec id="sec-2-2">
        <title>5. The element f is an atom only when f is singleton</title>
        <p>6. Poset F,  is a relatively complete poset and a complete (upper) semilattice □
Let’s proceed to the substantial interpretation of above results.</p>
        <p>The operation  constructs a new class which will be basic (paternal) for classes
arguments. This intersection can also be empty, in this case we will get a special
empty class.</p>
        <p>As the relation  on the specifications is component wise
( s,  s,   s  s     ) , all properties of the relation  (statements 1, 2)
can be lifted to the relation  . The corresponding formulations are obvious and
thereby are omitted.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results and conclusions</title>
      <p>The model of intersection operation of class specifications has been examined. This
operation has been specified as set-theoretical intersection. The specification f  g
has been interpreted as the largest total part of f and g , that is, the specification
from which specifications-arguments can be obtained by inheritance (in other words,
the result specification is the specification of a paternal class). The conditions for
nonempty (equivalent, empty) intersection have been examined.</p>
      <p>As for formal results, natural criteria of function consistency have been presented
(corollary) which supplement the already known criteria; the structure of a partially
ordered set of partial functions has been specified (statements 1, 2).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Kharchenko</surname>
            ,
            <given-names>V. S.:</given-names>
          </string-name>
          <article-title>Safety of Critical Infrastructures: Mathematical and Engineering Methods of Analysis and Ensuring</article-title>
          . N.E. Zhukovsky National Aerospace University (
          <year>2011</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Codd</surname>
            ,
            <given-names>E. F.</given-names>
          </string-name>
          :
          <article-title>A Relational Model of Data for Large Shared Data Banks</article-title>
          .
          <source>Comm. ACM</source>
          ,
          <volume>13</volume>
          (
          <year>1970</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Maier</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The Theory of Relational Databases</article-title>
          . Computer Science Press (
          <year>1983</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Ullman</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Garsia-Molina</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Widom</surname>
          </string-name>
          , J.:
          <article-title>Database Systems: The Complete Book</article-title>
          . Prentice Hall Inc.,
          <string-name>
            <surname>Stanford</surname>
          </string-name>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kroenke</surname>
            ,
            <given-names>D. M.</given-names>
          </string-name>
          : Database Processing: Fundamentals, Design, and
          <string-name>
            <surname>Implementation</surname>
          </string-name>
          . Prentice
          <string-name>
            <surname>Hall</surname>
          </string-name>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Date</surname>
            ,
            <given-names>C. J.:</given-names>
          </string-name>
          <article-title>An Introduction to Database Systems</article-title>
          . In: Addison-Wesley,
          <article-title>(</article-title>
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahuta</surname>
            ,
            <given-names>N. D.</given-names>
          </string-name>
          : Full Image, Restriction, Projection,
          <string-name>
            <given-names>Relationship</given-names>
            <surname>Compatibility</surname>
          </string-name>
          .
          <source>Theoretical and Applied Aspects of Program Systems Development: International Conference, December</source>
          <volume>8</volume>
          -
          <issue>10</issue>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>260</lpage>
          (
          <year>2009</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bogatiryova</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          :
          <article-title>The Theory of Multisets: Bibliography, Use the Table in Databases</article-title>
          .
          <source>Radio Electronic and Computer Systems</source>
          ,
          <volume>7</volume>
          (
          <issue>48</issue>
          ),
          <fpage>56</fpage>
          -
          <lpage>62</lpage>
          (
          <year>2010</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polyakov</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          :
          <article-title>Compositional Semantics of Recursive Queries in SQL-like Languages</article-title>
          . Bulletin of Kyiv University. Series. Phis.-Math. Science,
          <volume>1</volume>
          ,
          <fpage>45</fpage>
          -
          <lpage>56</lpage>
          (
          <year>2010</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glushko</surname>
            ,
            <given-names>I. M.</given-names>
          </string-name>
          :
          <article-title>Generalized Table Algebra, Generalized Tuple Calculus, Generalized Domain Calculus and Theirs Equivalence</article-title>
          . In: Bulletin of Kyiv University. Series. Phys.-Math. Science.
          <volume>1</volume>
          ,
          <fpage>86</fpage>
          -
          <lpage>95</lpage>
          (
          <year>2011</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Puzikova</surname>
          </string-name>
          , А. V.:
          <article-title>Completeness of Armstrong Axioms</article-title>
          . In: Bulletin of Kyiv University. Series. Phys.-Math. Science,
          <volume>3</volume>
          ,
          <fpage>103</fpage>
          -
          <lpage>108</lpage>
          , (
          <year>2011</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Redko</surname>
            ,
            <given-names>V. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brona</surname>
            ,
            <given-names>J. Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polyakov</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          :
          <article-title>Relational Databases: Tabular Algebra and SQL-like Language</article-title>
          .
          <source>AcademPeriodika</source>
          (
          <year>2001</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silveystruk</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Formalization of Structural Constraints of Relationships in «Entity-Relationship» Model</article-title>
          .
          <source>In: Electronic Computers and Informatics</source>
          <year>2006</year>
          : International Scientific Conference,
          <source>September 20-22</source>
          , pp.
          <fpage>96</fpage>
          -
          <lpage>101</lpage>
          , Kosice, Slovakia (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glushko</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Equivalence of Table Algebras of Finite (Infinite) Tables and Corresponding Relational Calculi</article-title>
          .
          <source>In: Proceedings of the Eleventh International Conference on Informatics INFORMATICS'2011, November 16-18</source>
          , pp.
          <fpage>56</fpage>
          -
          <lpage>60</lpage>
          . Rožňava, Slovakia, (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Piskunov</surname>
          </string-name>
          , А. G.:
          <article-title>The Formalization of the Object-Oriented Programming Paradigm</article-title>
          , http://www.realcoding.net/dn/docs/machine.pdf (in Russian)
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Piskunov</surname>
            ,
            <given-names>A. G.</given-names>
          </string-name>
          :
          <article-title>The Formalization of the OOP: Types</article-title>
          , Sets, Classes, http://agp1.hx0.ru/articles/typeSetsClasses.pdf (in Russian)
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Chaplanova</surname>
          </string-name>
          , Е. B.:
          <article-title>Operating Specification of Object-Relational Data Model</article-title>
          . Radіoelektronіka, Informatika, Upravlіnnya,
          <volume>12</volume>
          ,
          <fpage>75</fpage>
          -
          <lpage>79</lpage>
          (
          <year>2011</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Richta</surname>
            ,
            <given-names>K</given-names>
          </string-name>
          , Toth,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Formal Models of Object-Oriented Databases</article-title>
          .
          <source>In: Objekty</source>
          <year>2008</year>
          . Žilina: Žilinská univerzita v Žiline,
          <source>Fakulta Riadenia a Informatiky</source>
          , pp.
          <fpage>204</fpage>
          -
          <lpage>217</lpage>
          , http://www.ksi.mff.cuni.cz/~richta/publications/richta-toth-Objekty2008.pdf (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Sarkar</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reiss</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>A Data Model and a Query Language for Object-Oriented Database</article-title>
          . In: Island, Department of Computer Science Brown University Providence, Rhode, CS-
          <volume>92</volume>
          - 57, http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.4531&amp;
          <article-title>rep=rep1&amp;type= pdf (</article-title>
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Gail</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shaw</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Zdonik A Query Algebra for Object-Oriented Databases</article-title>
          . Island, Department of Computer Science Brown University Providence, Rhode, CS-
          <volume>89</volume>
          -19 http://trac.common-lisp.net/elephant/raw-attachment/wiki/RelationalAlgebra/shaw89 query.2.
          <string-name>
            <surname>pdf</surname>
          </string-name>
          (
          <year>1989</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kompan</surname>
            ,
            <given-names>S. V.</given-names>
          </string-name>
          :
          <article-title>Union and Intersection Operations of Classes Specifications in Heterogen Algebraic System for Object-Oriented Programming</article-title>
          .
          <source>In: Proc. SWorld. Int. SciPract. Conf. Modern Problems</source>
          and Solutions in Science, Transportation, Manufacturing and
          <string-name>
            <surname>Education. KUPRIENKO</surname>
          </string-name>
          , Odessa, vol.
          <volume>4</volume>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>49</lpage>
          (
          <year>2012</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Buy</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahuta</surname>
            ,
            <given-names>N. D.</given-names>
          </string-name>
          :
          <article-title>Properties Related Confinality and Order a Set of Partial Functions</article-title>
          . Bulletin of Kyiv University. Series. Phys.-Math. Science,
          <volume>2</volume>
          ,
          <fpage>125</fpage>
          -
          <lpage>135</lpage>
          , (
          <year>2006</year>
          )
          <article-title>(in Ukrainian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Skornyakov</surname>
            ,
            <given-names>L. A.</given-names>
          </string-name>
          :
          <article-title>Elements of the Theory of Structures</article-title>
          . Nauka,
          <string-name>
            <surname>Мoskow</surname>
          </string-name>
          (
          <year>1982</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>