Docstoc

SOFTWARE AGENT INDEPENDENT

Document Sample
SOFTWARE AGENT INDEPENDENT Powered By Docstoc
					               Software Agent Independent Generative Modeling


                          1. V.Karthikeyan     2.C.Rangaraj
                             IV-MSC [Software Engineering]
                      Muthayammal Engineering College, Rasipuram
                                 mecse001@gmail.com


Abstract:                                      Another approach advocates the use of
                                               domain-specific modeling language, where
       Virus problem is a tedious problem      the language is tailorcd for the unique needs
                                               of the target application domain. Domain
in internet surfing, still some research
                                               illustrated with help of software agent. This
undergoes to solve this issues. In order to
                                               approach enables the modeling of not only
predict or reduce the problem in internet,
                                               the software, but all other aspects of the
new application of software agent is
                                               target system, including its hardware,
introduced. Software agent is a persistent
                                               environment and their relationship.
software entity dedicates to a specific
purpose. Functionality of a software agent
                                                       Software agent is persistent software
expressed via Universal modeling language.
                                               entity dedicates to specific purpose.
                                               Software agent can be identified by three
 These generative modeling architectural
                                               different classes of agent. Agents are goper,
parameters and generator scripts to specify
                                               service     performing      and     predictive.
an modal structure. This paper describes an
                                               Application and roll of software agent can
approach that enables the addition of
                                               be differing according to the specific
generative modeling language capability to
                                               domain. Software agent plays wider roll in
any domain-specific modeling language
                                               commercial application and also as a
using Meta model composition. The
                                               personal information system. This agent is
approach is illustrated through an image
                                               introduced as an effective virus predictive
processing application using generative
                                               agent in World Wide Web applications more
modeling environments [GME].
                                               effectively. This GM technique is compare
                                               with image processing system in order to
1. Introduction
                                               realize actual structure of the virus program
                                               especially in internet streaming.
       Modeling and automatic code
generation is the most promising way to
                                                       Model-Integrated Computing (MIC)
increase software productivity and to avoid
                                               is a representative of the latter approach.
virus in internet surfing. One approach
                                               Both techniques need tool support to enable
employs a single modeling language
                                               their practical application. If the language is
developed specially for software modeling
                                               fixed, in case of the UML for example, a
to capture the important characteristics of
                                               single toolset is sufficient. However,
the system under development and then
                                               creating domain specific visual model
generate a portion of the implementation
                                               building, constraint management, and
automatically.    The     most     prominent
                                               automatic program synthesis components for
representative of the technique is the UML.
each new domain would be cost-prohibitive          to capture the information in an algorithmic
for most domains.                                  manner. Similarly, adaptive systems are
                                                   cumbersome, if not impossible to capture in
The Generic Modeling Environment (GME)             a declarative way.
is a configurable environment that makes it
possible to create highly domain-specific                  One solution is to represent these
environments rapidly. The configuration is         architectures in a generative manner. Here,
accomplished through UML and OCL-                  the components of the architecture are
based [3,4] meta models that specify the           prepared, but their number and connectivity
modeling paradigm (modeling language) of           patterns are not fully specified. Instead, a
the application domain. The modeling               generative description is provided that
paradigm contains all syntactic, semantic,         specify how the architecture should be
and presentation information regarding the         generated "on-the-fly." A generative
domain; which concepts will be used to             architecture specification is similar to the
construct models, what relationships may           generate statement used in VHDL: it is
exist among these concepts, how the                essentially a program that, when executed,
concepts may be organized and viewed by            generates an architecture by instantiating
the modeler, and what rules govern the             components and connecting them together.
construction of the models.
                                                           The generative description is
The modeling paradigm defines the family           especially powerful when it is combined
of models that can be created using the            with     architectural    parameters     and
resulting modeling environment. The Meta           hierarchical decomposition. In a component
models specifying the modeling paradigm            one can generatively represent architecture,
are used to automatically generate the target      and the generation "algorithm" can receive
domain specific environment. The generated         architectural parameters from the current or
domain-specific environment is then used to        higher levels of the hierarchy. These
build domain models that are stored in a           parameters influence the architectural
model database. These models are used to           choices made (e.g. how many components to
automatically generate the applications or to      use, how they are connected, etc.), but they
synthesize input to different COTS analysis        might also be propagated downward in the
tools. GME has an open component-based             hierarchy to components at lower levels.
architecture. It allows access to Meta
models, models and model modification              There this process is repeated: architectural
events through a set of Microsoft COM              choices are made, components are
interfaces.                                        instantiated and connected, and possibly
                                                   newly calculated parameters are passed
