The second example illustrates the use of goals in an AgentSpeak(L) program. The ASTRA equivalent is:
01 agent Subby { 02 module Console C; 03 04 initial !init(); 05 06 rule +!init() { 07 !printHello(); 08 } 09 10 rule +!printHello() { 11 C.println("hello world"); 12 } 13 }
Notice that in this example, we use identifier C for the Console module. This is to illustrate that the identifier does not need to match the name of the module.