Development and Application of Logical Actors Mathematical Apparatus for Logic Programming of Web Agents - PowerPoint PPT Presentation

About This Presentation
Title:

Development and Application of Logical Actors Mathematical Apparatus for Logic Programming of Web Agents

Description:

The ideology of Prolog is based on the concept of tree search (backtracking) ... actors. Search space. Implementation of the repeated proving principle ... – PowerPoint PPT presentation

Number of Views:247
Avg rating:3.0/5.0
Slides: 40
Provided by: Ale7155
Category:

less

Transcript and Presenter's Notes

Title: Development and Application of Logical Actors Mathematical Apparatus for Logic Programming of Web Agents


1
Development and Application of Logical Actors
Mathematical Apparatus for Logic Programming of
Web Agents
Alexei A. Morozov PhD, Senior ResearcherInstitute
of Radio Engineering and Electronics Russian
Academy of Sciencesmorozov_at_mail.cplire.ru
2
What is the fundamental problem to be solved in
our project?
  • We are interested in mathematical strictness of
    logic programs that operate in dynamic outer
    world.
  • Web agents are only a particular case of such
    programs. Other cases are the following visual
    user interface, virtual reality, control systems,
    etc.

3
What is Web agent?
  • Web agents are programs that automate retrieval,
    recognition, extraction, and analysis of
    information on the Internet oriented at the needs
    of an individual user (or a group of users).
  • Agents differ from the widely used Internet
    retrieval systems in the following
  • They can autonomously operate during long periods
    of time (days, weeks, or more) performing the
    task set by the user.
  • As any other program, once created, an agent can
    be used many times whereas a query to a universal
    retrieval system invokes a single operation of
    information retrieval.

4
An example of Web agent
5
User interface of the agent
6
Operation of the agent
7
Advantages of the logic approach to the
programming of Web agents
  • Prolog has a very high level of abstraction.
  • The ideology of Prolog is based on the concept of
    tree search (backtracking).
  • The syntax of logic languages is simpler and more
    expressive than that of imperative ones
    becausea. Pointers are not explicitly used.b.
    Recursion and backtracking are used instead of
    cycling and branching.c. Any complex data item
    has a clear text representation.
  • Logic programs are a convenient object for
    automatic construction, analysis, and
    transformation.
  • Logic languages are attractive for processing
    texts written in natural languages.

8
The main advantage of the logic programming of
Web agents
  • The main advantage of logic programming is that
    it gives means and criteria for estimation of
    mathematical strictness of Web agent operation.
    There are model-theoretic semantics, as well as
    the soundness and completeness notions.

9
The dynamic environment problem
The use of standard Prolog is mathematically
incorrect, because the standard control strategy
of Prolog doesnt ensure soundness and
completeness of inference in conditions of
changing source data.
Soundness
Completeness
10
We have proposed the repeated proving principle
that is an alternative to nonmonotonic approach
  1. Nonmonotonic logic is a means formalizing the
    unsound (in classical sense) logical inference.
  2. Our task is to provide the classical soundness of
    logic program in dynamic outer world.

11
The idea of repeated proving
Commonvariables
Logicalactors
Search space
12
Implementation of the repeated proving principle
  • Sequential control strategies supporting repeated
    proving.
  • Implicit parallelization of logic programs.
  • Syntactic means of explicit definition of
    concurrent processes.