Just like most software models, models             down further. Thus, with very few
captured in GME are declarative. They              generative constructs one can represent a
describe a particular solution to a particular     wide variety of architectures that would be
problem in the given engineering domain in         very hard, if not impossible, to pre-
a declarative manner. While this works very        enumerate.
well most of the time, there are two cases
where a more flexible approach is called for.             Our earlier work in self-adaptive
When the models are large and have a               systems demonstrated the power of
regular, repetitive structure it is more natural   generative modeling in one particular
domain [5]. This paper describes the                     Consider Figure 2. It shows the same
generalization of the approach. In particular,   components as Figure 1, but the actual
we have created a generative representation      signal flow is missing. Instead, the
methodology that can be easily added to any      components are connected to a generator
domain-specific modeling language. The           block called Split and Merge. There is an
approach is based on Meta model                  architectural parameter connected to it also
composition.                                     (called Num Processors) that have a
                                                 numerical attribute (not shown). Generators
Furthermore, we have developed a                 have a textual attribute containing the
combination of a code generator and a            generator script that describes the desired
model interpreter that executes the generator    model structure utilizing the architectural
scripts according to the current instantiation   parameters, in this case Num Processors.
of the architectural parameters and creates
the corresponding pure declarative model.
The approach is detailed in the following
sections.

2. Generative Modeling of Software Agent
                                                        Figure 2. Generative Model
        Let us illustrate generative modeling
through an example. Data parallelism is                  Executing the generator creates the
often utilized in image processing. Consider,    required signal flow model. When the
for example, the signal flow of a                number of processors changes, the value of
convolution running on four processors as        Num Processors is the only thing that needs
shown in Figure 1. The input image is split      to change. This is certainly easier and less
four ways, the convolution is carried out in     error-prone than manually redrawing the
parallel on the sub images and then the          models to reflect the change. In the
results are merged to form a single image. If    remainder of this section we describe how
the number of available processors changes,      this is actually accomplished emphasizing
the signal flow model needs to be modified       how generative modeling can be easily
to match it. However, the structure is quite     added to any domain-specific language
regular; it is natural to express it in an       using our technology.
algorithmic manner as a function of the
number of processors.




     Figure 1. Data Parallel Convolution
                                                        Figure 3. Generative Meta model
2.1. Generative Meta model                        architectural parameters (Gen Parameter)
                                                  respectively. The Generator model has the
        Model      Integrated   Computing         Generator Script textual attribute that will
employs Meta models to define domain-             contain the algorithmic specification of the
specific modeling languages [1]. Meta             desired model structure.
model composition is utilized to allow the
combination of existing languages to form                The abstract object Outside Object
more complex ones. Meta model                     Place holder is introduced to define the
composition simply means taking two or            connectivity between generators and objects
more Meta models and specifying relations         from the user defined Meta model through
among some of their modeling concepts [6].        Gen Structural Connections. Containment is
These relations define how models in the          modeled using the Container Place holder
original languages can be composed                model. This is where generative models can
together in the new language.                     be contained in the final target environment.

         Figure 3 shows the Meta model                    An important concept for the
specifying generative modeling. It is only a      reusability of generators is the Generator
partial Meta model, i.e. it does not define a     Reference. As you can see in Figure 3,
meaningful modeling language in and of            Generators are not contained in any other
itself. It was specifically created, so that it   models; they are standalone. In fact, a
can be composed with any other Meta model         generator script can only refer to its own
to add generative modeling capability to the      ports (structural and parameter) and has no
corresponding modeling language.                  knowledge of the “outside world,” where
                                                  and how it is being used (for a more detailed
         The key concept is the use of generic    description, see section 4).
objects acting as Place holders - objects that
are not completely defined in the generative      Generators capture structural information
meta model. These objects will be fully           only, so a Split And Merge generator model
defined only after Meta model composition,        can be used without modification in any
i.e. after the user decides how she wants to      domain-specific language from signal flow
enable generative modeling in the target          through ADLs to state machines. Therefore,
domain-specific language. Even though the         it is not Generator models that are inserted
placeholders are not fully defined, we can        into domain specific models, but references
specify all of their properties related to        to Generators.
generative modeling. Furthermore, there are
several modeling concepts that are                (References are just like pointers in
completely specified in the generative Meta       programming languages.) This enables using
model; these are specific to generative           the same Generator model in different
modeling and do not need to be composed.          models     using different      architectural
                                                  parameters.
       Consider Figure 3. The main object                 For example, the Split and Merge
