Integrating Generative and Aspect-Oriented Technologies, presented at
- 格式:pdf
- 大小:204.36 KB
- 文档页数:17
当归英语科学行为取向One of the main goals of the scientific behavior orientation is to establish a unified framework for studying the English language. This framework includes a set of theories and methodologies that can be applied to different aspects of English, such as grammar, synta某, phonetics, and semantics. By providing a broad and integrated view of the English language, this approach aims to promote a deeper understanding of the language and its role in society.Another key feature of the scientific behavior orientationis its emphasis on data-driven research. This means that researchers use empirical evidence, rather than intuition or personal e某perience, to support their claims about the English language. This approach is particularly important in linguistics, where the study of language is often based on subjective interpretations and assumptions. By relying on objective data, linguists can avoid biases and inaccuracies in their research, and produce more reliable and accurate results.In conclusion, the scientific behavior orientationrepresents an important shift in how we study the English language. By emphasizing empirical research and objective methods, this approach offers a more rigorous and systematic way of investigating the language. Through this approach, we cangain a deeper understanding of the English language and its rolein society, and develop more effective ways of teaching and learning the language.。
Reflections on Feature Oriented Software Engineering Paul Klint(paulk@cwi.nl)&Tijs van der Storm(storm@cwi.nl) Centrum voor Wiskunde en Informatica(CWI)Kruislaan413,NL-1098SJ,AmsterdamAugust27,2004IntroductionFeature Oriented Software Engineering is an emerg-ing discipline in which feature models[2]are used to model the commonality and variability in a prod-uct family.It is our that view product family engi-neering of very large and highly variable systems cannot do without adequate tool support.When the number of variants that have to be delivered and maintained is exponential,automatization is not only desirable,but inevitable.In this position paper we address two problems that stand in the way of wide adoption of feature oriented software engineering:•Feature models don’t scale for application to very large systems.•The“white-board distance”between feature models and source code is too large.The rest of this paper is organized as follows. First we present solutions to the problem that feature models with exponentially many variants are hard to prove consistent.Additionally we present work in progress on an interactive environment for fea-ture models.Both can help in scaling feature mod-els for highly variable systems.The second part ad-dresses traceability issues in an very broad context. We present areas of future work by discussing the relation between feature models and source code. ScaleabilityFor feature models of highly variable systems,we identify two problems of scaleability:•Proving a feature model consistent by enumer-ating all variants is infeasible(the configuration space is exponential).•Maintenance of large feature models is hard (especially if they are specified graphically and informally).This section presents tools and techniques im-plementing solutions to these problems.All tools operate on feature descriptions[6].Feature de-scriptions are a textual analog of feature diagrams, and are therefore more amenable to formal analysis and transformation.Moreover,they are much more compact than graphical diagrams.Binary Decision DiagramsWe have tackled thefirst problem by transforming feature descriptions to Binary Decision Diagrams (BDDs)[1,5].BDDs originate from modelcheck-ing and can be used to efficiently represent boolean functions.The consistency problem of a feature description can be cast as a satisfiability problem for boolean sentences.Satisfiability is obtained by transforming a proposition to a BDD.A BDD is an if-then-else tree,with logical variables(atomic features)as con-ditions.If common subtrees are shared,one obtains a directed acyclic graph.A boolean sentence is sat-isfiable,iff such a graph can be constructed and this graph is different from falsum.Checking the consistency of a selection of fea-tures is equivalent to the satisfaction problem for boolean sentences.This amounts tofinding a path to the unique true leaf in the associated BDD. Experiments show that the reduction in size ob-tained by representing the configuration space as BDDs is enormous.Feature Analysis and Manipulation Environment For maintenance of large feature models we pro-pose an interactive Feature Analysis and Manipula-tion Environment(FAME).FAME provides explicit support for evolving and refactoring feature descrip-tions.Modifying large graphical feature models by hand is unpractical and error-prone.Therefore,FAME isbased on textual feature descriptions.FAME sup-ports systematic editing of feature models through evolution operators.These evolution operators range from simple edit steps to semantics preserv-ing refactorings such as fold/unfold or permute ar-guments.To inform the user as much as possible about the effect of her modifications,FAME includes a well-formedness checker.For presentation purposes,fea-ture descriptions can be pretty printed,or displayed as a graphical diagram.FAME can also provide a number of statistics about feature descriptions,such as,the number of variants,the number of atomic fea-ture,the maximum feature expression fan out etc. In addition to evolving and analyzing a feature de-scription,FAME can be used to check the descrip-tion for inconsistencies with the derived BDD.This BDD is also used to validate feature selections. TraceabilityOne of the key challenges for feature oriented soft-ware engineering is bridging the gap between prob-lem domain(feature description)and solution do-main(implementation).The question is:how can we guarantee that every valid feature selection corresponds to an implementation variant that is also valid(e.g.,type-correct,executable,functional etc.)?Since it is likely that feature model and im-plementation are maintained separately,that is,they co-evolve,it is imperative to keep feature model and implementation in sync.For highly variable sys-tems,manual maintenance of this relation is not an option.The above analysis suggests two major ap-proaches to close the gap between feature descrip-tions and source code.In a bottom-up approach,all signs of variability in existing source code are spotted semi-automatically and are used to infer a feature model for that code. Certain design patterns and programming conven-tions can be used as indicators for variability.The resulting feature model can be used to better under-stand and manage the variability of existing code. This approach mainly raises research questions aim-ing at variation point recognition.In a top-down approach,each atomic feature in a given feature model is associated with code frag-ments that implement that feature.After selecting a specific variant of the description,the code frag-ments of all selected features as merged into an im-plementation.This approach is much more ambi-tious but also raises many more research questions:•How are code fragments expressed(in a dedi-cated language or in an extended existing lan-guage)?•How do code fragments interact with their en-vironment?•How do code fragments interact with each other?•How are these code fragments type-checked compositionally(i.e.without having to check all valid combinations)?•How is the generated implementation tested? Going from aspects[3],via concerns[4],to fea-ture diagrams we observe an increasing level of structure and expressivity at the level of describing variability.This should be matched by increased ex-pressivity at the level of code composition.Both approaches just sketched and the tools that are needed to support them will be essential to make progress in the emerging discipline of Feature Ori-ented Software Engineering.References[1]R.E.Bryant.Symbolic Boolean manipulation withordered binary-decision diagrams.ACM Computing Surveys,24(3):293–318,Sept.1992.[2]K.Kang,S.Cohen,J.Hess,W.Novak,and A.Peter-son.Feature-oriented domain analysis(FODA)fea-sibility study.Technical Report CMU/SEI-90-TR-21, SEI,CMU,Pittsburgh,PA,Nov.1990.[3]G.Kiczales,mping,A.Menhdhekar,C.Maeda,C.Lopes,J.-M.Loingtier,and J.Irwin.Aspect-oriented programming.In M.Aks¸it and S.Mat-suoka,editors,Proceedings European Conference on Object-Oriented Programming,volume1241,pages 220–242.Springer-Verlag,1997.[4]P.Tarr,H.Ossher,W.Harrison,and S.Sutton,Jr.Ndegrees of separation:Multi-dimensional separation of concerns.In Proceedings ICSE’99,1999.[5]T.van der Storm.Variability and component compo-sition.In J.Bosch and C.Krueger,editors,Software Reuse:Methods,Techniques and Tools:8th Interna-tional Conference(ICSR-8),volume3107of Lecture Notes in Computer Science,pages86–100.Springer, June2004.[6] A.van Deursen and P.Klint.Domain-specific lan-guage design requires feature descriptions.Journal of Computing and Information Technology,10(1):1–18,March2002.。
Integrating Joint Behaviour and Dialogue DescriptionGavin Doherty and Michael D.HarrisonHuman Computer Interaction Group,University of YorkEmail:gavin,mdh@Abstract.Agents are becoming increasingly common as a means of structuringinteractive systems,due to the highly complex and concurrent nature of modernsystems.The manner in which interaction between these agents is specified is offundamental importance,and must pay heed to expressivity and reuse concerns.There are also concerns specific to interactive systems,and in particular the needto specify and reason about user-system dialogue.We have shown previously thatthe standard model of object interaction is inadequate with respect to these con-cerns,and that the action model performs better with respect to these criteria.Inthis paper these results are drawn together with approaches previously taken ininteractive systems.From this basis a schema calculus with interleaving seman-tics is proposed,which better addresses the concerns of expressivity and reuse inthe interactive systems context.1IntroductionModern interactive systems are large,complex entities comprising a number of com-ponents with the capability of handling multiple simultaneous threads of dialogue.In this environment,the concept of object and the concept of agent,an independent active object,has become crucial,as it affords us an ability to manage this complexity.By specifying the system as a collection of co-operating agents operating concur-rently,further expressive power has been gained.Defining the manner in which the agents co-operate and communicate is of fundamental significance in harnessing this power.When choosing a specific model for concurrency and co-operation,there are two issues of particular importance,namely those of expressive power and of reuse.Furthermore,there is a need to consider the goodness offit in relation to the con-cerns of the domain of the system under consideration.Our own interest is in interac-tive systems and hence issues of behaviour are of importance.For example,the order in which operations can be invoked(the user input syntax)is of particular relevance,as this must relate to the user’s tasks and goals,and its structure affects issues such as the likelihood and consequences of user errors.We have previously illustrated the failings of the standard model for object interac-tion,the event model,with regard to reuse and expressive power[5].We have explored an alternative to the traditional event model,based on the concept of actions,in a gen-eral software engineering context,and shown how it copes with the reuse aspect.The next challenge is to apply this knowledge in an interactive systems context in a practical fashion,keeping in mind our commitment to specification reuse and to tractable usability reasoning.In the following sections we shall consider in turn the concerns of interactive systems,reuse,and the concept of enhancement,and show how these concerns may be addressed by means of a new schema calculus.1.1Interactive System ConcernsIn the domain of Interactive Systems,we are naturally concerned with the interaction between the user and system.In this context state,which is visible in the presentation or which affects the actions which may be taken by the user,is of particular importance.The difficulty which arises is the interdependence between this dialogue descrip-tion,and the behaviour,and functional dependencies of the system.If the two are separated then consistency problems arise,also the separation of concerns between the components of such a specification can be problematic.Yet if we seek to use a sin-gle notation,then it must be one expressive enough to encompass both dialogue and behaviour.We consider three previous hybrid approaches[1,14,2]in the domain of in-teractive systems which attempt to cover both dialogue and function description.These provide a concrete basis for the discussion and exemplify interactive systems concerns. Behaviour and Dialogue The behaviour of an interactive system generally concerns when and under what conditions certain events can happen.Those events which directly involve the user(user input and system output,ie.the dialogue)are of most concern. The means by which this dialogue is specified determines the ease with which usability reasoning can be carried out.In a scheme designed to allow designers to“specify formally the structure of com-plex and concurrent dialogues”,Alexander[2]uses CSP[13]behavioural definitions to describe user input syntax,linking operations to each event.CSP provides a rich set of operators for combining events and processes,the main operators being prefix,choice, sequence and parallel er inputs and system responses are represented as atomic events,but causation of events and the communication between components are unspecified.The system model consists of an association between events and a speci-fication in me too(a lisp-like executable specification language based on VDM[15]). The events themselves are specified with eventISL(interaction specification language for events).An event describes only one interaction with the user,an interaction con-sisting of one input from the user and one output from the system.Thus no real model of the system is provided apart from the fact that functionality is structured via events with a single input and single output.Alexander’s CSP approach covers only the dialogue structure aspect of the inter-active system specification,and is not sufficient for the task in hand in unaugmented form.Nevertheless,the interleaving semantics of CSP provides a powerful means for specifying and reasoning about concurrent operations without the complexity overhead of computation based models of parallelism.Hybrid Specification As CSP does not provide support for describing either the struc-turing of the system as a collection of objects,nor for defining the behaviour of these objects,an obvious step is to combine it with a mechanism for defining an object’s state and behaviour.There are a number of difficulties with the use of hybrid notations:–the problem of maintaining consistency between the two components of each spec-ification,–no overall meaning can be given to a specification unless there is a semantic link between the two components,–there can be ambiguity in the separation of concerns between the two components (explored below),–using two notations adds to the complexity of construction,analysis and refinement, and also makes automated support for these more difficult to realise.This criticism of hybrid notations is not to be confused with the construction of multiple (partial)models of a system as advocated in[9].As the specifications under discussion define the joint behaviour of a set of interactors,it is desirable that a single specification be constructed for this purpose.The agent language of Abowd[1]is illustrative of a move towards object based specification,in the form of independent agents.Abowd pays particular attention to the composition of agents to form complete systems,and provides a means of specifying interleaving of agents.Agents include internal and external components,the internal component detailing the operations and state changes of the object,and the external specification(a CSP behavioural specification)detailing interactions with other agents. Although there is a semantic link between the components of the specification,the nota-tion is a hybrid with the attendant problems thereof.Also,as pointed out by Hussey[14], the composition operations deal only with entire agents rather than with individual op-erations,severely limiting the opportunities for reuse.Hussey[14]harnesses the expressiveness of the formalism for dialogue descrip-tion within a more complete specification process through the application of interactor style specifications:using CSP for user input syntax and Object-Z[8]for state and op-erations.The events(alphabet)in the CSP dialogue description each correspond to a single Z schema.Additionally,each interactor[6]has a behavioural description(alpha-bet and trace definition)associated with it.In addition to the lack of a semantic link between the components,the lack of integration of the external specification into the object model means that the standard object mechanisms for reuse cannot be applied to external behaviour.There is also the problem of consistency.Whereas the CSP specifi-cation gives the sequence of allowable user actions,the object definition could disallow all such sequences completely through the precondition on the operation schemas. Separation of Concerns With hybrid notations,a difficulty is encountered in obtaining a clear separation of concerns between the two components of the specification.For example,it is possible to express the same behaviour using different combinations of CSP and schema definitions.Consider a simple system which can be either locked or unlocked,with an initial state of unlocked,and two corresponding operations:Clearly the same set of possible traces of behaviour is described by the two defini-tions,but whereas thefirst uses the external CSP expression to ensure legal behaviour, the second uses a combination of CSP and precondition schemas.Summary While all three approaches use CSP as the basis for describing joint be-haviour,there are significant differences in the mode of application.Abowd includes communication and a higher level notation of agent interleaving,while Hussey relies on a one-to-one mapping between user input events and operation schemas.Object-Z provides extensive object support,whereas Abowd is limited to structuring only,and Alexander provides none at all.A table summarising the three approaches is given be-low:Hussey’s work effectively illustrates that the expressive power of this combination Approach Alexander AbowdCSPObject-Zgoodnounit of specification,and the lack of provision for alterations of inter-object behaviour. Hussey’s approach performs better as a large class of changes can be encompassed by rewriting the CSP syntax definition,but there is little scope for reuse of inter-object behaviour.Action Models In contrast to the event model,action based systems suffer relatively little from the above problems.In the action model,a specification consists of a collec-tion of objects and actions.A number of objects can participate in an action,and actions may place preconditions on these participants.All state changes are effected by means of actions.A comprehensive survey in[16]shows the action model to have a high de-gree of expressive power according to a broad range of criteria.Summarising the work in[5],there a number of features of systems such as DisCo[11](an object oriented action based language)which contribute towards resolution of the above problems.–contextualisation:the separation of object definition and interaction in a semanti-cally consistent way through the use of actions moves us away from a purely object based system.Hence the context dependence of objects including inter-object be-haviour is addressed,at the price of a very different specification architecture.–viscosity:the ability to alter inter-object behaviour through strengthening of guards and extension of states.Although again not unique to action based systems,the use of action style specification makes this type of change more likely to encompass a larger proportion of desired changes to inter-object behaviour.–dependency:the environmental selection of actions based on the availability of appropriate objects satisfying the preconditions.This is the basis of the action style, and allows specifications to be written in such a way that we need not define the sequence of operations which put the system into a certain state in order to define an operation which is enabled in that state.The key concepts then,are the environmental selection of actions,the ability to strengthen and alter action guards,and the shift in focus away from the objects alone.1.3EnhancementThe concept of enhancement is of particular interest.For our purposes we can define enhancement as adding observable behaviour to a system specification in a manner which preserves properties of the original system.Following Bramwell[3]we agree that the designer often works by enhancing a previous specification,and with this in mind,we will take enhancement as our mode of reuse.Such an incremental mode of development is of particular importance in the interactive systems context,given the modern emphasis on rapid prototyping and fast feedback into the design process over many iterations of the development cycle.Past approaches to enhancement have generally focussed on data refinement and state[3].While there is a relationship between refinement and enhancement,as noted by Bramwell,refinement can include simplification or elimination of observables and hence not all refinements are enhancements.We are also interested in behavioural en-hancements which concern the trace of a composite operation.The notion of trace al-lows us to formulate definitions of enhancement which are meaningful in an interactive systems context.This focus can also be used to resolve the distinction between compo-sition refinement and enhancement.Bramwells’definition,based on He[12],requiresthat the traces of the refined interactor yield a subset of those of the original interactor when projected onto the alphabet of the original(a formal definition is given in sec-tion2.4).This can involve the loss of observable behaviour,so we introduce the notion of composition enhancement in which the traces of the enhanced interactor yield exactly those of the original when projected onto the alphabet of the original.A challenge posed by this is to revisit such formalisations of enhancement in the context of object oriented specification,for which we need a framework in which inter-object behaviour is defined in such a way that we can reason about traces of behaviour.1.4Other ConcernsAction systems have the ability to express multiple object participation in composite operations.This is a powerful model for object interaction,and satisfies the concerns in the object-oriented literature regarding the expressive power of the event model.We do not advocate direct use of action models for a number of reasons;on a practical level, use of such models for specification is not widespread at the present time.Also,within thefield of interactive systems specification,the impact of the use of such formalisms on usability reasoning is not known.Model based specification languages such as Z[18]and VDM[15]are a more prac-tical alternative as they are widely used and supported.Although they are not based on the event model,event style specifications using them have been common[7].As they model the state and operations of the system we can usefully reason about modes, goal achievement,functional invariants and information to be presented to the user. We are particularly interested in object based variants of these mainstream specifica-tion languages for the reasons previously discussed(namely,object reuse and ease of implementation).A pragmatic approach would be to incorporate action concepts into a framework based on a conventional specification language,taking into account the concerns of interactive systems.Above,the examination of interactive system concerns has suggested that an expres-siveness similar to CSP behavioural definitions is desirable(particularly for concurrent dialogues),but must be augmented to describe joint behaviour.Previous approaches to this have involved hybrid specifications,which cause consistency and tractability prob-lems.Likewise the reuse concerns mitigate against purely event based specification of joint behaviour,favouring more action based approaches.Our goal is to factor both of these sets of concerns into any proposed approach.2A New Schema CalculusMotivated by the analysis above,we take Object Z[8]and the schema calculus as the basis for our approach,and demonstrate that this approach satisfies the above concerns. Examination of these concerns also allows us to justify the differences between our ap-proach and previous approaches such as that of Hussey[14].Object Z is a natural choice as it incorporates many object oriented concepts and is based on a widely used model-based formalism(Z).Operations may be declared in much the same way as schemas in Z or as composites of operations.A class encapsulates both state and operations.2.1Defining joint behaviour with the schema calculusAs Hussey notes[14],Object Z classes provide a convenient means for structuring a system as a collection of interactors.The attributes of the class correspond to the state of the interactor,with state transitions effected by means of operations.Rather than relying on an external description of the allowable traces of such operations,as was the case in the approaches examined earlier,we define these traces using the schema calculus.Taking the basic schema calculus operators of choice([])and sequential composi-tion(),inter-object behaviour and syntax can be defined simultaneously,as the schema calculus expression determines both theflow of data and sequencing of operations.For example the CSP definition:MENU=(display selection(MENU[]SKIP))will have an equivalent effect to the schema calculus expression:2.2Separation of ConcernsOne aspect of the action model which must be considered carefully concerns the need for moding state to sequence internal operations.This state is neither visible nor mean-ingful to the user.However an opportunity is present to resolve both this problem and the difficulty in obtaining a clean separation of concerns identified above.Essentially,the problem of separation of concerns is that moding can be expressed either by means of schema preconditions(guards)or the schema calculus.Given that user visible moding is of particular interest,we formulate the rule that user-visible mod-ing be expressed through the use of guards,and that where possible‘internal’modes be expressed by means of the schema calculus.This allows us to achieve a more distinct separation of concerns and should also yield more structured specifications.For example,a paste command in an editor might be specified as the following: Where is a precondition on the mode of thefile(essentially a guard on the command),returns the contents of the clipboard and inserts the text returned by the clipboard.2.3Defining BehaviourUnder the semantics of Object Z,sequentially composed schemas are equivalent to atomic schemas.The existing‘parallel’operator is actually a form of conjunction with communication,with no concept of visible intermediate states or interleaving.This is entirely suitable when describing functionality.In the interactive systems context,however,the specific behaviour is of interest,and the lack of parallel operations is a problem.As all operations are effectively atomic,we cannot meaningfully discuss intermediate states or simultaneous operations.At best,the possibility of simultaneous operations can be encoded by introducing state variables for each operation,storing the current point in the operation.The operations are then split into sub-operations with preconditions over this state to sequence each sub-operation.This is obviously not anideal solution.Firstly the abstraction for operations no longer matches that provided by the notation,secondly we have had to encode the execution model explicitly,and thirdly the granularity has been forced to the lowest level.What is needed is an expressiveness akin to the interleaving parallel semantics of CSP.With such an approach,the schema calculus could be used to define composite behaviour in a way which allows us to define and reason about intermediate states and concurrent operations,without having to resort to hybrid specifications.In order to achieve an interleaving semantics,there must be a notion of atomicity of sequentially composed schemas.Thus the meaning of a given schema expression can be given in terms of the meaning of a set of sequentially composed schemas,with simple operations defined as sequences of length one.With this we can have a notion of intermediate states within a schema expression,that is,the state at a point in time de-termines the simple or‘atomic’schemas(within a sequential composition)which may occur next.In our semantics,we allow either an incomplete operation to be continued, or an operation(possibly the same one)to be invoked.Specific concurrency constraints can easily be added to this general framework.To elaborate on the interleaving be-haviour we would wish to define,we see two particular cases,namely interleaving of sequences at the top level,and an interleaving parallel operator.Thus if we have two objects and and operation definitions:1then interleaving of the sequence with the sequence is possible.Within a sequence we might also define a parallel sequence:Where and can be interleaved with each other(and also with other sequences at the top level). This semantics allows us to talk about traces of behaviour,which can be used to relate actions to tasks[4]and to reason about the likelihood and consequences of sequencing errors[19].2.4EnhancementAn interesting result of this semantics,in relation to reasoning about systems is that it allows us to develop a more formal notation of enhancement.We can talk about possible traces of an operation,where the alphabet is the set of sequentially composed schemas. Consider the notion of composition refinement[13];the definition of which states that one action is a composition refinement of another if its alphabet is a superset of the other,and if it is a subset of the other when projected onto its alphabet.Formalising the notion of composition enhancement introduced earlier:We can define object based versions of the above,saying that an action is an enhance-ment of another if the set of objects which participate in it(denoted)are a superset of the other and if it is trace equivalent when projected onto the object set of the other (operator).A behavioural enhancement is necessarily a composition enhancement. These forms of enhancement help us to reason intuitively about changes to behaviour and dialogue of interactive systems specified as a collection of objects.2.5ReuseThe schema calculus and the evaluation model of Z can be applied in a straightforward fashion to arrive at a semantics similar to the action model.In Object Z,operations are‘selected’(by the environment)from the set of currently enabled operations,and data(input parameters)may be provided by the environment.This is similar to the action model,where both the action and the objects it executes with are selected by the environment.Hence a schema at the top level,which has a precondition or guard, selectable by the environment,and whose inputs are provided by the environment,can be thought of as an action.Operations defined at the top level may also be defined with schema expressions(expressions in the schema calculus),and in fact this must be done where inputs are provided by other schemas in the system.Since choice and selection are possible within schema expressions we can view a component schema as a form of action.This is strengthened by the interleaving semantics which allows interaction between schemas through the state transitions they perform.The fact that operations can themselves be constructed from other schemas,by means of the schema calculus,makes it possible to deal with the composition of be-haviour and communication/interconnection.Environment enrichment can be used to denote explicitly(possibly nondeterministic)selection by the environment.Let us now consider the reuse criteria.This style can be criticised from the con-textualisation viewpoint as being another form of a meta-method approach.In such an approach,higher level methods are used to call methods in given objects and define the manner in which they interact.However there are differences:–the top level is still selected by the environment and as such the unit can be reasoned about as an action.–the combination of interconnection and enablement allows the schemas themselves to be written with a relatively low degree of dependency.Thus even if the inputs are supplied by other schemas in the expression,we still write schemas as if they were being produced by the environment(ie.in the action style).–there is a difference between a schema expression and what may appear in the body of a schema,particularly in the context of an interleaving semantics.Looking at the other reuse criteria,the dependency aspect is good.This is because the source and destination of communication is entirely dependent on the context in which the schema appears,and hence unnecessary dependency has not been introduced to the communication.Also,schemas have preconditions allowing dependencies to be encoded at a relatively high level of abstraction.Likewise for the viscosity issue,pre-condition schemas allow us to alter inter-object behaviour without modifying schema bodies.3ExampleA small case study of a web browser is presented below to illustrate the style of specifi-cation we envision.We start by noting the main components of functionality the appli-cation is to provide.File access and markup form the functional core,file presentation, hyperlinks and navigation form the user interface component.We have a number of requirements on the interaction the system is to support.The user must be able to:(1) move within the text(2)resize text(3)select hyperlinks(4)type in a URL.We opt to distinguish interaction with text(especially hyperlinks)(requirements1-3)from rest of front end(requirement4).The interface is defined with two interactors(HText and Location)and the system with a single Core class,each of which is specified as an Object-Z class.The HText interactor represents the component displaying the page,and so includes operations to move within the page2,resize the page display and to display a new page.The location interactor simply displays the address of the page currently being dis-played:2Schema bodies are omitted for brevity.We use a higher level class to tie the specification together3,and to contain joint be-haviour:seqSelecting a new site from a previously visited site will discard sites in the history after the current one.An instance of the history must obviously be defined4:The new-site action must be invoked whenever a new site is visited and so we must define a new joint behaviour:operation is a behavioural enhancement ofare projected onto the object set oftxt(to determine whether markupfile has completed successfully).In the schema calculus,this corresponds to adding a“precondition schema”which constrains it’s input variables (and does not manipulate state)through sequential composition(or conjunction),for example:.Expressions including markupfile and newIt can be seen that thedue to the prefix closure property of the traces function.The capabilities of the inter-leaving semantics can be exploited when dealing with concurrent operations the speci-fication includes the possibility of performing operations such as resize while a new-urlaction is in progress.Furthermore,the effects of the resize can be taken into account in the markup;sub-language;since we use the same sub-language we need not include the details here. The two-part simple operation is the basic building block of the sub-language.Each op-eration is represented by a set of enabled operation values or En val,which consist of a single state in which the operation is defined,and a set of transactions.A transac-tion is a relation between an triple describing the internal transition, and a message describing external interaction.The pairs in the transaction relation capture the behaviour under different inputs and the possibility of non-determinism. Each En val thus encodes all the possible transitions from a given state. Composition Operators Thefirst level of the semantics relates simple operations to composite operations.Since the meaning of an operation is represented by a set of En val,the composition operators are defined by a set of meaning functions map-ping sets of En val representing the composed schemas to a single set of En val representing the composite operation:This must be altered to accommodate the notion of interleaving;particularly we must keep the components of sequences distinct in order to allow an interleaving seman-tics.In our semantics,all these functions manipulate sets of sequences of En val.A simple operation is represented by a set of sequences of length1.In this way,the meaning of any schema expression is defined by a set of sequences of En val.We also introduce a meaning function for the interleaving parallel operator:seq seq seqClass,Object and Specification Meaning The next level of the semantics relates operation definitions in the form of sets of sequences of En val to the meanings of classes and hence to the meaning of a specification.With the redefinition of the meaning of an operation as a sequence,the class and object meanings must be altered. In the definition of Classopval,which is extended to encompass the state between steps of a sequence.This is critical since the meaning of a class is defined in terms of object values and transitions between them. So the Objectopobjects which does likewise for the initial states,and OT,which produces the set of object transitions defined by the class.These functions are rewritten to incorporate the new definition of object value, and the representation of operations by sets of sequences of En val.Both the objects and transition map may include unreachable values,so the functions reachable obobjects and poss behavs are as in[10].。
量化融合英语Quantitative Integration: Embracing the Power of Data-Driven DecisionsIn today's rapidly evolving business landscape, the ability to make informed, data-driven decisions has become a crucial competitive advantage. The concept of "quantitative integration" has emerged as a powerful approach that harnesses the synergistic potential of data analytics, technology, and strategic decision-making. This essay will delve into the significance of quantitative integration, its practical applications, and the transformative impact it can have on organizations across various industries.At the heart of quantitative integration lies the recognition that data is the lifeblood of modern business. The exponential growth of digital technologies has led to an unprecedented abundance of data, encompassing everything from customer behavior patterns to operational metrics. The challenge, however, lies in effectively leveraging this wealth of information to drive meaningful insights and actionable strategies.Quantitative integration bridges the gap between data and decision-making by establishing a seamless flow of information across an organization. It involves the integration of robust data collection, analysis, and interpretation processes, empowering decision-makers to make well-informed choices based on quantifiable evidence. This approach enables organizations to navigate complex business challenges with greater clarity, agility, and confidence.One of the key benefits of quantitative integration is its ability to enhance operational efficiency. By analyzing performance data, organizations can identify areas for optimization, streamline workflows, and eliminate bottlenecks. This data-driven approach allows for the precise allocation of resources, the identification of cost-saving opportunities, and the implementation of targeted improvements that directly impact the bottom line.Moreover, quantitative integration plays a pivotal role in the realm of customer experience. By leveraging customer data, organizations can gain a deeper understanding of their target audience, their preferences, and their pain points. This insight enables the development of personalized products, services, and marketing strategies that resonate with customers on a deeper level. Ultimately, this customer-centric approach can lead to increased loyalty, higher retention rates, and sustained growth.The applications of quantitative integration extend beyondoperational and customer-facing domains. In the realm of strategic planning, data-driven insights can inform critical decision-making processes, from identifying new market opportunities to evaluating the feasibility of expansion plans. By incorporating quantitative analysis into the strategic decision-making framework, organizations can reduce the risk of missteps, capitalize on emerging trends, and maintain a competitive edge in their respective industries.Furthermore, quantitative integration plays a crucial role in the realm of risk management. By analyzing historical data, organizations can identify potential risks, assess their likelihood and impact, and implement proactive mitigation strategies. This data-driven approach to risk management allows for the anticipation and prevention of potential pitfalls, safeguarding the organization's long-term sustainability and resilience.The successful implementation of quantitative integration, however, is not without its challenges. Organizations must navigate the complexities of data governance, ensure the integrity and reliability of their data sources, and develop the necessary data literacy and analytical skills within their workforce. Overcoming these challenges requires a comprehensive, cross-functional approach that aligns technology, people, and processes.Despite these hurdles, the benefits of quantitative integration areundeniable. By embracing this data-driven approach, organizations can unlock new levels of operational efficiency, enhance customer experiences, inform strategic decision-making, and mitigate risks. As the business landscape continues to evolve, the ability to leverage quantitative integration will become an increasingly essential competitive advantage.In conclusion, the concept of quantitative integration represents a transformative shift in the way organizations approach decision-making. By seamlessly integrating data, analytics, and strategic thinking, this approach empowers organizations to navigate the complexities of the modern business environment with greater clarity, agility, and success. As the digital age continues to reshape the business landscape, the adoption of quantitative integration will be a crucial factor in determining the long-term success and sustainability of organizations across all industries.。
In the era of globalization,the integration of technology has become a crucial aspect of development for any nation.The following essay will delve into the importance of aligning with international technology standards and practices,the benefits it brings,and the steps that can be taken to achieve this integration.The Importance of International Technology Integration1.Enhanced Competitiveness:By integrating with international technology,countries can enhance their competitiveness in the global market.This is achieved by adopting advanced technologies that improve production efficiency and product quality.2.Knowledge Sharing and Innovation:International technology integration facilitates the exchange of knowledge and ideas,which is essential for innovation.It allows for the sharing of best practices and the development of new technologies that can solve global challenges.3.Access to Global Markets:With the integration of international technology,businesses can expand their reach to global markets.This is particularly important for small and mediumsized enterprises SMEs that may not have the resources to go global otherwise.4.Economic Growth:The adoption of international technology standards can lead to increased productivity and economic growth.It can also attract foreign investment,which is vital for the development of infrastructure and the creation of jobs.Benefits of International Technology Integration1.Improved Standards:Aligning with international technology standards ensures that products and services meet the expectations of global consumers.This can lead to greater customer satisfaction and loyalty.2.Technological Advancement:Integration with international technology can lead to the adoption of cuttingedge technologies that may not be available domestically.This can result in significant advancements in various sectors,such as healthcare,agriculture,and manufacturing.3.Cultural Exchange:Technology integration often goes hand in hand with cultural exchange.This can lead to a better understanding of different cultures and can foster international cooperation.4.Sustainability:International technology often incorporates sustainable practices thatcan help in reducing environmental impact.This is particularly important in the face of climate change and the need for sustainable development.Steps to Achieve International Technology Integration1.Policy Reform:Governments should implement policies that encourage the adoption of international technology standards.This may include incentives for businesses to invest in new technologies and penalties for noncompliance.cation and Training:It is essential to invest in education and training to ensure that the workforce is equipped with the skills needed to work with international technology. This includes both technical skills and an understanding of international business practices.3.Research and Development:Invest in research and development to create homegrown technologies that can compete on the international stage.This can also lead to the creation of intellectual property that can be exported.4.Collaboration:Foster collaboration between domestic and international entities.This can take the form of joint ventures,partnerships,or participation in international research projects.5.Infrastructure Development:Develop the necessary infrastructure to support the integration of international technology.This includes telecommunications,transportation, and energy infrastructure.In conclusion,integrating with international technology is not just a matter of keeping up with the times it is a strategic move that can significantly impact a nations economic and social development.By embracing international standards and practices,countries can ensure that they are part of the global technological landscape,benefiting from the innovations and opportunities that come with it.。
Education reform is a topic of significant importance in todays world,as it directly impacts the future of society and the development of individuals.Here are some key points to consider when discussing educational reform:1.Curriculum Modernization:One of the primary aspects of educational reform is updating the curriculum to reflect current knowledge and skills required in the modern world.This includes integrating technology,critical thinking,and problemsolving skills into the learning process.2.Teacher Training and Development:Teachers are the backbone of the educational system.Reforms should focus on continuous professional development for teachers, providing them with the necessary tools and training to adapt to new teaching methodologies and technologies.3.Assessment and Evaluation:Traditional assessment methods often focus on rote memorization and standardized testing.Reforms should encourage a more holistic approach to evaluation,considering creativity,collaboration,and practical application of knowledge.4.Inclusivity and Accessibility:Education should be accessible to all,regardless of socioeconomic status,physical abilities,or learning differences.Reforms should aim to remove barriers and provide equal opportunities for all students to succeed.5.StudentCentered Learning:Shifting the focus from teachercentered to studentcentered learning can empower students to take charge of their own education.This involves personalized learning plans,projectbased learning,and fostering a sense of curiosity and selfmotivation.6.Technology Integration:With the rapid advancement of technology,it is crucial to integrate digital tools and resources into the classroom.This can enhance learning experiences,provide access to a wealth of information,and prepare students for the digital age.7.Lifelong Learning:Education reform should promote the concept of lifelong learning, encouraging individuals to continue their education and skill development beyond formal schooling.This can be achieved through community programs,online courses,and flexible learning opportunities.8.Global Perspectives:In an increasingly interconnected world,it is important for educational reform to include a global perspective.This involves teaching about differentcultures,global issues,and fostering international understanding.9.Funding and Resources:Adequate funding is essential for implementing educational reforms.This includes investing in infrastructure,technology,and teacher salaries to ensure quality education for all.munity and Parental Involvement:The success of educational reform often depends on the support and involvement of the community and parents.Engaging stakeholders in the decisionmaking process can lead to more effective and sustainable reforms.By addressing these areas,educational reform can lead to a more equitable,effective,and forwardthinking education system that prepares students for the challenges and opportunities of the21st century.。
Rigor in academic pursuit is a hallmark of excellence that sets apart distinguished scholars from the rest.It is an approach that emphasizes precision,thoroughness,and a relentless pursuit of knowledge.Here are some key aspects that embody the spirit of rigorous scholarship:prehensive Research:A rigorous scholar does not settle for superficial understanding.They delve deep into their subject matter,exploring various sources, perspectives,and theories to form a wellrounded view.2.Critical Thinking:Excellence in scholarship requires the ability to question assumptions,analyze arguments,and evaluate evidence critically.Scholars must be able to discern the validity of claims and the soundness of reasoning.3.Attention to Detail:Meticulous attention to detail is crucial.Scholars must ensure that their work is free from errors,inconsistencies,and inaccuracies.This includes careful proofreading,factchecking,and ensuring that all data is correctly interpreted and presented.4.Methodological Rigor:The methods used in research must be sound and appropriate for the questions being asked.This involves selecting the right tools and techniques,and applying them consistently and accurately.5.Ethical Integrity:Scholars must adhere to ethical standards in their work.This includes honest reporting of findings,giving credit where it is due,and avoiding plagiarism or any form of academic dishonesty.6.Openness to Feedback:Rigorous scholars are open to critique and willing to revise their work based on constructive feedback.They understand that learning is a continuous process and are always looking for ways to improve.7.Innovation and Creativity:Excellence in scholarship often involves thinking outside the box and approaching problems from new angles.Scholars should be willing to challenge the status quo and propose innovative solutions.8.Persistence and Resilience:The path to scholarly excellence is often fraught with challenges and setbacks.Rigorous scholars are persistent,resilient,and committed to their work,even in the face of difficulties.9.Interdisciplinary Approach:Recognizing the value of integrating knowledge from different fields,rigorous scholars often draw insights from multiple disciplines to enrichtheir understanding and research.munication Skills:The ability to communicate complex ideas clearly and effectively is essential.Scholars must be able to articulate their findings in a manner that is accessible to both peers and the broader audience.11.Lifelong Learning:Rigorous scholars have a commitment to lifelong learning, constantly seeking to expand their knowledge and skills,and staying current with new developments in their field.12.Collaboration:Recognizing that no one has a monopoly on knowledge,rigorous scholars often collaborate with others,leveraging diverse perspectives and expertise to achieve greater insights and understanding.In conclusion,rigorous scholarship is not just about the pursuit of knowledge it is about the pursuit of truth and understanding with integrity,creativity,and an unwavering commitment to excellence.。
In the realm of creative inspiration,diversity plays a pivotal role in fostering a rich tapestry of ideas and perspectives.Here are several aspects that illustrate how diversity can inspire creativity in English compositions:1.Cultural Perspectives:Drawing from various cultural backgrounds can add depth and authenticity to an English essay.By incorporating elements of different cultures,such as folklore,traditions,or historical events,a writer can create a narrative that resonates with a global audience.2.Linguistic Variations:The English language itself is diverse,with different dialects, slang,and expressions from around the ing these variations can add a unique flavor to the writing and make it more engaging.3.Ideological Diversity:Including a range of ideologies and belief systems in an essay can lead to thoughtprovoking discussions and debates.This can be particularly effective in argumentative essays where presenting multiple viewpoints can lead to a more nuanced and balanced argument.4.Diverse Characters:Creating characters from different walks of life can make a story more relatable and interesting.By giving each character a distinct voice and background, a writer can explore a variety of themes and issues.5.Inclusive Language:Using inclusive language that respects and acknowledges all individuals,regardless of their race,gender,or social status,can make an essay more appealing and inclusive.6.Global Issues:Writing about global issues such as climate change,poverty,or social justice can inspire creativity by encouraging writers to think beyond their immediate surroundings and consider the broader implications of their topics.7.Historical and Contemporary Blends:Combining historical contexts with contemporary issues can create a unique narrative that bridges the past and the present, offering fresh insights into timeless themes.8.Personal Experiences:Sharing personal experiences that reflect diversity can add a layer of authenticity to an essay.These experiences can be related to travel,living in different cultures,or interacting with people from various backgrounds.9.Interdisciplinary Approaches:Integrating knowledge from different fields such as science,art,and philosophy can provide a multifaceted view of a topic,encouragingcreative thinking and innovative arguments.10.Unconventional Formats:Experimenting with different formats,such as a dialogue,a diary entry,or a series of letters,can break the mold of traditional essay writing and inspire unique storytelling techniques.By embracing diversity in all its forms,writers can unlock a wealth of creative potential, leading to English compositions that are not only engaging but also reflective of the multifaceted world we live in.。
Integrating Generative and Aspect-Oriented TechnologiesUiráKulesza,Alessandro Garcia,Carlos Lucena,Arndt von Staa Software Engineering Laboratory,SoC+Agents Group,Computer Science DepartmentPontifícal Catholic University of Rio de Janeiro - PUC-Rioe-mail:[uira,afgarcia,lucena,arndt]@inf.puc-rio.brAbstractOver the last years, two new software engineering approaches have been proposed: generative programming and aspect-oriented software development. Generative programming addresses the study and definition of methods and tools that enable the automatic production of system families from a high-level specification. Aspect-oriented software development has been proposed as a technique for improving separation of concerns in the construction of OO software and supporting improved reusability and ease of evolution. The use of aspect-oriented techniques in a definition of a generative approach can bring benefits to the modeling and generation of crosscutting features since early development stages. This paper presents our experience in the definition of an aspect-oriented generative approach. The proposed approach explores the multi-agent systems domain to enable the code generation of agent architectures.1. IntroductionOver the last years, generative programming and aspect-oriented software development have been proposed aiming at increasing maintainability and reusability of software systems. While several research works have focused on the investigation of the individual use of each of these software engineering approaches, less attention has been paid to the integration of these two techniques. Generative Programming (GP) [8] has been proposed recently as an approach based on domain engineering [21, 27, 28]. It addresses the study and definition of methods and tools to enable the automatic production of software from a high-level specification. GP promotes the separation of problem and solution spaces, giving flexibility to evolve both independently. Problem space models concepts and features existent in a specific domain. Solution space consists of the components that are used to build particular software systems. Code generators represent the configuration knowledge in a generative model. They define how specific feature combinations in the problem space are mapped to a set of software components in the solution space.Aspect-Oriented Software Development (AOSD) [23, 33] is an evolving approach to modularize crosscutting concerns that existing paradigms (e.g.: object-oriented) are not able to capture explicitly. Crosscutting concerns are concerns that often crosscut several modules in a software system. AOSD encourages modular descriptions of complex software by providing support for cleanly separating the basic system functionality from its crosscutting concerns. Aspect is the abstraction used to modularize the crosscutting concerns.The use of aspect-oriented techniques in the definition of a generative approach can bring additional benefits for the development of system families, such as: (i) clear separation of orthogonal and crosscutting features in the problem and solution space; and (ii) direct mapping of crosscutting features in aspects. Despite these advantages, we believe that the integration of GP and AOS D techniques is not a trivial task. Interesting questions arise and need to be considered whendeveloping an aspect-oriented generative approach, including: How to model crosscutting features in the problem space? How to design aspect-oriented architectures that address the crosscuting and non-crosscutting features modeled? Which technologies (domain-specific languages, frameworks) are appropriate to implement these aspect-oriented generative approaches?Recent work explored the use of GP and AOS D together [18,26,31]. However, these reports neither cover nor describe in detail the typical phases (domain analysis, domain design and domain implementation) found in the definition of a generative approach.In this context, this paper describes systematically how we have developed an aspect-oriented generative approach to the context of families of multi-agent systems. Following the guidelines presented by Czarnecki and Eisenecker [8], we have organized the development of the generative approach into three phases: (i) domain analysis; (ii) domain design; and (iii) domain implementation. The use of aspect-oriented technologies required the adaptation of modeling notations used in domain analysis and design, such as: (i) the extension of feature models to represent crosscutting features; and (ii) the extension of a current aspect-oriented modeling notation [6] to represent aspect-oriented architectures. In the domain implementation, we illustrate the use of different mainstream technologies to implement the central components of a generative approach, such as: (i) XML-S chema [34] to specify domain-specific languages; (ii) Java and AspectJ [9] programming languages to implement the agent architecture and components; and (iii) Eclipse technologies [11, 30] to build the code generator.The remainder of this paper is organized as follows. S ection 2 introduces the basic concepts of generative programming and aspect-oriented software development. Section 3 presents an overview of our aspect-oriented generative approach and details the process of domain analysis and design. Section 4 describes the steps to implement the generative approach. Section 5 synthesizes some of the lessons learned during the definition of the aspect-oriented generative approach. S ection 6 discusses some related work. Finally, section 7 provides some conclusions and directions for future work.2. Background2.1 Generative ProgrammingGenerative Programming (GP) [8] addresses the study and definition of methods and tools that enable the automatic generation of software from a given high-level specification language. It has been proposed as an approach based on domain engineering [21, 27, 28].GP promotes the separation of problem and solution spaces, giving flexibility to evolve both independently. To provide this separation, Czarnecki and Eisenecker [8] propose the concept of a generative domain model. A generative domain model is composed of three basic elements: (i) problem space – which represents the concepts and features existent in a specific domain; (ii) solution space – which consists of the software architecture and components used to build members of a software family; and (iii) configuration knowledge – which defines how specific feature combinations in the problem space are mapped to a set of software components in the solution space. GP advocates the implementation of the configuration knowledge by means of code generators.The fact that GP is based on domain engineering enables us to use domain engineering methods [1, 8] in the definition of a generative domain model. Common activities encountered in domain engineering methods are: (i)domain analysis – which is concerned with the definition of a domainfor a specific software family and the identification of common and variable features within this domain; (ii) domain design – which concentrates on the definition of a common architecture and components for this domain; and (iii) domain implementation – which involves the implementation of architecture and components previously specified during domain design.According to Czarnecki and Eisenecker, two new activities need to be introduced to domain engineering methods in order to address the goals of GP:•development of a proper means to specify specific members of the software family. Domain-specific languages (DSLs) must be developed to deal with this requirement;•modeling of the configuration knowledge in detail in order to automate it by means of a code generator.In this work, we have adopted the common activities – domain analysis, domain design and domain implementation – encountered in a domain engineering method to define the generative approach (such as described in [8]). However, we have also considered the other two activities presented above by implementing a domain-specific language and a code generator.2.2 Aspect-Oriented Software DevelopmentAspect-oriented software development (AOS D) [23,33] is an evolving approach aiming at modularizing concerns, which existing paradigms are not able to capture explicitly. It encourages modular descriptions of complex software by providing support for cleanly separating the basic system functionality from its crosscutting concerns. Crosscutting concerns are concerns that often crosscut several modules in a software system.AOS D has been proposed as a technique for improving the separation of concerns in the construction of OO software, supporting improved reusability and ease of evolution. When developing OO software one faces an architectural dilemma: no matter how the OO system is factored, frequently there will be concerns that are handled in different classes. Hence, such concerns crosscut these classes. AOS D supports the modularization of crosscutting concerns by providing abstractions to extract these concerns and later compose them back when producing the overall system.AOS D proposes the notion of aspect as a new abstraction and provides new mechanisms for composing aspects and components(classes, methods, etc.) together at specific join points. AspectJ [22] is an aspect-oriented extension to the Java programming language.The aspect abstraction in AspectJ is composed of inter-type declarations,pointcuts and advices.Pointcuts have a name and are collections of join points. Join points are well-defined points in the dynamic execution of system components. Examples of join points are method calls and method executions. Advice is a special method-like construct attached to pointcuts. Advices are dynamic crosscutting features since they affect the dynamic behavior of components. Inter-type declarations specify new attributes or methods to be introduced in specific classes.As already mentioned, in this work we will focus on aspect-oriented abstractions to capture crosscutting concerns encountered in multi-agent system implementations. Examples of such concerns are interaction, autonomy, adaptation and collaboration [17].3. An Aspect-Oriented Generative ApproachThe aspect-oriented (AO) generative approach aims at exploring the horizontal domain [8]of multi-agent systems (MAS s)to improve their quality and productivity. The purpose of the generative approach is threefold: (i) to uniformly support crosscutting and orthogonal (non-crosscutting) featuresof software agents starting at early development stages [9,29]; (ii) to abstract the common and variable features; and (iii) to enable the code generation of AO agent architectures.Figure 1 depicts our generative approach that is composed of:(i) a domain-specific language (DSL), called Agent-DSL, used to collect and model orthogonal and crosscutting features of software agents;(ii) an AO architecture modeling a family of software agents. It is centered on the definition of aspectual components to modularize the crosscutting agent features;(iii) a code generator that maps abstractions of the Agent-DS L to specific compositions ofsteps followed in the development of the generative approach were:1.Domain Analysisa.Definition of the domainb.Identification and modeling of common and variable features of the domainc.Identification and modeling of the crosscuting features of the domain2.Domain Designa.Specification of the generic AO architectureb.Identification and specification of the DSLsc.Specification of the configuration knowledge3.Domain Implementationa.Implementation of the DSLsb.Implementation of the AO architecture and additional componentsc.Implementation of the code generatorThe following sections describe in more detail most of these steps. Section 3.1 describes the domain analysis phase by presenting the resulted feature model and the proposed notation to represent crosscutting features in a feature model. S ection 3.2 presents the AO agent architecture and the proposed notation to represent aspectual and non-aspectual components. Section 4 describes the steps to implement the elements of the generative approach.AO framework. Because of this decision, the step 2(b) that involves the identification and specification of the DSLs was simplified. It was necessary a definition of a sole configuration DSL used to instantiate the AO framework. Section 4.1 presents the specification and implementation of this DSL.Due to limited space the step 2(c) of the domain design is not described in this paper. The specification of the configuration knowledge was accomplished in our work by defining a pattern language [12]. A pattern language defines how a set of interrelated design patterns can be used together to address a larger problem. Our pattern language shows how the domain features of MASs can be mapped to specific design structures of classes and aspects. A complete description of this pattern language can be found in [13].3.1 Domain AnalysisDuring the domain analysis, recurring agent concerns of multi-agent systems (MASs) were modeled using feature models [21]. Feature models are used to represent common and variable features of system families. Our domain analysis was supported by experience gained from our extensive previous work on the development of several multi-agent systems [13-17], and by surveys of different MAS modeling languages, architectures and platforms [17, 32]. We captured the different features associated with the agent concept, including orthogonal and crosscutting agent features.Figure 2 depicts a partial feature model produced during this phase.The agent concept is composed of its knowledge and its basic properties, which we termed “agenthood ”. The knowledge feature encompasses beliefs ,goals and plans . Agent beliefs describe information about the agent itself and about the external environment with which the agent interacts.To achieve a goal, an agent executes a specific plan. During the execution of a plan, the agent manipulates its beliefs. The agenthood feature is composed of three subfeatures:interaction ,adaptation and autonomy .KnowledgeBelief Plan PlanAdaptation Goal Message ExecutionAutonomy Interaction alternative features Sensory crosscutsDecisionGoalThe interaction feature is the agent capacity to communicate with the environment. The agent can receive or send messages to the environment by means of its sensors and effectors , respectively.External messages are translated to the agent ontology using specific parsers in its sensors. Effector parsers translate internal messages to a specific external representation.The adaptation feature is formed by belief adaptation and plan adaptation . Belief adaptation is responsible for interpreting received messages from the environment and for manipulating its beliefs based on the message contexts. Plan adaptation determines the plan the agent must execute whenever a new goal needs to be achieved.The purpose of the autonomy feature is to instantiate and manage the agent goals. It deals with three types of goals: reactive goals ,proactive goals , and decision goals . Reactive goals are instantiated when the agent receives an external request from other agents or environment components. Proactive goals are instantiated due to internal events that occurs, such as, the end of a plan execution or the achievement of a specific agent state. Finally, the decision goals are instantiated due to external or internal events and are used to decide if special reactive or proactive goals could be instantiated. The autonomy property is also responsible for monitoring the adopted concurrency strategy . It supports the goal achievement by implementing a mechanism for executing concurrently agent plans.In addition to the agent knowledge and the agenthood features, an agent can incorporate additional properties.Additional features include collaboration ,mobility , and learning . The current version of the generative approach just provides support for the collaboration feature. An agent collaborates with other agents by playing different roles. A role gives to the agent extra capacities of knowledge,interaction, adaptation and autonomy. Each agent can play different roles during its execution.To support the representation of crosscutting features in feature models, a new kind of relation between features, called crosscuts relation, has been introduced. We say that a feature A crosscuts a feature B, when either A or one of its subfeatures depends and inspects B or one of the subfeatures of B. In the feature model of the Figure 2, for instance, Adaptation is characterized as a crosscutting feature because it is composed of two features (BeliefAdaptation and PlanAdaptation ) that inspect common features of the Agent Knowledge (Goal and Plan ) and the Agent Interaction (Message ). As a result, the Adaptation feature crosscuts the Knowledge and Interaction features.The Interaction feature is also characterized as crosscutting because it is composed of a subfeature (MessageSending ) that inspects features of the Agent K nowledge (Plan ). In addition, the Autonomy feature crosscuts the K nowledge and Interaction features.3.2 Domain DesignDomain design consists of specifying a generic and flexible AO agent architecture for the domain at hand. Each feature modeled during domain analysis needs to be considered in the design. The AO agent architecture is a refinement of a previous work [16,17]. It uses two kinds of components: (i) a central component that modularizes the orthogonal features associated with the agent knowledge;and (ii) the aspectual components that separate the crosscutting agent features from each other and from the Knowledge component. Aspectual components represent crosscutting features at the architectural level.Figure 3 depicts the components of the AO agent architecture. We have used a new notation to graphically represent an AO architecture. It is an extension of the ASideML modeling language [6].We developed this notation to enable the representation of aspectual components. An aspectual component may crosscut other aspectual or non-aspectual components using its crosscutting interfaces. A crosscutting interface may both add new state or behavior in other components and intercept (and modify) the existent behavior of components. Non-aspectual (normal) components are represented in a similar way to UML [3] and offer their services through the normal interfaces .knowledge feature. It contains two normal interfaces: (i)IKnowledgeUpdating – to update the agent knowledge; and (ii) IServices – to offer agent services. In the domain implementation (section 4.2), this component is refined as a set of classes.Each of the crosscutting agent features (interaction, adaptation, autonomy and role) are modeled as aspectual components in the agent architecture. Each aspectual component was refined during the domain implementation (section 4.2) as a set of aspects and auxiliary classes, which are also part of the crosscutting feature.The Interaction aspectual component models the interaction crosscutting feature. It is composed of two crosscutting interfaces: (i)IMessageReception – which introduces the capacity to receive external messages into the Knowledge component; and (ii)IMessageSending – which crosscuts elements of the Knowledge component to define specific points where is necessary to send messages to the environment. It also crosscuts elements of the Collaboration aspectual component to specify specific points in collaboration plans where is also necessary to send messages to the environment.The Adaptation aspectual component models the adaptation crosscutting feature. It is composed of two crosscutting interfaces: (i)IBeliefAdaptation – which intercepts the invocation of services provided by the IMessageReception interface of the Interaction component toReceptionCreationIExecution IExtrinsicKnowledgeupdate agent beliefs when new external messages are received by the agent; and (ii) IPlanAdaptation – which intercepts the invocation of services provided by the IKnowledgeUpdating interface of the Knowledge component to instantiate new plans to be executed when the agent needs to achieve a specific goal.Finally, the Collaboration aspectual component models the role crosscutting feature. It is composed of two crosscutting interfaces: (i)IExtrinsicKnowledge – which introduces new knowledge (state and behavior) associated with agent roles in the Knowledge component; and (ii) IRoleBinding – which defines specific points in the Knowledge component where agent roles are instantiated and bound to the agents.4. Implementing the Generative ApproachThis section describes the implementation of the generative approach elements: (i) the Agent-DSL, (ii) the AO agent architecture, and (iii) the code generator.4.1 Agent-DSLBased on the feature models defined in the domain analysis (section 3.1), we defined a configuration domain-specific language (DS L), called Agent-DS L. A configuration DS L allows to specify a concrete instance of a concept [8]. It can be directly derived from feature models. This language is used to specify the agent features that an agent instance could have to accomplish its tasks. It allows modeling the agent features, such as, knowledge, interaction, adaptation, autonomy and collaboration.An XML Schema [34] was used to specify the semantics of the Agent-DSL. The feature models were translated to XML Schema complex types. For each specific agent of a MAS to be generated, it must be created an agent description XML document. This document must conform to the XML Schema that defines the Agent-DSL. The right side of Figure 5 depicts a partial specification of an agent type used in a case study developed by our research group [13]. Subsection 4.3 describes in more detail the case study.4.2 The Aspect-Oriented Agent ArchitectureThe implementation of the generic AO agent architecture (section 3.2) was realized using Java and AspectJ [22] programming languages. The basis of the architecture implementation is an AO framework that contains hot-spots as classes and aspects [24]. Figure 4presents a partial description of the AO framework. The ASideML modeling language [6] is used to represent visually the framework.This language extends UML with notations for representing aspects. The notations provide a detailed description of the aspect elements. In this modeling language, an aspect is represented by a diamond; it is composed of internal structure and crosscutting interfaces. The internal structure declares the internal attributes and methods. A crosscutting interface specifies when and how the aspect affects one or more classes [6]. Each crosscutting interface is composed of inter-type declarations, pointcuts and advices. The first part of a crosscutting interface represents inter-type declarations, and the second part represents pointcuts and their attached advices. The notation uses a dashed arrow to represent the crosscutting relationship, which relates one aspect to classes and/or aspects.Every class and aspect presented in the figure are hot-spots.The Knowledge component (section 3.2) was refined as a set of classes – Agent,Belief,Goal and Plan classes. Each one of them represents a specific hot-spot that can be extended to define anagent type. Agent beliefs are defined in our architecture as domain classes that Agent instances canaggregate.Each one of the aspectual components (section 3.2) was refined as a central aspect and aset of auxiliary classes. Figure 4 only presents the main aspects that refine the agent knowledgeclasses incorporating specific agent features.The Interaction component is defined as an abstract aspect that introduces interaction capabilities(inbox, outbox, sensors, effectors, parsers) in the Agent class. It also intercepts domain classes andsensors in the agent environment to enable the message reception by means of AspectJ pointcuts andadvices. Finally, the Interaction aspect defines two abstract pointcuts and some abstractmethods. The abstract pointcuts are used to define specific points in role aspects and plan classeswhere internal messages must be sent. The abstract methods are specialized to create and initializespecific sensors and effectors. The Interaction subaspects define the concrete configuration ofthe Interaction aspect by implementing the abstract pointcuts and methods. It is possible tospecify a different Interaction subaspect for each one of the agent types or roles defined in aMAS.The Adaptation component defines the Adaptation abstract aspect, which enables the Agentclass to adapt its beliefs and plans. The belief adaptation of the Adaptation aspect is defined byintercepting the receiveMsg() method of the Agent class (introduced by the Interactionaspect). After that, specific advices and methods are responsible for updating beliefs based onexternal messages received by the agent. The plan adaptation, defined in the Adaptation aspect,intercepts the setGoal() method of the Agent class and the erroneous execution of the execute() method of the Plan subclasses. The purpose is to determine new agent plans to be executed by the agent to reach a specific goal. The Adaptation abstract aspect also offers abstractmethods to be defined by subaspects. These subaspects allow defining specific belief and planadaptation for each one of the agent types or roles in a open MASs.The Autonomy component defines the Autonomy aspect, which enables the Agent class toinstantiate and manage reactive goals and execute concurrently several plans (execution autonomy).However, for sophisticated agent types, the Autonomy aspect also allows to define proactive anddecision autonomy. To instantiate reactive goals, the Autonomy aspect also intercepts the receiveMsg() method of the Agent class. This interception is used to verify if specific external events (for instance, a request of another agent) demand the instantiation of reactive goals. The execution autonomy is implemented in the Autonomy aspect by defining an Active Object [24], which monitors the list of plans to perform of the Agent class to execute them in separate threads. The proactive autonomy is implemented by specifying: (i) several pointcuts in agent knowledge classes that represent specific events of interest, and (ii) an advice associated with these pointcuts which is responsible for determining if a proactive goal must be instantiated in the occurrence of any of these events. Finally, the decision autonomy only defines a mak eDecision() method in the Autonomy aspect that is invoked in the advices associated with the pointcuts of reactive and proactive goal instantiation. This method verifies whether it is necessary to execute a decision plan on the occurrence of a specific event or on the reception of a message. Autonomy subaspects can also be implemented to define specialized proactive, reactive and decision autonomy for each one of the agent types and roles defined in a MAS.The Collaboration component is implemented by defining role aspects that introduce attributes andmethods in an agent type (Agent class or subclass). These elements define respectively specificbeliefs and behaviors of roles. Also, specific Plan and Goal subclasses must be defined for theroles. The plans defined for a role manipulate the attributes (beliefs) and invoke methods (behaviors)introduced by the role aspect. Goal classes specified for a role are instantiated by an Autonomy。