ON THE PROBLEM OF USING
LOGIC OBJECT-ORIENTED PROGRAMMING IN
THE WORLD WIDE WEB
A. A. Morozov, Yu. V. Obukhov, Yu. V. Gulyaev
Institute of Radio Engineering and Electronics of RAS
E-mails:
morozov@mail.cplire.ru,
Possibilities and challenges of using logic programming for representation, search and analysis of information in the Internet are considered. The mathematical problem of providing strict declarative semantics of logic programs executing in conditions of changing the structure and information of the Net is considered. Approach based on developed logic object-oriented programming is proposed. Introduction The idea of Internet/Web logic programming is based on the application of logic languages (Prolog and its modern descendants) that are very useful tools for representation, search and analysis of information because of their mathematical basis and ideology. There are three main directions of using logic languages in the Internet applications:
However we suppose that the potential of logic is much more significant. We believe that the information processing in the Internet should be based on strict mathematical methods, and that the principles and means of logic object-oriented programming are very promising for developing these methods. Unfortunately, modern logic languages and tools for Internet programming do not provide strict declarative semantics of programs. In this paper we propose a new logical model and language to solve this problem. In the first section of the paper we consider the advantages of logic languages in the context of Internet applications and modern approaches to Internet/Web logic programming. In the second one we describe the proposed model and language for logic object-oriented programming. In the third one we discuss the promises of application of developed means in the Internet/Web programming. 1. The advantages of logic programming The field of Internet/Web logic programming has a rapid growth during the last five years [11,12,15,19,39]. The idea of using the logic languages and logic programming [5,35,9,10,34,1] in the Internet applications is based on the follows: 1. Logic languages have a powerful mathematical basis (a presence of declarative semantics). The declarative semantics provides a very high level of abstraction of the logic tools for representing and querying information. 2. The syntax of logic languages is more simple and powerful than one of the imperative languages because of (a) they are pointer-free, and (b) the operational semantics of these languages is based on the means of recursion and backtracking. 2.1. The data items of the logic languages (terms) are self-defined. So, any data item in Prolog has clear and unambiguous text representation. 2.2. The simplicity of syntax and operational semantics of logic languages are very promising for solving the problems of security and safety, because these problems can be solved with the help of automatic analyzing and transforming the logic programs. 3. The ideology of Prolog is based on the idea of search on the tree of possible solutions. This principle is very convenient for the search in the global Net. 4. Prolog is very suitable tool for natural language processing. So, it is very convenient for parsing and analyzing of HTML pages and so on. These advantages are the basis of modern developments in the area of Internet/Web logic programming. Let us outline the main directions of research and development in this area, basically following [24]: 1. The first direction is development of methods and tools for logic programming the client-side systems. There are: 1.1. Special libraries for development of client-side systems (for example, ECLiPSe Prolog HTTP library [4], PiLLoW/CIAO [6], Visual Prolog [40], Win-Prolog [42]), the extensions of HTML with the Prolog-like syntax [33] and a lot of projects integrating Prolog with Java (Amzi!Prolog [2], JESS [17], Jinni [37], JIPL [21], jProlog [14], Kiev [22], MINERVA [20], NanoProlog [7], NetProlog [13], Visual Prolog [40], Win-Prolog [42], W-Prolog [41]). 1.2. Logical means and tools for search of information in the Internet (ADOOD [18], D3Web [25], LogicWeb [24], W-ACE [32], WebLog [23], WG-log [8]). 2. The second direction is development of tools for logic programming the server-side systems (ECLiPSe HTTP server library [4], EMRM Knowledge base [36], logical wrappers [3], ProWeb [42], Visual Prolog [40], WebLS [2]). 3. And the third one is the projects of developing logical methods and tools for coordinating the systems of intercommunicated agents in the Internet (Jinni [37], LogiMOO [38], Pamela [16], Visual Prolog [40], Win-Prolog [42]). Thus, research and developments in the field of Internet/Web logic programming are very promising. However in despite of such activity in this field there is at least one mathematical problem that makes difficult to obtain the strict declarative semantics of Internet/Web logic programs. There is a fundamental contradiction between the dynamic nature of the Internet and the static declarative semantics of the logic languages. So, the application of modern logic languages assumes that the information in the Internet is static. To process dynamic information correctly it is necessary to run the logic program from the beginning each time when user needs the results. This requires a lot of resources. Also the incorrect results will be obtained if the information changes during the program execution. We developed an approach to solve this problem. 2. An approach to provide the strict declarative semantics We developed a generalized logical model of information systems (we call it as "the logical actor model") [27,28,30]. This model (see figure) describes an information system as a logical theorem divided into the "logical actors". The logical actors are some subgoals of the theorem (A1,...,AN), interacting through common variables (V1,...,VM). The proof of this theorem is carried out in an object-oriented search space consisting of separate worlds (W1,...,WK), the topology of which corresponds to the structure of the simulated system. For instance, the box A4 on the figure denotes an actor that has subgoals executing in the worlds W2 and W3. Fig. The logical actor model of information system. The interaction between the logical actors is implemented with the help of the "correct destructive assignment" operation. The correctness means that this operation does not disturb the declarative semantics of the program. During this operation the necessary modifications of the values of common variables are carried out and then a repeated proof of actors depending on the old values of common variables is called. If the repeated proof of all these actors is finished with success, the execution of the operation also comes to the end with success; otherwise the usual backtracking of the logic program takes place. The idea of repetitive proof of subgoals is the most interesting and important element of our model. This idea allows the correct (i.e. supporting declarative semantics) implementation of the destructive assignment in a logic language and thus is suitable for logical processing the information which may be changed during the processing. We have developed the logic object-oriented language Actor Prolog [26,27,29] based on this model. This language implements structural and dynamical aspects [27] of the object-oriented approach. The main features of this language are the follows:
3. Applications and promises We successfully used these model and language to develop few experimental systems implementing visual modeling and programming tools. In particular, we designed the method and technique for logical description and analysis of functional (SADT) diagrams [27,30]. Our research showed the possibility and promising of the visual representation of applied information systems with the help of SADT diagrams animated by the means of logic object-oriented programming. So, what are the advantages, that one can obtain using logical actor model and Actor Prolog in the Internet applications? Let us compare Actor Prolog with other modern logic languages. The declarative semantics of "usual" Prolog guarantees the completeness and soundness of the search, and thus provides the mathematical strictness of the search process. However if the structure of the search space is changed during the search, the completeness and soundness of the "usual" Prolog are violated - so the search must be controlled manually to guarantee the correctness of the results of the search. However in the case of Actor Prolog the control strategy of the language supports the completeness and soundness of the search during permanent changing of the search space. So, Actor Prolog can automate this important aspect of information processing in the Internet and provide the mathematical strictness of the search process in the conditions of changing information in the Internet. We believe that the logical actor model and Actor Prolog will be useful in all three directions of Internet/Web logic programming mentioned in the Introduction. Conclusion We have discussed the advantages and problems of using logic programming for representation, search and analysis of information in the Internet. A generalized logical model of information systems and the main features of logic object-oriented language Actor Prolog based on this model were described. The control strategy of Actor Prolog supports the completeness and soundness of the search during changing information in the search space. This allows obtaining the strict declarative semantics of Internet/Web logic programs. Bibliography
|