from the generative point of view is the          object in Figure 2 is a reference to a Split
Generator model containing Gen Structural         and Merge generator model. Many such
Ports and Gen Parameter Ports. These ports        references can exist in the same model
can be connected to objects from the user         hierarchy. Every such reference can be
defined meta model (to be composed) and to        connected to different objects and different
parameters. Furthermore, copies of the same       using a traditional programming language in
Split and Merge generator model can exist         a textual attribute. Both Compounds and
in different models in different languages.       Primitives have input and/or output ports
                                                  called Input Signals and Output Signals,
                                                  respectively. They can be connected through
                                                  Data flow Conn connections. Processing
                                                  models and Signal atoms are abstract
                                                  components that help keeping the Meta
                                                  model clear.

                                                         Figure 5 shows the Meta model that
                                                  composes the signal flow language with
                                                  generative modeling. The most frequently
                                                  used technique in Meta model composition
                                                  is inheritance. Here Signal inherits from
                                                  Outside Object Place Holder, so that Input
                                                  Signals and Output Signals can be connected
Figure 4. Hierarchical Signal Flow Metamodel      to Structural Ports of Generator references.
                                                  Compound inherits from Container Place
                                                  Holder, so that Compounds can contain
3. Meta model Composition
                                                  generative models. In general, the user needs
        Let us illustrate the process of adding   to decide which kind of objects should be
generative modeling capability to an              able to participate in generative constructs
existing domain specific language through         and what models should contain these
the image processing example. The Meta            constructs. Then inheritance can be used to
model of the hierarchical signal flow             derive the generative capabilities from the
modeling language used in the example is          placeholder objects.
shown in Figure 4.
                                                  One way is to use simple inheritance as
                                                  shown in Figure 5. Another option is to
                                                  introduce a new concept, such as Generative
                                                  Compound, and use multiple inheritances,
                                                  for example to derive it from both Container
                                                  Place Holder and Compound.

                                                  4. Generator Execution

                                                         The final representation issue
                                                  concerns the generator script itself. There
    Figure 5. Meta model Composition              are many choices available for the language.
                                                  For practical reasons, as GME uses
        Compounds are the composite               Microsoft COM for component integration,
models in this language; they can contain         we decided to use C++ with an API
signal flow graphs themselves. Primitives         developed specifically for generative
are the leaf nodes in the hierarchy; they are     modeling in our prototype implementation.
the     elementary      signal    processing
components whose functionality is captured
        The most convenient feature of this
API is that the name of each structural port
of the generator is automatically resolved to
the object that is connected to the given port.
Similarly, the name of each parameter port
denotes an integer variable whose value is
set to the value of the connected
architectural parameter.

        In fact, this generative API is just an
extension of our high-level interpreter API
for GME called the Builder Object Network
(BON). While COM interfaces provide the
interpreter writer all the functionality needed
to access and manipulate the models, it
entails using repetitious COM-specific            Resolving generative models is a two -stage
querying, error checking and handling.            process as shown in Figure 6. First, code is
                                                  generated for all generators and all generator
To abstract these issues away from the            references. This code becomes part of the
interpreter writer, GME provides a                second stage model interpreter that executes
collection of C++ wrapper classes: the            the generators and creates a new model
Builder Object classes. When the user             hierarchy; one that has no generators, only
initiates model interpretation, the component     pure declarative models. These models then
interface builds a graph mirroring the            can be used as any other domain model, i.e.
models: for each model object an instance of      all original model interpreters that were
the corresponding class is created. We refer      developed for the domain before generative
to this graph as the Builder Object Network.      capabilities were added are still fully
The BON API provides all the necessary            supported.
functionality to traverse the models along
the containment hierarchy or any of the                   In the first stage, a function is
associations, to create and delete models and     generated for every generator. The function
to get and set attributes, among others.          body is the generator script as specified in
                                                  the models. The argument list of the
        To simplify generator script writing,     function mirrors the ports of the
the generative API adds two groups of             corresponding generator model; there is an
functions: one for duplicating model objects      argument for every structural port (of the
in a variety of ways and another for creating     generic FCO type) and one integer argument
connections more easily. We present a             for every parameter port.
sample script in Section 5.
                                                          There is also a function generated for
                                                  every generator reference, i.e. for every
                                                  actual use of the generator. These functions
                                                  are responsible for traversing the
                                                  connections that are attached to the
                                                  corresponding generator reference and
                                                  obtaining the values of the architectural
parameters. Then they simply call the          std::string("DFC"),
generator function with the appropriate        src[i],
argument list.                                 proc[i], InName);
                                               GAPI::connect(owner,
       These two sets of functions are         std::string("DFC"),
compiled and linked together with the          proc[i], OutName,
second stage model interpreter. This           dst[i]);
component traverses the models from the        }
top down, creates the mirror image of all      Stage 1 of the interpreter creates the
objects in a new blank root model and          following function header for the script:
executes all generators, which, in turn,       void SplitAndMergeGen( Model owner,
create new model objects. Note that            Object Dst,
generator execution is carried out in a        Object Src,
bottom up fashion in the model containment     Object Out,
hierarchy for efficiency reasons. This         Object In,
ensures that models created by the             int Num
generators do not themselves contain           )
generators that would need to be executed      and the following wrapper function for the
possibly multiple times.                       generator reference SplitAndMerge shown
                                               in Figure 2:
