-
Notifications
You must be signed in to change notification settings - Fork 0
Home
JaCa-Android is a framework based on the JaCaMo platform that allows for designing and programming Android mobile apps using cognitive agents based on the BDI architecture and the Agents & Artifacts (A&A) environment conceptual model.
In the simplest case, a mobile app in JaCa-Android is programmed as a single standalone Jason BDI agent equipped with all the tools (artifacts) necessary for functioning as a user assistant, including artifacts for the UI, for modeling and accessing the user context, the device context, as well as to exploit the mobile environment facilities and services (based on Android in this case).
After having included the JaCa-Android library into your project (see README.md), consider following steps in order to use JaCa-Android.
NOTE: In the following description we assume you have already created a standard android project with an application module called
app
-
Add a res folder called
resources
(ensure that such folder is created at the same level of the standard androidres
folder. Create into this folder a sub folder with the same name you want to give to your MAS (we assumehelloworld
). This folder will be the parent of your MAS configuration (*.mas2j
) and agents' code (*.asl
) -
Create into the folder the MAS2J, e.g. as follows (into
resources/helloworld/project.mas2j
)
MAS helloworld{
infrastructure: Centralised
environment: jaca.CartagoEnvironment("infrastructure")
agents:
main mainAgent agentArchClass jaca.CAgentArch;
aslSourcePath: "helloworld/agents";
}
Note that the MAS name must be the same of the created folder within the resources
one - helloworld
in this case. Moreover the path must be specified for aslSourcePath
is the path within the MAS dedicated folder where agents' code will be found - in this case resources/helloworld/agents/
- Add the agent (or agents) code (e.g., for the specified
mainAgent
agent intoresources/helloworld/agents/mainAgent.asl
)
!init.
+!init
<- makeArtifact("mainUI", "it.unibo.pslab.jaca_android.helloexample.MainUI",[],MainUI);
focus(MainUI).
+ui_ready [artifact_name(Id,MainUI)]
<- println("MainUI ready.").
2020 - JaCa-Android is a project developed by the research team of Pervasive Lab, research laboratory of the Computer Science and Engineering Department (DISI) at the Alma Mater Studiorum - University of Bologna in Italy, operating in the context of pervasive and complex software systems engineering.