13
The Actor Prolog? project
  • Theoretical results
  • A logical interpretation of object-oriented
    programming.
  • Repeat proving of logical actors providing
    soundness in dynamic environment.
  • A new concurrent computing model.
  • Logic programming technology issues
  • Visual programming based on SADT (Structured
    Analysis and Design Technique).
  • Component-oriented programming.
  • Implementation issues
  • All the Actor Prolog agents are persistent.
  • Predefined classes support FTP and HTTP now.
  • You are welcome to participate in beta testing of
    Actor Prolog (http//www.cplire.ru/Lab144).

14
Logic Object-Oriented Modelof Asynchronous
Concurrent Computations RFBR project no.
00-01-005602000-2002
15
Why Logical?
  • The computing model is based on the logic
    programming principles
  • The model supports model-theoretic semantics any
    concurrent program is an implementation of an
    algorithm and a logical formula at the same time.
  • There are mathematically strict criteria of
    correctness of the Web agent soundness and
    completeness.
  • The possibility of logical inference with
    incomplete input data is essentially used in the
    model (speculative computations).

16
Why Asynchronous Concurrent Computations?
The delays of processes are not used for
synchronizing processes in our computing model.
Speculative computing and subsequent modification
of logic inference are used instead of delays.
17
Why Object-Oriented?
Process is a class instance in the concurrent
version of Actor Prolog, whose clauses are
executed concurrently relative to clauses of
other processes.
18
Basic Components of the Model
  • Process state
  • Proven
  • Failed
  • Unused
  • Messages
  • Flow
  • Direct

Residents
19
Process States
A proven process. This state is characterized by
the consistency of all actors of the process (the
proof of all actors was successful). A failed
process. This state is characterized by the fact
that actors of the process are inconsistent. An
unused process. The unused process can be
considered as some offline component of a
computing device. The processes automatically
pass into this state and automatically recover
from it when certain special flow messages are
obtained.
20
Flow messages
A process can pass information to other processes
by changing the value of their common variable.
Common variables that connect processes are
called ports.
21
Ports of Processes
  • Plain ports.
  • Protecting ports. A protected value of a common
    variable can only be replaced by another
    protected value.
  • Suspending ports. Suspending ports serve for
    automatic passing of processes in the unused
    state and for their automatic recovering from
    this state.

22
Direct messages
A process can perform an asynchronous predicate
call in the other process. The so-called
informational and switching direct messages are
distinguished.
23
The informational and switching direct messages
differ by the following
1. As a result of processing of a switching
direct message, the process can become either
proven or failed, while after processing of the
informational direct message, the process is
always proven. If the execution of an
informational direct message fails, this message
is simply ignored and the process restores its
former state. 2. In contrast to switching direct
messages, processing of informational direct
messages is suspended until the recipient process
becomes proven. The suspended messages are
accumulated in the buffer.
24
Residents
The resident is a certain active entity observing
the state of assigned (target) process and
sending the collected information to its
owner. After each change in the state of the
target process, the resident repeats the
construction and sending of the list of values of
the function.
25
The following correspond to each resident of the
program
  1. The owner of the resident. The owner of the
    resident is the process that has created it.
  2. The atomic formula. This formula denotes the call
    of a certain function (nondeterministic in the
    general case) which must be executed in the
    target process. The functions in Actor Prolog are
    implemented with the help of standard technique
    of program flattening.
  3. The target process of a resident.
  4. A common variable. Using it, the resident sends
    the collected information to its owner.

26
An example of asynchronous concurrent program
(Web agent)
27
The difference between flow and direct messages
consists in the following
1. Direct messages are passed directly from one
process to another (in the form of the predicate
call), while the flow messages are passed from
one to many processes (by changing the values of
common variables). 2. Direct messages are not
lost in the course of communication, while the
flow messages can cancel one another if a new
(updated) value of a common variable arrives
before the processing of the previous value has
started.
28
  • Definition 1. We say that the logic program has
    attained its successful final state if
  • All the processes of the program are proven or
    unused.
  • Activation of residents is not required.
  • The processing of no messages by processes and
    residents is required.
  • Definition 2. The result computed by the program
    are the values of common variables connecting the
    processes of a program that has reached a
    successful final state.

29
Model-theoretic semantics of concurrent programs
We have defined a scheme of transformations of an
arbitrary concurrent logic program P into the
sequential program P' for which the existence of
the classical model-theoretic semantics is
guaranteed. The declarative semantics of the
program P' is taken as the semantics of the
source program P.
30
  • Theorem 1.A concurrent logic program is sound in
    respect to its model-theoretic semantics.

31
Theorem 2.The concurrent program is complete in
respect of its model-theoretic semantics if
  • 1. There are no non-logical built-in predicates
    in the text of the program.
  • 2. Direct messages are not used. Information
    between processes is transmitted only via the
    flow messages.
  • 3. The program does not get caught in an endless
    loop in the course of execution of goal
    statements and functions of residents.
  • 4. The functions called by residents always
    return a finite number of values.
  • 5. Predicates computing data which are then sent
    by means of flow messages are deterministic.
  • 6. Information is transmitted between processes
    along one-direction channels only. The
    unidirectional data transmission in the Actor
    Prolog can be modeled by means of the protecting
    keyword.
  • 7. There is a partial ordering of processes
    exchanging information. That is, there is no
    recursive transmission of data between the
    processes and residents in the program.
  • 8. All values computed by processes and residents
    which must be passed to other processes and
    residents are ground (i.e., they do not contain
    unbound variables).

32
The main results of the RFBR00-01-00560 project
(2000-2002)
  • We have developed a new concurrent computing
    model for logic programming. This model differs
    from others in the following the model provides
    soundness and (in some special cases)
    completeness of concurrent logic programs being
    executed in dynamic outside world, such that
    input data of the logic program could be modified
    after the start of the program.
  • The conditions of classical soundness and
    completeness of logic programs being executed in
    dynamic outside world have been investigated.
  • We have developed methods and syntactic means for
    logical description and analysis of the Web.
  • We have designed and implemented an experimental
    system for logical search and recognition in the
    Internet on the basis of developed mathematical
    apparatus. In particular, we have developed
    methods of visual component-oriented logic
    programming of persistent Web agents.
  • We have created several Web agents collecting
    information in the Internet. The experiments with
    these agents have demonstrated expediency and
    effectiveness of developed methods of logic
    programming the Web agents.

33
You are welcome to participate in beta testing of
Actor Prolog
http//www.cplire.ru/Lab144/space/prolog.html
34
References
  • Morozov A.A. Actor Prolog an Object-Oriented
    Language with the Classical Declarative Semantics
    // Proc. of IDL'99 workshop. Paris, France,
    September 27-28, 1999.
  • Morozov A.A., Obukhov Yu.V. On the Problem of
    Logical Recognition in the Dynamic Internet
    Environment // Pattern Recognition and Image
    Analysis. 2001. Vol.11. No.2. pp.454-457.
  • Morozov A.A., Obukhov Yu.V. An Approach to Logic
    Programming of Intelligent Agents for Searching
    and Recognizing Information on the Internet //
    Pattern Recognition and Image Analysis. 2001.
    Vol.11. No.3. pp.570-582.
  • Morozov A.A. On Semantic Link Between Logic,
    Object-Oriented, Functional, and Constraint
    Programming // Proc. of MultiCPL'02 workshop.
    Ithaca, USA, September 8, 2002. pp.43-57.
  • Morozov A.A., Obukhov Yu.V. Development of the
    Methods and Tools for Mathematically Correct
    Logic Programming of Internet Agents // Pattern
    Recognition and Image Analysis. 2003. Vol.13.
    No.2. pp.225-227.

35
References
  • Morozov A.A. Logic Object-Oriented Model of
    Asynchronous Concurrent Computations// Pattern
    Recognition and Image Analysis. 2003. Vol.13.
    No.4. pp.640-649.
  • See also
  • Morozov A.A. Getting Started in Actor Prolog.
    IRE RAS 2002.
  • http//www.cplire.ru/Lab144/start/index.html

36
Discussion
Alexei A. Morozov Institute of Radio Engineering
and Electronics RAS Mokhovaya 11, Moscow 125009,
Russia morozov_at_mail.cplire.ru
37
Comparison with the Nonmonotonic Approach
38
Comparison with the Nonmonotonic Approach
39
Comparison with the Nonmonotonic Approach
  1. New data arrive in the form of terms (data items)
    rather than in the form of logical statements.
  2. If the input data have been changed, it is only
    necessary to prove once again certain subgoals.
  3. We stay in the framework of classical monotonic
    logic. We have saved all its descriptive and
    deductive abilities.
Write a Comment
User Comments (0)
About PowerShow.com