6. Conclusão
6.2. Trabalhos Futuros
Com o objetivo de dar continuidade à pesquisa desenvolvida nessa dissertação, alguns trabalhos futuros podem ser relacionados, tais como:
Avaliar a usabilidade da ferramenta através de um experimento controlado e comparar os resultados obtidos com os resultados de outras abordagens de identificação existentes;
Implementar um mecanismo de rastreabilidade dos requisitos a partir da matriz de adjacência utilizada por esse método;
Implementar um editor gráfico de PL-AOVgraph para uma melhor visualização do modelo;
Implementar uma interface para visualização da matriz de adjacência e das estatísticas do modelo (quantidades de elementos e relacionamentos), gerando um relatório sobre o modelo;
Estender o algoritmo de identificação com a finalidade de resolver as limitações existentes.
Referências
Alencar, Fernanda; et al. Identifying Candidate Aspects with I-star Approach. In: International Conference on Aspect-Oriented Software Development. 2006.
Alencar, Fernanda; et al. Using Aspects to Simplify i* Models. In: International Conference on Requirements Engineering. 2006.
Ali, B. S.; Kasirum, Z. M. Crosscutting concern identification at requirement level. In: Malaysian Journal of Computer Science, vol. 21(2), pp.78-87. 2008.
Araújo, J.; Moreira, A. An Aspectual Use Case Driven Approach.In: VIII Jornadas de Ingeniería de Software y Bases de Datos (JISBD 2003), Alicante, Spain. 2003.
Baniassad, E.; Clarke, S. Finding Aspects in Requirements with Theme/Doc. In: Proceedings of EarlyAspects 2004 (AOSD 2004). Lancaster, United Kingdom. 2004. Coelho, Keivilany Janielle de Lima. Dos Requisitos à Arquitetura em Linhas de
Produtos de Software: Uma Estratégia de Transformações entre Modelos.
66p.Qualificação de Mestrado. Universidade Federal do Rio Grande do Norte – UFRN, Natal, 2011.
Filman, Robert E, et al. Aspect-Oriented Software Development. Boston: Pearson Addison-Wesley, 2005. 800 p.
Kiczales, G., et al. Aspect-Oriented Programming. In: ECOOP 1997 - Proceedings of the 11th European Conference on Object-Oriented Programming, p.p. 220–242. Finland. 1997.
Kienzle, Jörg; Guelfi, Nicolas; Mustafiz, Sadaf. Crisis Management Systems: A Case
Study for Aspect-Oriented Modeling. Technical Report. McGill University, Montreal,
Canada, 2009.
Monteiro, Cleviton, et al. The iAspectPlugin to Automatize the Identification of
Crosscutting Concern on i* Models. In: I Latin-American Workshop on Aspect-
Oriented Software Development. João Pessoa, Brasil. 2007.
Rosenhainer, Lars. Identifying Crosscutting Concerns in Requirements
Specifications. In: Proceedings of OOPSLA Early Aspects 2004: Aspect-Oriented
Requirements Engineering and Architecture Design. Vancouver, Canada. 2004.
Rosenhainer, Lars. The DISCERN Method: Dealing Separately with Crosscutting
Concerns. In: Early Aspects: OOPSLA. 2005.
Sampaio, Américo, et al. EA-Miner: a tool for automating aspect-oriented
requirements identification. In: International Conference on Automated Software
Sampaio, Américo; Rashid, Awais; Rayson, Paul. Early-AIM: Na Approach for
Identifying Aspects in Requirements. In: International Conference on Requirements
Engineering. 2005.
Santos, Lidiane Oliveira dos. PL-AOVgraph: uma extensão de AOV-Graph para
linha de produto de software. 84 f. Monografia (Bacharelado em Ciência da
Computação) – Universidade Estadual do Rio Grande do Norte, Natal, 2010.
Santos, Lidiane Oliveira dos. ReqSys-MDD: Uma ferramenta para mapeamento
entre modelos de features e requisitos em linhas de produto de software. 113 f.
Dissertação (Mestrado em Sistemas e Computação) – Universidade Federal do Rio Grande do Norte, Natal, 2012.
Silva, Lyrene Fernandes da. Uma estratégia orientada a aspectos para modelagem
de requisitos. 222 f. Tese (Doutorado em Informática) – Pontifícia Universidade Católica do Rio de Janeiro, Rio de Janeiro, 2006.
Sommerville, Ian. Engenharia de Software. Tradução: Selma Shin Shimizu Melnikoff, Reginaldo Arakaki, Edílson de Andrade Barbosa. 8. ed.São Paulo: Pearson Addison- Wesley, 2007. 552 p.
SuttonJr, S. M.; I. Rouvellou. Modeling of Software Concerns in Cosmos. In: Proceedings of the 1st International Conference on Aspect-Oriented Software Development, p.p. 127–133. ACM Press. 2002.
Travassos, Guilherme Horta; Gurov, Dmytro; Amaral, Edgar Araújo Gurgel.
Introdução à Engenharia de Software Experimental. Relatório Técnico. Rio de
Janeiro, 2002.
Yu, Y; Leite, J.; Mylopoulos, J. From goals to aspects: discovering aspects from requirements goal models. In: Proc. Of IEE International Symposium on Requirements Engineering (RE’04), Japan, 2004. Pp. 38-47.
Anexo A – Especificação ESP1
aspect_oriented_model {
goal_model "Crisis Management System" { goal "Crisis be resolved" (and) { task "Manage [crisis]" (and) { task "Identify [crisis]" (and) {
task "Capture [witness report]" (and) { task "Record [Witness Info]" (and) {}
task "Record [location] and [type of crisis]" (and) { task "Display [Video]" (and) {}
task "Request [video feed] from Surveillance system" (and) {} }
task "Validate [Witness Info]" (and) {}
task "Decide if assign [emergency level] to crisis" (and) {} task "Decide if set the [crisis status] to active" (and) {} }
task "Provide [crisis focus checklist]" (and) {} }
task "Manage [Missions]" (and) { task "Create [mission]" (and) {
task "Receive [notification of type of mission to be created]" (and) {}
task "Suggest notify the national crisis center" (or) {} task "Suggest crisis specific [missions]" (and) {} task "Suggest replacement missions" (and) {} }
task "Execute [mission]" (and) {
task "Execute [rescue mission]" (or) {
task "Request [Victim medical history] from hospital" (or) {} task "Receive [Victim medical history]" (or) {}
task "Suggest to bring the victim to appropriated hospital" (and) {} task "Inform FirstAidWorker of history is relevant to his injury" (and) {}
task "Record [injury info of victim]" (and) {} task "Register [victim identity]" (and) {}
task "Receive [notification of dropped off the victim at hospital" (and) {}
task_ref "Receive [notification of completed mission]" (and) {} }
task "Execute [SuperObserver mission]" (and) {
task "Record special features of the aid or vehicle to mission" (and) {}}
task "Execute [helicopter transport mission]" (or) {} task "Execute [remove obstacle mission]" (or) {} }
task "Monitor [mission]" (and) {
task "Inform of [relevant changes to mission]" (and) {}
task "Receive [notification of departure from mission site]" (and) {} task "Receive [final mission report]" (and) {}
task "Receive [notification of arrival at mission site]" (and) {} task "Receive updating on the [mission status]" (and) {}
task "Receive [notification of completed mission]" (and) {} }
}
task "Manage [resource]" (and) {
task "Request mission to ERP" (and) {} }
task "Manage [internal resource]" (and) { task "Assign [internal resource]" (and) { task "Select [employee]" (and) {}
task "Receive confirmation of acceptance mission" (and) {} task "Inform [mission info]" (and) {
task "Request the employee to login" (and) {} }
}
task "Update availability of employee" (and) {} }
}
task "Manage [access]" (and) { task "Authenticate [user]" (and) { task "Request [login info]" (and) {} task "Validate [login info]" (and) {}
task "Block [access] after 3 consecutives failed attempts" (and) {} }
}
task "Manage [communication]" (and) {} }
goal "Abnormal and catastrophic situation be prevented" (and) { task_ref "Monitor changes" (and) {}
}
goal "Resources be allocated in an effective manner" (and) {} goal "Communication be orchestrated" (and) {}
}
goal "Crisis information be achieved to allow future analysis" (and) { task "Statistic Logging" (and) {
task "Generate [statistical analysis]" (and) {
task "Calculate [average response time of rescue team" (and) {} task "Calculate [success rate of each team]" (and) {}
task "Calculate [rate of causalities]" (and) {} task "Calculate [success rate of mission]" (and) {} }
task "Record [info] for logging" (and) {} }
}
goal "Safety of rescue personnel be provided" (and) {} softgoal "Security" (and) {
task "Use [alternate communication channels]" (and) {} task_ref "Manage [crisis]" (and) {}
task_ref "Authenticate [user]" (and) {} }
softgoal "Persistence" (and) {
softgoal "Persistence in [DB]" (and) { task "Include [Data]" (and) {}
task "Select [Data]" (and) {} task "Delete [Data]" (and) {} task "Update [Data]" (and) {} }
task_ref "Manage [crisis]" (and) {} }
softgoal "Safety" (and) {
task "Monitor [emission of crisis]" (and) {}
task "Determinate [safe operating distances and perimeter]" (and) {} task "Monitor [weather]" (and) {}
task "Monitor [criminal activity]" (and) {} task_ref "Manage [crisis]" (and) {}
}
softgoal "Availability" (and) {
softgoal "Availability [7x7]" (and) {}
softgoal "Time to recover <= 30 sec" (and) {} task "Postpone [maintenance]" (or) {}
task "Interrupt [maintenance]" (or) {} task_ref "Manage [crisis]" (and) {} }
softgoal "Adaptability" (and) {
task "Recommend [alternate resources]" (and) {} task "Monitor changes" (and) {}
task "Recommend [alternate missions]" (and) {} task_ref "Manage [crisis]" (and) {}
}
softgoal "Reliability" (and) {
softgoal "Failure rate <= 0.001%" (and) {} softgoal "Reliability [communication]" (and) {} }
softgoal "Multi access" (and) {
softgoal "Maximum quantity of crisis = 100" (and) {}
softgoal "Communication, coordination, info access from rescue resources = 20000" (and) {}
softgoal "Maximum quantity of missions = 200/crisis" (and) {} softgoal "Maximum quantity of witness calling = 1000" (and) {} }
softgoal "Real time" (and) {
softgoal "Time to receive info <= 30s" (and) {}
softgoal "Time of delay to retrieve info <= 500ms" (and) {} softgoal "Time to update info <= 30s" (and) {}
softgoal "Time of delay in communication <= 500ms" (and) {} }
softgoal "Accuracy" (and) {
softgoal "Accuracy of 99% on [accessing maps, terrain and weather conditions]" (and) {}
softgoal "Provide up to date info to rescue resources" (and) {} softgoal "Accuracy [data record]" (and) {}
softgoal "Deterioration factor on communication <= 0.0001/1000km" (and) {}
}
softgoal "Mobility" (and) {
task "Communicate [location]" (and) {} task "Access [info] on the move" (and) {}
task "Access [maps, terrain and weather conditions and routes]" (and) {} task "Provide [location sensitive info]" (and) {}
task_ref "Manage [crisis]" (and) {} }
correlation (help) {
source: softgoal_ref "Real time"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Multi access"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Deterioration factor on communication <= 0.0001/1000km"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Use [alternate communication channels]" target: softgoal_ref "Reliability [communication]"
}
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Reliability" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Safety"
}
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Availability" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Availability [7x7]" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Accuracy" }
correlation (help) {
source: softgoal_ref "Adaptability" target: softgoal_ref "Safety" }
correlation (help) {
source: goal_ref "Resources be allocated in an effective manner"
target: goal_ref "Crisis information be achieved to allow future analysis"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented"
target: goal_ref "Crisis information be achieved to allow future analysis"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Adaptability"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Mobility"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Real time"
}
correlation (help) {
source: goal_ref "Communication be orchestrated" target: softgoal_ref "Security"
}
correlation (help) {
source: goal_ref "Communication be orchestrated" target: softgoal_ref "Multi access"
}
correlation (help) {
source: goal_ref "Safety of rescue personnel be provided"
target: goal_ref "Abnormal and catastrophic situation be prevented" }
correlation (help) {
source: goal_ref "Safety of rescue personnel be provided" target: goal_ref "Crisis be resolved"
}
correlation (help) {
source: goal_ref "Resources be allocated in an effective manner" target: goal_ref "Crisis be resolved"
}
crosscutting {
source: softgoal_ref "Mobility"
pointcut PC0: include "Determinate [safe operating distances and perimeter]"
and include "Monitor [weather]" and include "Monitor [criminal activity]"
and include "Monitor [terrain conditions]" advice (around): PC0 {
task_ref "Provide [location sensitive info]" (and)
task_ref "Access [maps, terrain and weather conditions and routes]" (and)
} }
crosscutting {
source: softgoal_ref "Statistic Logging"
pointcut PC1: include "Receive [notification of arrival at mission site]" and include "Receive [notification of completed mission]"
and include "Receive [notification of departure from mission site]" and include "Receive [notification of dropped off the victim at hospital"
and include "Receive [notification of type of mission to be created]" and include "Receive [final mission report]"
advice (around): PC1 {
task_ref "Record [info] for logging" (and) }
}
crosscutting {
source: softgoal_ref "Safety"
pointcut PC2: include "Monitor [mission]" advice (around): PC2 {
task_ref "Monitor [weather]" (and)
task_ref "Monitor [criminal activity]" (and) task_ref "Monitor [terrain conditions]" (and)
task_ref "Determinate [safe operating distances and perimeter]" (and) }
}
crosscutting {
source: task_ref "Manage [crisis]"
pointcut PC3: include "Reliability [communication]" and include "Real time"
and include "Multi access" and include "Accuracy" and include "Use [alternate communication channels]"
advice (around): PC3 {
task_ref "Manage [communication]" (and) }
crosscutting {
source: softgoal_ref "Adaptability"
pointcut PC4: include "Inform of [relevant changes to mission]" pointcut PC5: include "Provide [crisis focus checklist]"
advice (around): PC4 and PC5 { task_ref "Monitor changes" (and)
task_ref "Recommend [alternate missions]" (and) }
advice (around): PC4 {
task_ref "Recommend [alternate resources]" (and) }
}
crosscutting {
source: task_ref "Monitor [mission]"
pointcut PC6: include "Execute [rescue mission]" and include "Execute [SuperObserver mission]"
and include "Execute [helicopter transport mission]" and include "Execute [remove obstacle mission]" advice (around): PC6 {
task_ref "Receive [notification of arrival at mission site]" (and) task_ref "Receive [notification of departure from mission site]" (and) task_ref "Receive updating on the [mission status]" (and)
task_ref "Receive [final mission report]" (and)
task_ref "Inform of [relevant changes to mission]" (and) }
} } };
Anexo B – Especificação ESP2
aspect_oriented_model {
goal_model "Crisis Management System" { goal "Crisis be resolved" (and) { task "Manage [crisis]" (and) { task "Identify [crisis]" (and) {
task "Capture [witness report]" (and) { task "Record [Witness Info]" (and) {}
task "Record [location] and [type of crisis]" (and) { task "Display [Video]" (and) {}
task "Request [video feed] from Surveillance system" (and) {} }
task "Validate [Witness Info]" (and) {}
task "Decide if assign [emergency level] to crisis" (and) {} task "Decide if set the [crisis status] to active" (and) {} }
task "Provide [crisis focus checklist]" (and) { task_ref "Monitor changes" (and) {}
task_ref "Recommend [alternate resources]" (and) {} }
}
task "Manage [Missions]" (and) { task "Create [mission]" (and) {
task "Receive [notification of type of mission to be created]" (and) { task_ref "Record [info] for logging" (and) {}
}
task "Suggest notify the national crisis center" (or) {} task "Suggest crisis specific [missions]" (and) {} task "Suggest replacement missions" (and) {} }
task "Execute [mission]" (and) {
task "Execute [rescue mission]" (or) {
task "Request [Victim medical history] from hospital" (or) {} task "Receive [Victim medical history]" (or) {}
task "Suggest to bring the victim to appropriated hospital" (and) {} task "Inform FirstAidWorker of history is relevant to his injury" (and) {}
task "Record [injury info of victim]" (and) {} task "Register [victim identity]" (and) {}
task "Receive [notification of dropped off the victim at hospital" (and) {
task_ref "Record [info] for logging" (and) {} }
task_ref "Receive [notification of completed mission]" (and) {} task_ref "Inform of [relevant changes to mission]" (and) {}
task_ref "Receive [notification of departure from mission site]" (and) {}
task_ref "Receive [final mission report]" (and) {}
task_ref "Receive [notification of arrival at mission site]" (and) {} task_ref "Receive updating on the [mission status]" (and) {}
}
task "Execute [SuperObserver mission]" (and) {
task "Record special features of the aid or vehicle to mission" (and) {}
task_ref "Inform of [relevant changes to mission]" (and) {}
(and) {}
task_ref "Receive [final mission report]" (and) {}
task_ref "Receive [notification of arrival at mission site]" (and) {} task_ref "Receive updating on the [mission status]" (and) {}
}
task "Execute [helicopter transport mission]" (or) {
task_ref "Inform of [relevant changes to mission]" (and) {}
task_ref "Receive [notification of departure from mission site]" (and) {}
task_ref "Receive [final mission report]" (and) {}
task_ref "Receive [notification of arrival at mission site]" (and) {} task_ref "Receive updating on the [mission status]" (and) {}
}
task "Execute [remove obstacle mission]" (or) {
task_ref "Inform of [relevant changes to mission]" (and) {}
task_ref "Receive [notification of departure from mission site]" (and) {}
task_ref "Receive [final mission report]" (and) {}
task_ref "Receive [notification of arrival at mission site]" (and) {} task_ref "Receive updating on the [mission status]" (and) {}
} }
task "Monitor [mission]" (and) {
task "Inform of [relevant changes to mission]" (and) { task_ref "Recommend [alternate missions]" (and) {} task_ref "Recommend [alternate resources]" (and) {} task_ref "Monitor changes" (and) {}
}
task "Receive [notification of departure from mission site]" (and) { task_ref "Record [info] for logging" (and) {}
}
task "Receive [final mission report]" (and) { task_ref "Record [info] for logging" (and) {} }
task "Receive [notification of arrival at mission site]" (and) { task_ref "Record [info] for logging" (and) {}
}
task "Receive updating on the [mission status]" (and) {} task "Receive [notification of completed mission]" (and) { task_ref "Record [info] for logging" (and) {}
}
task_ref "Monitor [weather]" (and) {}
task_ref "Monitor [terrain conditions]" (and) {} task_ref "Monitor [criminal activity]" (and) {}
task_ref "Determinate [safe operating distances and perimeter]" (and) {}
} }
task "Manage [resource]" (and) {
task "Manage [external resource]" (and) { task "Request mission to ERP" (and) {} }
task "Manage [internal resource]" (and) { task "Assign [internal resource]" (and) { task "Select [employee]" (and) {}
task "Receive confirmation of acceptance mission" (and) {} task "Inform [mission info]" (and) {
task "Request the employee to login" (and) {} }
}
task "Update availability of employee" (and) {} }
}
task "Manage [access]" (and) { task "Authenticate [user]" (and) { task "Request [login info]" (and) {} task "Validate [login info]" (and) {}
task "Block [access] after 3 consecutives failed attempts" (and) {} }
}
task "Manage [communication]" (and) {} }
goal "Abnormal and catastrophic situation be prevented" (and) { task_ref "Monitor changes" (and) {}
}
goal "Resources be allocated in an effective manner" (and) {} goal "Communication be orchestrated" (and) {}
}
goal "Crisis information be achieved to allow future analysis" (and) { task "Statistic Logging" (and) {
task "Generate [statistical analysis]" (and) {
task "Calculate [average response time of rescue team" (and) {} task "Calculate [success rate of each team]" (and) {}
task "Calculate [rate of causalities]" (and) {} task "Calculate [success rate of mission]" (and) {} }
task "Record [info] for logging" (and) {} }
}
goal "Safety of rescue personnel be provided" (and) {} softgoal "Security" (and) {
task "Use [alternate communication channels]" (and) { task_ref "Manage [communication]" (and) {}
}
task_ref "Manage [crisis]" (and) {} task_ref "Authenticate [user]" (and) {} }
softgoal "Persistence" (and) {
softgoal "Persistence in [DB]" (and) { task "Include [Data]" (and) {}
task "Select [Data]" (and) {} task "Delete [Data]" (and) {} task "Update [Data]" (and) {} }
task_ref "Manage [crisis]" (and) {} }
softgoal "Safety" (and) {
task "Monitor [emission of crisis]" (and) {}
task "Determinate [safe operating distances and perimeter]" (and) {
task_ref "Access [maps, terrain and weather conditions and routes]" (and) {}
task_ref "Provide [location sensitive info]" (and) {} }
task "Monitor [weather]" (and) {
task_ref "Access [maps, terrain and weather conditions and routes]" (and) {}
task_ref "Provide [location sensitive info]" (and) {} }
task "Monitor [terrain conditions]" (and) {
task_ref "Access [maps, terrain and weather conditions and routes]" (and) {}
task_ref "Provide [location sensitive info]" (and) {} }
task "Monitor [criminal activity]" (and) {
task_ref "Access [maps, terrain and weather conditions and routes]" (and) {}
task_ref "Provide [location sensitive info]" (and) {} }
task_ref "Manage [crisis]" (and) {} }
softgoal "Availability" (and) {
softgoal "Availability [7x7]" (and) {}
softgoal "Time to recover <= 30 sec" (and) {} task "Postpone [maintenance]" (or) {}
task "Interrupt [maintenance]" (or) {} task_ref "Manage [crisis]" (and) {} }
softgoal "Adaptability" (and) {
task "Recommend [alternate resources]" (and) {} task "Monitor changes" (and) {}
task "Recommend [alternate missions]" (and) {} task_ref "Manage [crisis]" (and) {}
}
softgoal "Reliability" (and) {
softgoal "Failure rate <= 0.001%" (and) {} softgoal "Reliability [communication]" (and) { task_ref "Manage [communication]" (and) {} }
}
softgoal "Multi access" (and) {
softgoal "Maximum quantity of crisis = 100" (and) {}
softgoal "Communication, coordination, info access from rescue resources = 20000" (and) {}
softgoal "Maximum quantity of missions = 200/crisis" (and) {} softgoal "Maximum quantity of witness calling = 1000" (and) {} task_ref "Manage [communication]" (and) {}
}
softgoal "Real time" (and) {
softgoal "Time to receive info <= 30s" (and) {}
softgoal "Time of delay to retrieve info <= 500ms" (and) {} softgoal "Time to update info <= 30s" (and) {}
softgoal "Time of delay in communication <= 500ms" (and) {} task_ref "Manage [communication]" (and) {}
}
softgoal "Accuracy" (and) {
softgoal "Accuracy of 99% on [accessing maps, terrain and weather conditions]" (and) {}
softgoal "Provide up to date info to rescue resources" (and) {} softgoal "Accuracy [data record]" (and) {}
softgoal "Deterioration factor on communication <= 0.0001/1000km" (and) {}
task_ref "Manage [communication]" (and) {} }
softgoal "Mobility" (and) {
task "Communicate [location]" (and) {} task "Access [info] on the move" (and) {}
task "Provide [location sensitive info]" (and) {} task_ref "Manage [crisis]" (and) {}
}
correlation (help) {
source: softgoal_ref "Real time"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Multi access"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Deterioration factor on communication <= 0.0001/1000km"
target: softgoal_ref "Reliability [communication]" }
correlation (help) {
source: softgoal_ref "Use [alternate communication channels]" target: softgoal_ref "Reliability [communication]"
}
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Reliability" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Safety"
}
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Availability" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Availability [7x7]" }
correlation (help) {
source: goal_ref "Crisis be resolved" target: softgoal_ref "Accuracy" }
correlation (help) {
source: softgoal_ref "Adaptability" target: softgoal_ref "Safety" }
correlation (help) {
source: goal_ref "Resources be allocated in an effective manner"
target: goal_ref "Crisis information be achieved to allow future analysis"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented"
target: goal_ref "Crisis information be achieved to allow future analysis"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Adaptability"
}
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Mobility"
}
correlation (help) {
source: goal_ref "Abnormal and catastrophic situation be prevented" target: softgoal_ref "Real time"
}
correlation (help) {
source: goal_ref "Communication be orchestrated" target: softgoal_ref "Security"
}
correlation (help) {
source: goal_ref "Communication be orchestrated" target: softgoal_ref "Multi access"
}
correlation (help) {
source: goal_ref "Safety of rescue personnel be provided"
target: goal_ref "Abnormal and catastrophic situation be prevented" }
correlation (help) {
source: goal_ref "Safety of rescue personnel be provided" target: goal_ref "Crisis be resolved"
}
correlation (help) {
source: goal_ref "Resources be allocated in an effective manner" target: goal_ref "Crisis be resolved"
} } };
Apêndice A – Classe IdentificaCT.java
package identificacao; import identificacao.relacionamentos.Relacionamento; import identificacao.relacionamentos.Transversal; import identificacao.relacionamentos.transversal.Advice; import identificacao.relacionamentos.transversal.Operador; import identificacao.relacionamentos.transversal.Operando; import identificacao.relacionamentos.transversal.Pointcut; import identificacao.tipos.TiposDeAdvice; import identificacao.tipos.TiposDeElemento; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer;public class IdentificaCT {
private int qtdElementos=0, qntPC=0;
private List<GoalModel> elementos = new ArrayList<GoalModel>();
private GoalModel matrizAdj[][];
private List<GoalModel> elementosCT = new ArrayList<GoalModel>(); public List<GoalModel> getElementosCT() {
return elementosCT; }
private int qntMinRel = 2;
private AspectOrientedModel model;
public IdentificaCT(AspectOrientedModel model, int qnt) { super();
this.setQntMinRel(qnt); this.setModel(model);
this.qntElementos(model.getGoal().getElementos());
this.matrizAdj = new Elemento[qtdElementos][qtdElementos]; }
public int getQtdElementos() { return qtdElementos;
}
public void setQtdElementos(int qtdElementos) { this.qtdElementos = qtdElementos;
}
public int getQntMinRel() { return qntMinRel;
}
public void setQntMinRel(int qntMinRel) { this.qntMinRel = qntMinRel;
}
public AspectOrientedModel getModel() { return model;
}
public void setModel(AspectOrientedModel model) { this.model = model;
}
public void mostraMatriz() { System.out.print(" ");
for (int i=0; i<qtdElementos; i++){ if (i<10) System.out.print(i+ " "); else System.out.print(i+ " "); }
for(int i=0; i<qtdElementos; i++){ if (i<10)
System.out.print("\n"+(i)+" " ); else
System.out.print("\n"+(i)+" " ); for (int j=0; j<qtdElementos; j++){ if(matrizAdj[i][j] != null) System.out.print(" X "); else System.out.print(" "); } } System.out.println(""); }
public void qntElementos (List<Elemento> lista){ for (int i=0; i<lista.size(); i++){
if(!lista.get(i).getTipo().equals(TiposDeElemento.GOAL_REF) && !lista.get(i).getTipo().equals(TiposDeElemento.SOFTGOAL_REF) && !lista.get(i).getTipo().equals(TiposDeElemento.TASK_REF)){ qtdElementos++; elementos.add(lista.get(i)); } if (!lista.get(i).getElementos().isEmpty()) qntElementos(lista.get(i).getElementos()); } }
public void montaMatriz(){
for (int i=0; i<elementos.size(); i++){
for (int j=0; j<elementos.get(i).getElementos().size(); j++){ int indice = buscaIndice(elementos.get(i).getElementos().get(j)); matrizAdj[indice][i] = elementos.get(i).getElementos().get(j); }
} }
public int buscaIndice (GoalModel elemento){ for (int i=0; i<elementos.size(); i++){
if(elementos.get(i).getName().equalsIgnoreCase(elemento.getName())) return i;
}
return -1; }
public void identificaCT(){
int pais = 0;
for (int j=0; j<qtdElementos; j++){ if(matrizAdj[i][j] != null){ pais++; } if(pais >= qntMinRel){ elementosCT.add(elementos.get(i)); break; } } } }
public void montarRelacionamentoCT(){ for (int i=0; i<elementosCT.size(); i++){
String source = procurarSource(elementosCT.get(i)); boolean jaExisteRT = false;
for (int j=0; j<model.getGoal().getRelacionamentos().size(); j++){ if(model.getGoal().getRelacionamentos().get(j) instanceof identificacao.relacionamentos.Transversal){ if (model.getGoal().getRelacionamentos().get(j).getOrigem().equals(source )){ jaExisteRT = true;
Pointcut pc = new Pointcut(); pc.setId("PC"+qntPC);
for (int l=0; l<qtdElementos; l++){ if
(elementos.get(l).getCaminho().toString().equals(elementosCT.get(i).ge tCaminho().toString())){
for (int k=0; k<qtdElementos; k++){ boolean entra = true;
if(matrizAdj[l][k] != null){
entra =
(elementos.get(k)).getCaminho().toString().equalsIgnoreCase(source); if (entra==false){
Operando op = new Operando(); if (!pc.getOperandos().isEmpty()){ Operador operador = new Operador(); op.setOperator(operador);
}
int indice = buscaIndice(elementos.get(k)); op.setJoinpointPointcut((elementos.get(indice)).getCaminho().toString ()); pc.setOperandos(op); } } } } } int idpointcut = procurarOperandos(((Transversal)model.getGoal().getRelacionamentos().g et(j)), pc);
List<String> jpAdvice = new ArrayList<String>();
jpAdvice.add(elementosCT.get(i).getCaminho().toString());
if (idpointcut!=-1){
for (int p=0;p<((Transversal)
model.getGoal().getRelacionamentos().get(j)).getAdvices().size(); p++){
if((((Transversal)model.getGoal().getRelacionamentos().get(j)).getAdv ices().get(p).getPointcut().equals(((Transversal)model.getGoal().getRe lacionamentos().get(j)).getPointcuts().get(idpointcut).getId()))){ ((Transversal)model.getGoal().getRelacionamentos().get(j)).getAdvices ().get(p).setJoinpointAdvice(jpAdvice); } } } else{
Advice advice = new Advice();
advice.setTipo(TiposDeAdvice.AROUND); advice.setPointcut(pc.getId()); advice.setJoinpointAdvice(jpAdvice); ((Transversal)model.getGoal().getRelacionamentos().get(j)).setPointcu ts(pc); ((Transversal)model.getGoal().getRelacionamentos().get(j)).setAdvices (advice); qntPC++; } } } } if (!jaExisteRT){
Relacionamento relCT = new Transversal(); ((Transversal)relCT).setOrigem(source); Pointcut pc = new Pointcut();
pc.setId("PC"+qntPC);
for (int j=0; j<qtdElementos; j++){ if
(elementos.get(j).getCaminho().toString().equals(elementosCT.get(i).ge tCaminho().toString())){
for (int k=0; k<qtdElementos; k++){ boolean entra = true;
if(matrizAdj[j][k] != null){
entra =
(elementos.get(k)).getCaminho().toString().equalsIgnoreCase(source); if (entra==false){
Operando op = new Operando(); if (!pc.getOperandos().isEmpty()){ Operador operador = new Operador(); op.setOperator(operador);
}
int indice = buscaIndice(elementos.get(k)); op.setJoinpointPointcut((elementos.get(indice)).getCaminho().toString ()); pc.setOperandos(op); } } } } }
int idpointcut = procurarOperandos((Transversal)relCT, pc);
List<String> jpAdvice = new ArrayList<String>();
jpAdvice.add(elementosCT.get(i).getCaminho().toString()); if (idpointcut!=-1){
if(((Transversal)relCT).getAdvices().get(p).getPointcut().equals(((Tr ansversal)relCT).getPointcuts().get(idpointcut).getId())){ ((Transversal)relCT).getAdvices().get(p).setJoinpointAdvice(jpAdvice) ; } } } else{
Advice advice = new Advice();
advice.setTipo(TiposDeAdvice.AROUND); advice.setJoinpointAdvice(jpAdvice); advice.setPointcut(pc.getId()); ((Transversal)relCT).setPointcuts(pc); ((Transversal)relCT).setAdvices(advice); qntPC++; } model.getGoal().setRelacionamentos(relCT); } } }
public String procurarSource (GoalModel elementoCT){
StringTokenizer st = new
StringTokenizer(elementoCT.getCaminho().toString(), "/"); int qnt = st.countTokens();
List<String> lista = new ArrayList<String>(); for(int i=0; i<qnt; i++){
lista.add(st.nextToken()); } String source = "//"+lista.get(0).toString()+"/"+lista.get(1).toString(); return source; }
public int procurarOperandos (Transversal relacionamento, Pointcut pc){
boolean achou = true;
for (int i=0; i<relacionamento.getPointcuts().size(); i++){
if(relacionamento.getPointcuts().get(i).getOperandos().size() == pc.getOperandos().size()){ for (int j=0; j<relacionamento.getPointcuts().get(i).getOperandos().size(); j++){ if(relacionamento.getPointcuts().get(i).getOperandos().get(j).getJoin pointPointcut().toString().equals(pc.getOperandos().get(j).getJoinpoin tPointcut().toString())) achou = true; else { achou = false; } } } if(achou==true) return i; } return -1; }
public boolean verificaFilhos (GoalModel elemento,GoalModel elementoCT){
if (elemento.getElementos().get(i).equals(elementoCT)) return true; else if (!elemento.getElementos().get(i).getElementos().isEmpty()) verificaFilhos(elemento.getElementos().get(i), elementoCT); } return false; }
public int buscaElemento (Elemento e){ for (int i=0; i<elementos.size(); i++){
if (elementos.get(i).getName().equalsIgnoreCase(e.getName())) return i; } return -1; } }
Apêndice B – Especificação ESP3
aspect_oriented_model {
goal_model "Crisis Management System" {
goal "Crisis be resolved" (and) { task "Manage [crisis]" (and) { task "Identify [crisis]" (and) {
task "Capture [witness report]" (and) { task "Record [Witness Info]" (and) {}
task "Record [location] and [type of crisis]" (and) { task "Display [Video]" (and) {}
task "Request [video feed] from Surveillance system" (and) {} }
task "Validate [Witness Info]" (and) {}
task "Decide if assign [emergency level] to crisis" (and) {} task "Decide if set the [crisis status] to active" (and) {} }
task "Provide [crisis focus checklist]" (and) {} }
task "Manage [Missions]" (and) { task "Create [mission]" (and) {
task "Receive [notification of type of mission to be created]" (and) {} task "Suggest notify the national crisis center" (or) {}
task "Suggest crisis specific [missions]" (and) {} task "Suggest replacement missions" (and) {} }
task "Execute [mission]" (and) {
task "Execute [rescue mission]" (or) {
task "Request [Victim medical history] from hospital" (or) {} task "Receive [Victim medical history]" (or) {}
task "Suggest to bring the victim to appropriated hospital" (and) {} task "Inform FirstAidWorker of history is relevant to his injury" (and) {}
task "Record [injury info of victim]" (and) {} task "Register [victim identity]" (and) {}
task "Receive [notification of dropped off the victim at hospital" (and) {}
task_ref "Receive [notification of completed mission]" (and) {} }
task "Execute [SuperObserver mission]" (and) {
task "Record special features of the aid or vehicle to mission" (and) {}
}
task "Execute [helicopter transport mission]" (or) {} task "Execute [remove obstacle mission]" (or) {} }
task "Monitor [mission]" (and) {
task "Inform of [relevant changes to mission]" (and) { task_ref "Recommend [alternate resources]" (and) {} }
task "Receive [notification of departure from mission site]" (and) {} task "Receive [final mission report]" (and) {}
task "Receive [notification of arrival at mission site]" (and) {} task "Receive updating on the [mission status]" (and) {}
task "Receive [notification of completed mission]" (and) {} task_ref "Monitor [weather]" (and) {}
task_ref "Monitor [criminal activity]" (and) {}
task_ref "Determinate [safe operating distances and perimeter]" (and) {}
} }
task "Manage [resource]" (and) {
task "Manage [external resource]" (and) { task "Request mission to ERP" (and) {} }
task "Manage [internal resource]" (and) { task "Assign [internal resource]" (and) { task "Select [employee]" (and) {}
task "Receive confirmation of acceptance mission" (and) {} task "Inform [mission info]" (and) {
task "Request the employee to login" (and) {} }
}
task "Update availability of employee" (and) {} }
}
task "Manage [access]" (and) { task "Authenticate [user]" (and) { task "Request [login info]" (and) {} task "Validate [login info]" (and) {}
task "Block [access] after 3 consecutives failed attempts" (and) {} }
}
task "Manage [communication]" (and) {} }
goal "Abnormal and catastrophic situation be prevented" (and) {} goal "Resources be allocated in an effective manner" (and) {} goal "Communication be orchestrated" (and) {}