uml-sp

Object-oriented simulation language UML2 SP

This project is maintained by vgurianov

Reflexion

A topic this section is reflexion and self-reflexion. This problem studied in reflexive theory by V. Lefebvre [1].

Introduction

Sometimes in simulation research need to consider several simulation models at the same time. For example, result of study to one model used to other model. Then there is dependency between models. In UML2 SP used «World», «Worlds», and «Accessibility Relation» stereotypes for description this dependence. The «World» stereotype used for package of concrete classes of simulation model. The «Worlds» include «World» packages and «Accessibility Relation» dependence between them. In methodology SSP this elements consider as an interpretation of modal logic by S. Kripke [2, 3].
A Kripke structure is a triple <G, K, R>, where G is a set of possible worlds, K (element G) is actual world, and R is the accessibility relation. Actual world is world, where dispose «Researcher».
There are three different Kripke structure:

These models suggest in work [4]. In this section consider a particular case of fractal worlds, it is a reflexion.

Problem domain

In the book [5, p.248] considered a conceptual graphs for representation knowledge. There an example is given conceptual graph of the statement “Tom believes that Jane likes pizza”. It is use of a propositional concept.

Analysis model

Terms “Subject” and “Object” are antonyms. Subject reflect object. A communication process between subject, object, and image of object is depicted in Fig.1.

Figure 1. The communication diagram

Thus, as follows from communication diagram, a class diagram shall have a form as is depicted in Fig.2.

Figure 2. The class diagram

Description of a computational semantics

Abstract virtual machine (AVM) is model of the subject. AVM has memory, processor, program for processor, input and output. On console executed next a sequence commands. It are input data, program execute, and print of result. The input operation calls a copy constructor and creates copy of ‘date’ object. The program consists at a one operator. The operator executes an authorized operation to data. It is Operation1() operation.

Description of a problem domain semantics

What is an inaccessible world? Assume, that data is a ciphertext (for example, Maya codices). World, described in manuscript, us is an inaccessible. But it’s world to be accessible if text will be deciphered. For decipher can use a decryption machine. And conversely, world can make inaccessible if ciphered the text. In this way, Kripke structure is a base notion of cryptology theory. The architectural diagram is depicted in Fig.3.

Figure 3. The architectural diagram

For description of accessibility we use «access» stereotype. The UML 2.4.1 spec says “A package import is shown using a dashed arrow with an open arrowhead from the importing namespace to the imported package. A keyword is shown near the dashed arrow to identify which kind of package import is intended. The predefined keywords are «import» for a public package import, and «access» for a private package import.”[6, page 112]. I.e. Leaf class for Probe class is a private element (in Word1) but is a public element (in Word2) for Avm class. A Probe class don’t see Leaf class but has access to it across Avm class.

P.S. Direct generalization of considered model is a fractal model of embedded virtual machines. If real world is arranged in this way then here and now exist many (or even infinitely many) other worlds. The development of an experimental procedure for testing this hypothesis is of great interest.

Design model

In C++ realized package import as «import». We use next reception.

Definition of namespaces is

namespace Data_Process {
…
class Leaf : public Component { … }
…
} //namespace Data_Process

namespace Abstract_Virtual_Machine {
using namespace Data_Process;  // it is <<import>> but need <<access>>
…
} //namespace Abstract_Virtual_Machine

Using is

// it is <<import>> (can not use):
//using namespace Abstract_Virtual_Machine;  
//Leaf *d = new Leaf; d->value;  //do see

// it is <<access>> (can use):
using Abstract_Virtual_Machine::Console;     
//Leaf *d = new Leaf; d->value;  //don't see

Console *console = new Console;
console->Run();
Label1->Caption = console->probe;

The simulation model in C++ code:

ClassesOfAvmProject.h, ClassesOfAvmProject.cpp

Conclusion

In this section we have discussed the reflection phenomena. It is the example use «World», «Worlds», and «Accessibility Relation» stereotypes. The considered theme (topic) is very an extensive and this section is limited introduction in the problem.

References

  1. Lefevre V.A. Conflicting structures. The second edition, revised and supplemented. - Moscow: Publishing house “Soviet radio”, 1973 (In Russian).
  2. S. Kripke. A Completeness Theorem in Modal Logic, Journal of Symbolic Logic 24(1):1–14. 1959.
  3. S. Kripke. Semantical Considerations on Modal Logic, Acta Philosophica Fennica 16:83–94,1963.
  4. V.I. Gurianov, Simulation with UML SP. Cheboksary: SPbSEU, branch in Cheboksary, 2014. - 136 p. (In Russian)
  5. G. F. Luger, Artificial Intelligence: Structures and Strategies for Complex Problem Solving. 6th edition, Addison Wesley, 2008
  6. UML Superstructure Specification, v2.4.1