, size self suspect 22 self numsuspect > 0.0 23 ifTrue : [ self active false. 24 self jailterm := Cormas random < self maxjailterm. 25 moveTo: Cormas selectRandomlyFrom: self suspect.] aLocation max?one?of (patch?set (patch?set patch?here ) neighbors with

, move?to one?of patches with

, 83 let numtargets count targets 84 if numtargets >= 1 85 [move?to one?of targets] 86 end 87 to reducejailterm 88 if jailterm > 1.0 89 [set jailterm jailterm ? 1.0] 90 end 91 ;; COPS BEHAVIOR 92 to enforce 93 let activeagents (agents?on neighbors) with [active] 94 let numactive count activeagents 95 if numactive >= 1 [ 96 ;; arrest suspect 97 let suspect one?of activeagents 98 ask suspect [ 99 set active false 100 set jailterm random [maxjailterm] of myself 101 ] 102 move?to suspect ;; move to patch of the jailed agent 103 ] 104 end 105 to movecops 106 let targets neighbors with [ not any? cops?here and all ? agents?here

C. Template, 3-Breed, patch and turtles declaration 1 [comment encoding = UTF-8 /] 2 [module generateTurtlesAndBreed('/org.cirad.dsl.behavior. metamodel/model/metamodel

, toLower()-> asSet().concat(' ')/][initEnt.attributes. generateArithimeticExpressions().toLower()->asSet(). concat, generateTurtlesOwn(aModel : Model) ] 10 [for (initEnt : Entity | aModel.eAllContents(InitEntity). entity->asSet(, p.16

C. Template, 7-Transformation of Equation Behaviors into Netlogo procedures 1

C. Template, 8-Transformation of Acvitity Behaviors into Netlogo procedures 1

C. Template, 9-Netlogo code generation into primitive activities 1 [template public generateAddNode(anAddNode : Add) post ( replaceAll

, toLower()/] [anAddNode.toAttribute. generateArithimeticExpressions().toString().toLower()/][anAddNode.expression.generateArithimeticExpressions(). public generateRemoveNode(aRemoveNode : Remove) post (replaceAll

C. Appendix, M2T Acceleo templates 5 set [aRemoveNode.from.generateArithimeticExpressions(). toLower(

, trim())] 18 hatch-[aReproduceNode.ancestors(Entity).name.toLower()/]s [ aReproduceNode.offspring_quantity. generateArithimeticExpressions()/]['['/] move-to [ aReproduceNode.initial_location. generateFunctionCallExpressions()/] 19 set [aReproduceNode.declaredattributes.oclAsType( FunctionCallExpression).arguments->at(1). generateArithimeticExpressions().toLower()/]([ aReproduceNode.declaredattributes.oclAsType( FunctionCallExpression).arguments->at(2). generateArithimeticExpressions(

C. Template, 10-Mapping Acvitity Diagram Behaviors into Netlogo procedures 1

C. Template, 11-The go procedure 1 [template public generateToGo(aModel:Model) ] 2 to go 3 [for (aPatch : Entity | aModel.eAllContents(InitSpace). entity)] 4 ask patches

, for (aNode : Node | aModel.mainBehavior.eAllContents(Node)->asSequence())] 16 [if (aNode.oclIsTypeOf(DeclaredBehavior) and not anInitEntity.eAllContents(Behavior)->indexOf(aNode. oclAsType(DeclaredBehavior).behavior).oclIsUndefined(, p.17

, 7 self stepEntities: self the[initSpace.initFunctionCall. oclAsType(FunctionCallExpression).arguments->first(). generateArithimeticExpressions().toUpperFirst()/]s. 8 [/for] 9 [for (initEntity : InitEntity | model.eContents(InitEntity)->asSet())] 10 self askRandom: [initEntity.initFunctionCall.oclAsType( FunctionCallExpression).arguments->first(). generateArithimeticExpressions(

C. Template, 17-Methods code generation for the probes protocol 1 [template public generateProbesMainClass(model : Model)] 2 <methods> 3 <class-id>CormasNS.Models

, /]s size</body> 7 [/for] 8 [for (initSpace : InitSpace | model.eAllContents(InitSpace)->asSet(

, <class-id>CormasNS.Models

/. Generatedprotocol&lt;,

D. F. Andersen, Group Model Building: Problem Structing, Policy Simulation and Decision Support, The Journal of the Operational Research Society, vol.58, issue.5, pp.691-694, 2007.

J. Anderson, A simple theory of complex cognition, American Psychologist, vol.51, pp.355-365, 1996.
DOI : 10.1037/0003-066x.51.4.355

J. Anderson, The Architecture of Cognition, 1983.
URL : https://hal.archives-ouvertes.fr/hal-00699788

. Andova, . Suzana, G. Mark, . Van-den, L. Brand et al., Reusable and correct endogenous model transformations, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol.7307, pp.72-88, 2012.
DOI : 10.1007/978-3-642-30476-7_5

S. Aubert and J. Müller, Incorporating institutions, norms and territories in a generic model to simulate the management of renewable resources, Artificial Intelligence and Law, vol.21, pp.47-78, 2013.

S. Aubert, J. Müller, and J. Ralihalizara, MIRANA: a socio-ecological model for assessing sustainability of community-based regulations, International Congress on Environmental Modelling and Software, p.9, 2010.
URL : https://hal.archives-ouvertes.fr/cirad-00843486

S. Bandini, S. Manzoni, and G. Vizzari, Agent Based Modeling and Simulation : An Informatics Perspective". en, Journal of Artificial Societies and Social Simulation, vol.12, p.4, 2009.

P. J. Barendrecht, Modeling transformations using QVT Operational Mappings, p.47, 2010.

O. Barreteau, F. Bousquet, and J. Attonaty, Role-playing games for opening the black box of multi-agent systems: method and lessons of its application to Senegal River, 2000.

D. Benjamin, P. Paul, N. Plaza, and . York, ADAPT : A Cognitive Architecture for Robotics An Implementation of ADAPT, Forum American Bar Association, pp.337-338, 2001.

S. Beydeda, M. Book, and V. Gruhn, Model-driven software development, pp.1-464, 2005.

A. F. Blackwell, Introduction: Thinking with diagrams, en. In: Artificial Intelligence Review, vol.15, pp.1-3, 2001.
DOI : 10.1007/978-94-017-3524-7_1

P. Bommel and F. Dieguez, One more step towards participatory modeling: Involving local stakeholders in designing scientific models for participative foresight studies, Proceedings of the 2011 European Social Simulation Association Conference, pp.19-23, 2011.

P. Bommel and F. Dieguez, A further step towards participatory modelling. fostering stakeholder involvement in designing models by using executable UML, JASSS 17, vol.1, p.6, 2014.

A. Borshchev, Multi-Method Simulation Modeling using AnyLogic This presentation, 2007.
DOI : 10.1002/9781118762745.ch12

F. Bousquet, Cormas : Common-Pool Resources and Multiagent Systems, Tasks and Methods in Applied Artificial Intelligence 1416.December, pp.826-837, 1998.
DOI : 10.1007/3-540-64574-8_469

M. Brambilla, J. Cabot, and M. Wimmer, Model-Driven Software Engineering in Practice, p.182, 2012.
DOI : 10.2200/s00441ed1v01y201208swe001

URL : https://hal.archives-ouvertes.fr/hal-00755006

J. Cabot, Model-based Engineering vs Model-Driven Engineering, 2009.

H. Cardwell, S. Langsdale, and K. Stephenson, The Shared Vision Planning Primer : How to incorporate, pp.11-38, 2009.

M. Challenger, On the use of a domain-specific modeling language in the development of multiagent systems, In: Engineering Applications of Artificial Intelligence, vol.28, pp.111-141, 2014.

T. Chu and . Quang, Towards a methodology for the participatory design of agent-based models, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 7057 LNAI, pp.428-442, 2012.
URL : https://hal.archives-ouvertes.fr/hal-00592312

D. Aquino and P. , The Role Playing Games in an ABM participatory modeling process: outcomes from five different experiments carried out in the last five years, Integrated Assessment and Decision Support,1st Biennial Meeting of the International Environmental Modelling and Software Society, pp.275-280, 2002.

Y. Demazeau and J. Müller, Decentralized A.I. : proceedings of the First European Workshop on Modelling Autonomous Agents in a Multi-Agent World, 1989.
URL : https://hal.archives-ouvertes.fr/emse-00680361

S. Demirkol, A DSL for the development of software agents working within a semantic web environment, Computer Science and Information Systems 10.4 SPEC.ISSUE, pp.1525-1556, 2013.

V. F. Dent, Intelligent agent concepts in the modern library, pp.108-125, 2007.

S. Diaw, R. Lbath, and B. Coulette, Etat de l'art sur le développement logiciel basé sur les transformations de modèles, Numéro spécial TSI-Ingénierie Dirigée par les Modèles, vol.29, p.2, 2010.

A. Drogoul, Agent-based modeling for multidisciplinary and participatory approaches to climate change adaptation planning, 2015.
URL : https://hal.archives-ouvertes.fr/hal-01333859

, Eclipse Modeling Project, Eclipse Foundation, 2014.

, Ecore API, 2016.

, Graphical Modeling Framework Tutorial-Part 1, 2016.

S. Elden, The Significance of Territory, Geographica Helvetica, vol.68, pp.65-68, 2013.

J. M. Epstein, Modeling civil violence: an agent-based computational approach, Proceedings of the National Academy of Sciences of the United States of America 99, vol.3, pp.7243-7250, 2002.

M. Etienne, Companion Modelling-A participatory Approach to Support Sustainable Development. en. Editions Quae, pp.1-403, 2014.

. Etienne, D. R. Michel, S. Du-toit, and . Pollard, ARDI: A coconstruction method for participatory modeling in natural resources management, Ecology and Society, vol.16, 2011.

, Model-Driven Engineering and Knowledge representation, European PhD School on Robotic Systems, 2016.

J. Ferber, Multi-agent Systems: An Introduction to Distributed Artificial Intelligence, p.509, 1999.

D. Flater, P. Martin, and M. Crane, Rendering UML Activity Diagrams as Human-Readable Text, pp.207-213, 2009.

M. Fowler, Domain-Specific Languages, vol.5658, p.640, 2010.

S. Franklin and A. Graesser, Is it an Agent, or just a Program?: A Taxonomy for Autonomous Agents, Intelligent agents III agent theories, architectures, and languages, pp.21-35, 1997.

R. Frigg and S. Hartmann, Models in Science, The Stanford Encyclopedia of Philosophy, 2012.

I. Galvão and A. Goknil, Survey of traceability approaches in model-driven engineering, Proceedings-IEEE International Enterprise Distributed Object Computing Workshop, EDOC, pp.313-324, 2007.

V. Gaube, Linking agent-based models with stock and flow models: Impacts of subsidy policy an farmer housholds, land use and nutrient flow at regional level, ConAccount Conference, vol.35, p.2, 2006.

D. Ghosh, DSLs in Action. Manning, pp.1-377, 2010.

F. Gourmelon, Role-playing game developed from a modelling process: A relevant participatory tool for sustainable development? A co-construction experiment in an insular biosphere reserve, Land Use Policy, vol.32, pp.96-107, 2013.
URL : https://hal.archives-ouvertes.fr/hal-00771742

R. C. Gronback, Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit, 2009.

R. Hostler, V. Y. Eric, T. Yoon, and . Guimaraes, Assessing the impact of internet agent on end users' performance, pp.313-323, 2005.

, Information technology Syntactic metalanguage, 1996.

G. Jäger and J. Rogers, Formal language theory: refining the Chomsky hierarchy, Philosophical transactions of the Royal Society of London. Series B, Biological sciences 367.1598, pp.1956-70, 2012.

, Domain-Specific Langauges, 2009.

M. Jarrah, A Multi-Agent Simulation Framework to Support Agent Interactions under Different Domains, pp.211-223, 2015.

F. Jouault, J. Bézivin, and I. Kurtev, TCS: a DSL for the specification of textual concrete syntaxes in model engineering, Proceedings of the 5th international conference on Generative programming and component engineering-GPCE '06, pp.1-6, 2006.

G. Kappel, Model transformation by-example: A survey of the first wave, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 7260 LNCS, pp.197-215, 2012.

S. Kent, Model Driven Engineering, Integrated Formal Methods 2335, vol.2, pp.286-298, 2002.

D. E. Kieras, D. Scott, D. E. Wood, and . Meyer, Predictive engineering models based on the EPIC architecture for a multimodal high-performance human-computer interaction task, ACM Transactions on Computer-Human, pp.230-275, 1997.

A. Kleppe, W. Warmer, and . Bast, The Model Driven Architecture: Practice and Promise, p.170, 2003.

T. Kosar, Comparing general-purpose and domain-specific languages: An empirical study, Computer Science and Information Systems, pp.247-264, 2010.

L. Moigne and J. , La modélisation des systemes complexes, 1990.

O. Mabrouki, Semantic Framework for Managing Privacy Policies in Ambient Intelligence Olfa Mabrouki Semantic Framework For Managing Privacy Policies In Ambient Intelligence, 2015.

S. Maharaj, T. Mccaldin, and A. Kleczkowski, A Participatory Simulation Model for Studying Attitudes to Infection Risk, SCSC '11: Proceedings of the 2011 Summer Computer Simulation Conference, pp.8-13, 2011.

I. S. Mayer, The Gaming of Policy and the Politics of Gaming: A Review, Simulation & Gaming, vol.40, pp.825-862, 2009.

M. D. Mcginnis and E. Ostrom, Social-ecological system framework: Initial changes and continuing challenges, Ecology and Society, vol.19, issue.2, p.30, 2014.

D. Meadows, J. Sterman, and A. King, Fishbanks: A Renewable Resource Management Simulation, 2015.

T. Mens and P. Van-gorp, A taxonomy of model transformation, Electronic Notes in Theoretical Computer Science, vol.152, pp.125-142, 2006.

M. Mernik, J. Heering, and A. M. Sloane, When and how to develop domain-specific languages, ACM Computing Surveys, vol.37, pp.316-344, 2005.
DOI : 10.1145/1118890.1118892

URL : https://ir.cwi.nl/pub/10893/10893D.pdf

F. Michel, Situational programming: Agent behavior visual programming for MABS novices, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol.6532, pp.1-15, 2011.
DOI : 10.1007/978-3-642-18345-4_1

URL : https://hal.archives-ouvertes.fr/hal-01417791

T. M. Michell, Le processus de représentation, un cadre préliminaire pour une approche expérimentale du cas des diagrammes, Journées francophones d'ingénierie des connaissances, pp.73-81, 1997.

A. Newell, Précis of Unified theories of cognition, vol.15, pp.425-492, 1992.

N. J. Nilsson, Artificial Intelligence: A New Synthesis, p.513, 1998.

. Omg, Model Driven Architecrure-Guide revision 2, 2014.

, Meta Object Facility(MOF) Core Specification, 2015.

C. Page and . Le, Participatory agent-based simulation for renewable resource management: The role of the cormas simulation platform to nurture a community of practice, 2012.
URL : https://hal.archives-ouvertes.fr/halshs-01453265

O. Pastor, Model-driven development, Informatik-Spektrum, vol.31, pp.394-407, 2008.
URL : https://hal.archives-ouvertes.fr/hal-01572400

R. Pattis, Chapter 1 EBNF : A Notation to Describe Syntax, pp.1-19, 2013.

J. W. Pepper and B. B. Smuts, The evolution of cooperation in an ecological context: an agent-based mode". In: Dynamics of human and primate societies: agent-based modeling of social and spatial processes, pp.45-76, 2000.

R. Prieto-diaz, Domain Analysis: An Introduction, Software Engineering Notes 15, vol.2, pp.47-54, 1990.

P. Promburom, Participatory Multi-agent Systems Modeling for Collective Watershed Management: The Use of Role Playing Game, pp.Manage- ment, 2002.

K. Ramsey, GIS, modeling, and politics: On the tensions of collaborative decision support, Journal of Environmental Management, vol.90, pp.1972-1980, 2009.

. Renger, G. L. Michiel, G. Kolfschoten, and . Vreede, Challenges in collaborative modelling: a literature review and research agenda, BIBLIOGRAPHY In: International Journal of Simulation and Process Modelling, 2008.
DOI : 10.1504/ijspm.2008.023686

A. Dietz, J. Albani, and . Barjis, Lecture Notes in Business Information Processing, vol.4, p.248

. Rodrigues-da and A. Silva, Model-driven engineering: A survey supported by the unified conceptual model, Computer Languages, Systems and Structures 43, pp.139-155, 2015.

S. Ron, The CLARION cognitive architecture: Extending cognitive modeling to social simulation, Cognition and MultiAgent Interaction, pp.79-99, 2006.

J. Rothenberg, The Nature of Modeling". In: in Artificial Intelligence, Simulation and Modeling, pp.75-92, 1989.

S. Russell and P. Norvig, A modern approach, Artificial Intelligence, vol.25, p.498, 1995.

I. Sacevski and J. Veseli, Introduction to Model Driven Architecture ( MDA ), pp.1-15, 2007.

D. C. Schmidt, Model-driven engineering, Computer 39, vol.2, pp.25-31, 2006.

A. Schürr, Specification of Graph Translators with Triple Graph Grammars, WG 1994, vol.903, pp.151-163, 1994.

B. Selic, The pragmatics of model-driven development, IEEE Software 20.5, pp.19-25, 2003.

, On the Semantic Foundations of Standard UML 2.0". In: Formal Methods for the Design of Real-Time Systems, pp.181-199, 2004.

J. F. Sowa, Cognitive Architectures For Conceptual Structures, Proceedings of the 19th international conference on Conceptual structures for discovering knowledge, pp.35-49, 2011.

T. Stahl, M. Voelter, and K. Czarnecki, Model-Driven Software Development: Technology, Engineering, Management, 2006.

D. Steinberg, EMF: Eclipse Modeling Framework 2.0, p.704, 2009.

J. Tàbara and . David, Participatory Modelling For The Integrated Sustainability Assessment Of Water: the World Cellular Model and the MATISSE Project, Integrated Assessment, pp.1-29, 2007.

P. Taillandier, Traffic simulation with the GAMA platform, International Workshop on Agents in Traffic and Transportation, 2014.
URL : https://hal.archives-ouvertes.fr/hal-01055567

P. Taillandier, GAMA: A simulation platform that integrates geographical information data, agent-based modeling and multi-scale control, Lecture Notes in Computer Science, vol.7057, pp.242-258, 2012.
URL : https://hal.archives-ouvertes.fr/hal-00688318

. Touraille, . Luc, R. C. David, M. K. Hill, and . Traore, Application of Model-Driven Engineering and Metaprogramming to DEVS Modeling & Simulation, p.312, 2012.
URL : https://hal.archives-ouvertes.fr/tel-00914327

A. Van-deursen, P. Klint, and J. Visser, Domain-specific languages, Centrum voor Wiskunde en Informatika 35, vol.6, pp.26-36, 2000.

A. Voinov and F. Bousquet, Modelling with stakeholders, Environmental Modelling and Software 25, vol.11, pp.1268-1281, 2010.

U. Wilensky, NetLogo: Center for Connected Learning and Computer-Based Modeling, 1999.

, NetLogo Rebellion model, 2004.

G. Williams, Adaptation and Natural Selection: A Critique of Some Current Evolutionary Thought, p.307, 1966.

M. Wooldridge, An Introduction to MultiAgent Systems. 2nd, 2009.

M. Wooldridge, P. Jörg, M. Müller, and . Tambe, Agent theories, architectures, and languages: A bibliography, Intelligent Agents II Agent Theories, Architectures, and Languages, vol.890, pp.408-431, 1995.
DOI : 10.1007/3540608052_81

B. P. Zeigler and . Sarjoughian, Introduction to devs modeling and simulation with java: Developing component-based simulation models, Technical Document, 2003.