5. Illustrative Example
        Consider the data parallel image       void SplitAndMerge(Project pr)
processing application introduced in Figure    {
1 and its generative representation shown in   Object owner =
Figure 2. The generator script of Split and    Component::FindPort(pr, 6500000046);
Merge Gen is shown below:                      Object Dst =
                                               Component::FindPort(pr, 6600000093);
#define MAXCHANNELS 32                         Object Src =
if (Num < 1 || Num > MAXCHANNELS)              Component::FindPort(pr, 6600000092);
return;                                        Object Out =
Atom dst[MAXCHANNELS];                         Component::FindPort(pr, 6600000095);
Atom src[MAXCHANNELS];                         Object In =
Model proc[MAXCHANNELS];                       Component::FindPort(pr, 6600000097);
std::string OutName= Out->getName();           int Num = GenParameter (
std::string InName = In->getName();            Component::FindPort(pr, 6600000085)
dst[0] = Atom (Dst);                           ) -> GetValue();
src[0] = Atom (Src);                           SplitAndMergeGen(owner,
proc[0]= Model (In->getParent());              Dst, Src, Out, In, Num);
for(int i = 1; i < Num; i++)                   }
{
src[i] =GAPI::portDup(Atom(Src),i);                   These functions become part of the
dst[i] =GAPI::portDup(Atom(Dst),i);            Stage 2 interpreter. As it traverses the
proc[i]=GAPI::modelDup(owner,proc[0],i);       models, it eventually calls the Split and
}                                              Merge function that finds all necessary
for(i = 0; i < Num; i++)                       objects that are connected to the generator
{                                              reference, obtains the value for the Num
GAPI::connect(owner,
parameter, and calls the Split and Merge             because the generators are self-contained
Gen function with the appropriate                    modules that rely on generic model structure
arguments.                                           only and have no knowledge of and hence,
                                                     dependence on any domain-specific
        The generator script above first             concepts.
verifies that Num falls within the acceptable
range. Then it creates arrays of object                      The ease of adding generative
pointers to refer to the output ports of             modeling capabilities to any modeling
Simple Splitter, the input ports of Simple           language was clearly demonstrated by the
Merger and to the Convolution models.                example. The only work that is needed is to
Please refer to Figure 2. It initializes the first   specify where in the modeling language the
item of each array with the object that exists       generative capabilities are desired. This is a
in the current model. Then it creates the            testimonial to the strength of Model
necessary Num-1 many objects for each                Integrated Computing (MIC) in general, and
category. Finally, it makes the appropriate          the extensibility of the GME in particular.
signal flow connections.
                                                     References
Conclusions                                          [1] Sprinkle J., et al.: “The New Meta modeling
        We presented an approach to                  Generation,” IEEE Engineering of Computer
generative modeling where architectural              Based Systems, Proceedings, Washington, D.C.,
parameters and generator scripts are                 USA, April, 2006.
employed to specify model structure. The
                                                     [2] Ledeczi, A., et al.: “Composing Domain-
models are then used to automatically                Specific Design Environments,” IEEE
generate a declarative representation                Computer, November 2002.
corresponding to a particular parameter
instantiation. Generative modeling is                [3] UML Summary, ver. 1.0.1, Rational
particularly well suited to represent regular        Software Corporation, et al., Sept. 2000.
model structure and adaptive systems.
                                                     [4] Software Agent- Nick Jennings, Department of
       The primary design goal of our                Electronic Engineering, Queen Mary & Westfield
                                                     College, mile end road.
technique was reusability.     This       is
accomplished by providing the generative                             ME, Lecturer of Applied
                                                     [5] Mrs.J.Preetha,
modeling capability in a domain-                     Science Department, Muthayammal Engineering
independent fashion.       The   generative          College.
representation methodology is captured in a
meta model that can be easily incorporated           [6] Mrs.D.Anitha, ME, Lecturer of Applied
into any domain-specific language through            Science Department, Muthayammal Engineering
meta model composition. The interpretation           College.
of the generative models is done through a
two-stage      domain-independent     code
generator/model interpreter.

       Furthermore, the generator models
and their scripts are also reusable within a
model hierarchy or even across different
domain-specific      modeling     languages,

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:10
posted:5/27/2012
language:
pages:8
Description: SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT SOFTWARE AGENT INDEPENDENT