Giter Site home page Giter Site logo

sarl / sarl Goto Github PK

View Code? Open in Web Editor NEW
134.0 14.0 45.0 86.69 MB

SARL Agent-Oriented Programming Language http://www.sarl.io

License: Apache License 2.0

Java 93.87% GAP 5.70% Shell 0.05% TeX 0.04% JavaScript 0.01% CSS 0.04% HTML 0.01% Python 0.19% Perl 0.07% Vim Script 0.02% PowerShell 0.01%
agent agent-based-modeling programming-language framework ide xtext java dsl agents agent-teamwork agent-based linux macox windows

sarl's People

Contributors

alexandrelombard avatar gallandarakhneorg avatar gb96 avatar jjst avatar klmp200 avatar lomadriel avatar ngaud avatar pinam45 avatar ryuzakikk avatar srodriguez avatar ssardina avatar tpiotrow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sarl's Issues

Other null point exception in filesearch demo

AgentSpawned, agentID:e0c5f429-3470-4adf-a100-d7c47770c904 AgentType: class io.sarl.demos.filesearch.FileSearchAgent
[ID=e7777b8c-89c6-40c7-8aff-537462480f33 - parent e0c5f429-3470-4adf-a100-d7c47770c904] Searching in null file matching .sarl created before Fri Mar 21 18:24:20 CET 2014
mars 21, 2014 6:24:22 PM io.janusproject.kernel.AgentEventBusSubscriberExceptionHandler handleException
Grave: SUBSCRIBER_ERROR
java.lang.NullPointerException
at java.io.File.(File.java:277)
at io.sarl.demos.filesearch.FileSearchAgent._handle_Search_2(FileSearchAgent.java:252)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:332)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

java.lang.NullPointerException
at java.io.File.(File.java:277)
at io.sarl.demos.filesearch.FileSearchAgent._handle_Search_2(FileSearchAgent.java:252)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:332)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Ambiguous meaning of "Source" in the documentation

When opening the SARL documentation on www.sarl.io, we can see the "Spec" and "Source" tabs.

The meaning of "Source" may be ambiguous because the visitor may consider that it contains the source code of the tutorial example. She/he may be disappointed to obtain the code of the documentation specification (e.g. oral comment by @gbasso).

Is it possible to change the skin of the SARL documentation to avoid this problem?

It is difficult to create a project from scratch

It is very difficult to create a project from scratch from the given guidelines on the SARL website.

The following things are missed:

  • The source folder must be created by hand (src/main/sarl and src/main/generated-sources/xtend)
  • The output folder of the generated sources must be set by hand (in the Eclipse properties).

Problem of inheritance in events

With :

event AgentSpawned {
    var agentID :UUID
}

event MyAgentSpawned extends AgentSpawned { // no highlighted error 
    var titi : UUID
}

In agent :

agent MyAgent {
    on MyAgentSpawned {
        occurrence.titi // okay
        occurrence.agentID // error, not found
    }
}

Also, the following code is generated :

public class CreatorAgentSpawned extends Event {

Out of memory with the Linux Eclipse product

When launching the Eclipse product for Linux x64, I obtain "OutOfMemoryError", and Eclipse does not start.

When installed Eclipse for Java Developer and SARL from the update site, Eclipse is started fine.

Is println a keyword or a provided function?

According to my understanding of the language semantic, a function should be provided by an import or a capacity when it is not a keyword.

But, if I take a look on the FileSearch demo, the "println" function seems to not be provided by an import (as "format") nor a capacity (as "wake").

Assuming there is no "hidden" import, if we decide that this function is always available, it may be a keyword.

At the end, is it a problem of syntax highlighting?

Problem of inheritance in capacities

I define two capacities, which have an inheritance link:

capacity AbctractEnvironmentCapacity {
    def getBodyFactory : AgentBodyFactory
}

capacity Environment3D extends AbctractEnvironmentCapacity {
    def spawnBody(body : AgentBody<Influence3D,Perception3D>)
}

Then, I define an agent that should be able to interact with the environment through the capacity Environment3D:

agent Carpooler {
    uses Environment3D
    on Initialize {
        var factory = bodyFactory
    }
}

The functions bodyFactory and getBodyFactory are not found (compilation error).

When I move the definition of getBodyFactory from AbctractEnvironmentCapacity into Environment3D, the compilation error is disappearing.

The construction of a skill is not clear

In the constructor of a skill, the agent owner must be given as a parameter. Otherwise an error occurs in the java code.

This information is not given and this obligation is quite weird. Could it be done in the setSkill function ?
The ownership is not set at the creation time but at the association time (when the setSkill function is called)

Exception in map when running the FileSearch with full internal event listening

mars 21, 2014 6:24:21 PM io.janusproject.kernel.BehaviorsAndInnerContextSkill$AgentEventListener receiveEvent
Avertissement: Un événement a été ignoré durant la destruction de l'agent : MemberLeft[source = Address [agentId=9e5862e6-1a81-4612-9a03-34b9fff746e3, spaceId=SpaceID [id=b99718be-ca8c-42b5-bd80-017ea994cc44, contextID=4940b9e4-9d79-4a4b-9c57-3fa812ec148c, spaceSpec=interface io.sarl.lang.core.EventSpaceSpecification]]agentID = 9e5862e6-1a81-4612-9a03-34b9fff746e3]
mars 21, 2014 6:24:21 PM io.janusproject.kernel.EventSpaceImpl emit
Grave: null
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:1016)
at java.util.Collections$SetFromMap.contains(Collections.java:3901)
at io.sarl.util.AddressScope.matches(AddressScope.java:55)
at io.sarl.util.AddressScope.matches(AddressScope.java:33)
at io.janusproject.kernel.EventSpaceImpl.doEmit(EventSpaceImpl.java:142)
at io.janusproject.kernel.EventSpaceImpl.emit(EventSpaceImpl.java:126)
at io.sarl.demos.filesearch.FileSearchAgent._handle_Search_2(FileSearchAgent.java:300)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:332)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:1016)
at java.util.Collections$SetFromMap.contains(Collections.java:3901)
at io.sarl.util.AddressScope.matches(AddressScope.java:55)
at io.sarl.util.AddressScope.matches(AddressScope.java:33)
at io.janusproject.kernel.EventSpaceImpl.doEmit(EventSpaceImpl.java:142)
at io.janusproject.kernel.EventSpaceImpl.emit(EventSpaceImpl.java:126)
at io.sarl.demos.filesearch.FileSearchAgent._handle_Search_2(FileSearchAgent.java:300)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:332)
at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Deploy the features on a web server

Because the use of Maven for installing SARL may be a drawback for a part of the users, it should be restrict to the developers of SARL.
For the other users, we should deploy the Eclipse features on a web browser as soon as possible.

Pb at agent initialization after killing the application

Sometimes after a crash or a hard kill of the application, we have an Hazelcast connection problem that prevents the initialization from finishing and block the execution before agent initialize

mars 21, 2014 6:10:10 PM com.hazelcast.partition.PartitionService
Infos: [10.20.2.144]:5701 [dev] Re-partitioning cluster data... Migration queue size: 135
mars 21, 2014 6:10:12 PM com.hazelcast.partition.PartitionService
Infos: [10.20.2.144]:5701 [dev] All migration tasks has been completed, queues are empty.
mars 21, 2014 6:10:33 PM com.hazelcast.nio.TcpIpConnection
Infos: [10.20.2.144]:5701 [dev] Connection [Address[10.20.2.144]:5702] lost. Reason: java.io.EOFException[Remote socket closed!]
mars 21, 2014 6:10:33 PM com.hazelcast.nio.ReadHandler
Avertissement: [10.20.2.144]:5701 [dev] hz._hzInstance_1_dev.IO.thread-in-0 Closing socket to endpoint Address[10.20.2.144]:5702, Cause:java.io.EOFException: Remote socket closed!
mars 21, 2014 6:10:34 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Connecting to /10.20.2.144:5702, timeout: 0, bind-any: true
mars 21, 2014 6:10:34 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Could not connect to: /10.20.2.144:5702. Reason: SocketException[Connexion refusée to address /10.20.2.144:5702]
mars 21, 2014 6:10:35 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Connecting to /10.20.2.144:5702, timeout: 0, bind-any: true
mars 21, 2014 6:10:35 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Could not connect to: /10.20.2.144:5702. Reason: SocketException[Connexion refusée to address /10.20.2.144:5702]
mars 21, 2014 6:10:36 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Connecting to /10.20.2.144:5702, timeout: 0, bind-any: true
mars 21, 2014 6:10:36 PM com.hazelcast.nio.SocketConnector
Infos: [10.20.2.144]:5701 [dev] Could not connect to: /10.20.2.144:5702. Reason: SocketException[Connexion refusée to address /10.20.2.144:5702]
mars 21, 2014 6:10:36 PM com.hazelcast.nio.ConnectionMonitor
Avertissement: [10.20.2.144]:5701 [dev] Removing connection to endpoint Address[10.20.2.144]:5702 Cause => java.net.SocketException {Connexion refusée to address /10.20.2.144:5702}, Error-Count: 5
mars 21, 2014 6:10:36 PM com.hazelcast.cluster.ClusterService
Infos: [10.20.2.144]:5701 [dev] Removing Member [10.20.2.144]:5702
mars 21, 2014 6:10:36 PM com.hazelcast.cluster.ClusterService
Infos: [10.20.2.144]:5701 [dev]

Members [1] {
Member [10.20.2.144]:5701 this
}

mars 21, 2014 6:10:36 PM com.hazelcast.partition.PartitionService
Infos: [10.20.2.144]:5701 [dev] Partition balance is ok, no need to re-partition cluster data...

Trace errors in SARL files.

Some errors occur in generated java code and do not appear in SARL code. I think that the highlight of such errors is really important in a SARL code.

e.g.:

capacity ComputeEnergyCapacity {

    def getEnergy : Double
}

skill FuelCellSkill implements ComputeEnergyCapacity {
}

In java:

The type FuelCellSkill must implement the inherited abstract method ComputeEnergyCapacity.getEnergy()

Limitation with setSkill() function in Agent class

I want to create a generic agent which choose its skill from an external data (e.g. an enum):

setSkill(MyOwnCapacity, SkillFactory.createSkill(data) )

The createSkill function is defined as follow:

public static Skill createSkill(DataEnum data) {
        Skill res = null;
        switch (data) {
        case CASE1:
            res = (Skill) new MyOwnSkill1();
            break;
        case CASE2:
            res = (Skill) new MyOwnSkill2();
            break;
        default:
            break;
        }
        return res;
}

To be full comprehensive I also give the definition of the skills and capacity:

capacity MyOwnCapacity {
    def myFunc : Double
}

skill MyOwnSkill1 implements MyOwnCapacity {
    def myFunc : Double {
        return 0d
    }
}

skill MyOwnSkill2 implements MyOwnCapacity {
    def myFunc : Double {
        return 1d
    }
}

How can I be as generic as I want ?
The generic of the setSkill function: <S extends Skill & Capacity> could be a limitation for this.

The kernel does not stop

When launching the HelloAgent demo, the kernel does not stop.

Lancement de l'agent : fr.utbm.set.demo.HelloAgent
mars 11, 2014 5:55:31 PM com.hazelcast.instance.DefaultAddressPicker
Infos: Prefer IPv4 stack is true.
mars 11, 2014 5:55:31 PM com.hazelcast.instance.DefaultAddressPicker
Infos: Picked Address[10.85.0.179]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
mars 11, 2014 5:55:31 PM com.hazelcast.system
Infos: [10.85.0.179]:5701 [dev] Hazelcast Community Edition 3.1.5 (20140115) starting at Address[10.85.0.179]:5701
mars 11, 2014 5:55:31 PM com.hazelcast.system
Infos: [10.85.0.179]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com
mars 11, 2014 5:55:31 PM com.hazelcast.instance.Node
Infos: [10.85.0.179]:5701 [dev] Creating MulticastJoiner
mars 11, 2014 5:55:31 PM com.hazelcast.core.LifecycleService
Infos: [10.85.0.179]:5701 [dev] Address[10.85.0.179]:5701 is STARTING
mars 11, 2014 5:55:41 PM com.hazelcast.cluster.MulticastJoiner
Infos: [10.85.0.179]:5701 [dev] 


Members [1] {
    Member [10.85.0.179]:5701 this
}

mars 11, 2014 5:55:41 PM com.hazelcast.core.LifecycleService
Infos: [10.85.0.179]:5701 [dev] Address[10.85.0.179]:5701 is STARTED
mars 11, 2014 5:55:42 PM com.hazelcast.partition.PartitionService
Infos: [10.85.0.179]:5701 [dev] Initializing cluster partition table first arrangement...
mars 11, 2014 5:55:42 PM io.janusproject.repository.KernelRepositoryService$NetworkListener starting
Infos: Démarrage de Hazelcast
mars 11, 2014 5:55:42 PM io.janusproject.repository.KernelRepositoryService$NetworkListener running
Infos: Début de l'initialisation d'Hazelcast
mars 11, 2014 5:55:42 PM io.janusproject.repository.KernelRepositoryService$NetworkListener running
Infos: Fin de l'initialisation d'Hazelcast
Hello World!
Goodbye World!
mars 11, 2014 5:55:44 PM io.janusproject.kernel.SpawnService killAgent
Grave: Requête d'arrêt du noyau
mars 11, 2014 5:55:44 PM io.janusproject.kernel.Kernel stop
Infos: Arrêt des services du noyau

When launching a second instance of the demo the following log appears in the console of the first instance, just after the previous logs :

mars 11, 2014 5:56:01 PM com.hazelcast.nio.SocketAcceptor
Infos: [10.85.0.179]:5701 [dev] Accepting socket connection from /10.85.0.179:42955
mars 11, 2014 5:56:01 PM com.hazelcast.nio.TcpIpConnectionManager
Infos: [10.85.0.179]:5701 [dev] 5701 accepted socket connection from /10.85.0.179:42955
mars 11, 2014 5:56:07 PM com.hazelcast.cluster.ClusterService
Infos: [10.85.0.179]:5701 [dev] 

Members [2] {
    Member [10.85.0.179]:5701 this
    Member [10.85.0.179]:5702
}

mars 11, 2014 5:56:07 PM com.hazelcast.partition.PartitionService
Infos: [10.85.0.179]:5701 [dev] Re-partitioning cluster data... Migration queue size: 135
mars 11, 2014 5:56:08 PM com.hazelcast.partition.PartitionService
Infos: [10.85.0.179]:5701 [dev] All migration tasks has been completed, queues are empty.
mars 11, 2014 5:56:16 PM com.hazelcast.nio.TcpIpConnection
Infos: [10.85.0.179]:5701 [dev] Connection [Address[10.85.0.179]:5702] lost. Reason: Socket explicitly closed
mars 11, 2014 5:56:16 PM com.hazelcast.cluster.ClusterService
Infos: [10.85.0.179]:5701 [dev] Removing Member [10.85.0.179]:5702
mars 11, 2014 5:56:16 PM com.hazelcast.partition.PartitionService
Infos: [10.85.0.179]:5701 [dev] Partition balance is ok, no need to re-partition cluster data... 
mars 11, 2014 5:56:16 PM com.hazelcast.cluster.ClusterService
Infos: [10.85.0.179]:5701 [dev] 

Members [1] {
    Member [10.85.0.179]:5701 this
}

This bug is reproducible every launch.

Problem of inheritance in agents

This is the same problem as events and capacities, but I din't see it for agents.

With:

agent MyAgent1
{}

agent MyAgent2 extends MyAgent1 // no error
{}

The following Java code is generated:

public class MyAgent2 extends Agent {

Event and Scope may be serializable

To enable to emit the events and the scopes other a network without a complex/costly library such as Gson, the classes io.sarl.lang.core.Event and io.sarl.lang.core.Scope may be serializable.

Semantic of the const keyword

Is the semantic of the keyword "const" coming from the "const" in C++, "const" or "immutable" in D, "const" or "readonly" in C#, or "final" in Java?

The code from the "counting" demo indicates that the semantic of "const" is the same as the semantic of "final" in Java:

const AtomicInteger count = new AtomicInteger
...
count.incrementAndGet 

It may be confusing for developers because "const" means "read only" for most of them.

Moreover, it seems correct to write with the current semantic:

const BigInteger abc = new BigInteger(4)
abc.add(6)

I think it is in contradiction with the use of "const" in the other programming languages. The following "equivalent" code is not working with these languages:

const int abc = 4;
abc = abc + 4;

Enable injection in SARL

Do we enable the access to the inject (IoC in general) in SARL. The final goal consist in enabling that agents configuration could be customized in function of the deployment environment. According to the environment the injected class will be customized.

Could have inject dependent from the architecture: linux, windows, android, etc.

Make public the current implementations of Spaces

Currently, the API provides three implementation classes for spaces: SpaceBase, EventSpaceImpl, and OpenEventSpaceImpl.

To code a new space implementation, it is currently mandatory to copy/paste the content of these classes in the new class. Indeed, the three classes have a "package" access right.

I suggest to make public these classes to enable third-party developer to code their space implementations based on the existing ones. In this way, they could inherit the networking behavior for example.

When set the value of a 'val' ?

The following code highlight an error (Assignment to final field) :

agent TransmitterAgent {
    val capacityValue : Double

    on Initialize {
        capacityValue = occurrence.parameters.get(0) as Double;
    }
}

Moreover an error occurs in the java code.

public class TransmitterAgent extends Agent {
  /**
   * Creates a new Agent of type TransmitterAgent
   */
  public TransmitterAgent(final java.util.UUID parentID) { // error
// Multiple markers at this line
//  - The blank final field capacityValue may not have been initialized

Space specification is platform-dependent

Currently, the implementation of space specification and the related space seem to be platform-dependent.

It may be helpful to create new space specifications in SARL and linking them to the platform through the injection mechanism (see #26).

Syntax Inconsistency?

When trying to create an agent with the following code, I obtain a compilation error.

event Titi {
}

agent HelloAgent {
    uses Lifecycle, Schedules, DefaultContextInteractions

    on Initialize {
        System.out.println("Hello World!") emit(new Titi)
    }

    on Titi {
        spawn(HelloAgent, #[])
        HelloAgent.spawn(#[])
        spawn(HelloAgent)
        HelloAgent.spawn()
    }

    /* Print "Goodbye World" before dying */
    on Destroy {
        System.out.println("Goodbye World!")
    }
}

The two first lines with the "spawn" statements are correctly compiled.
The third line with the "spawn" statement gives the error:

Multiple markers at this line
- Type mismatch: cannot convert implicit first argument from
   HelloAgent to Class<? extends Agent>
- Type mismatch: cannot convert from Class<HelloAgent> to Object[]

The fourth line with the "spawn" statement gives the error:

Invalid number of arguments. The method spawn(Class<? extends
   Agent>, Object[]) is not applicable for the arguments (Class<HelloAgent>)

Add information in AgentSpawned event

e,g it could be interessting to have the "type" (the equivalent of class in oo) of the agent spawned :

event AgentSpawned {
    var agentID : UUID
    var agentType : Type
}

This could be used like this :

agent ObserverAgent {
    uses Lifecycle, DefaultContextInteractions

    on AgentSpawned [occurrence.agentType.equals(MyType1)]{
    }


    on AgentSpawned [occurrence.agentType.equals(MyType2)]{
    }
}

<!---
@huboard:{"order":8.0,"custom_state":""}
-->

Problem with Double initialisation

In an agent:

agent ConsumerAgent {

    var internalTime : Double = 0 // normal error: Type mismatch: cannot convert from int to Double
    var internalTime : Double = 0. // error at next line: no viable alternative at input 'var'
    var internalTime : Double = 0d // no error

}

SpaceBase may be public

Currently, the class SpaceBase is defined with a "package access".
It may be helpful to define this class as public for enabling easier third-party space implementations.

Auto-completion does not work in some cases

I want to auto-complete the "Default" in the following code to obtain "DefaultContextInteractions". But the auto-completion mechanism does not work.

agent A {
  use DefaultContext
}

In the following code, the auto-completion works correctly, and the "DefaultContextInteractions" is added into the imports.

agent A {
    on Initialize {
        DefaultContext
    }
}

Pre- and Post- conditions management in functions: a syntax proposal

This is a proposal for the syntax related to functions definition and their associated pre- and post- conditions

def push(s: String, i: Integer) : String
with
pre: not Is_Empty(S), i>0;
post: not Is_Empty(push);
{
//function body
push = myString;
}

<!---
@huboard:{"custom_state":"","order":2.607262565755528e-54,"milestone_order":76.98460230969204}
-->

Tutorials should not force to use Maven.

On the website, the sentence "Once you have installed SARL SDK in eclipse you can create a new Maven project and reuse the pom found on the demos." makes my contacts confused because they are not really aware how Maven is working.

We should propose tutorials for both Maven users and non Maven users.

Operators ++ cannot be used in SARL

When using nbValues++ or ++nbValues an error occurs:

for ++nbValues:

Invalid number of arguments. The method operator_plus(Object,
   String) is not applicable for the arguments (Integer)

for nbValues++:

The method +() is undefined

Are events received in the same order than sending ?

If I write a code that looks like this :

emit(e1) /* type Event1 */
emit(e2) /* type Event2 */
emit(e3) /* type Event1 */

Can I assume that the fonctions will be called in this order ?

on Event1(e1)
on Event2(e2)
on Event1(e3)

How to update the website?

After committed a change in the module "io.sarl.docs.suite", how can I publish the changes on the web server sarl.io? May I use an automatic process, or copy the result of the Maven compilation into the repository sarl.github.io?

Syntax improvement to read the parameters of an event

The current syntax permits to retrieve the values of the event's parameters:

on Initialize {
        myPath = e.parameters.get(0) as String
...
}

To be easier for reading and coding, we could introduce some "suggar" syntax that is equivalent to the previous code:

on Initialize(myPath : String) {
...
}

Deprecation Policy

The features (classes, functions and attributes) that are pushed on the main stream (master on Github) should not be removed until the next major version. Until the next major version, the feature should be deprecated.
This policy is inspirated from the Janus v1 developer guidelines.

Are you agree to use this policy in Sarl also?

Incomplete installation guide

The installation guide is missing important information:

  • The xtext plugins must be manually installed. The SARL plugins, which depends on, does not permit to install xtext by transitivity.
  • The xtend plugins must be manually installed. And the correct version must be specified because the Eclipse market does not provide the correct one.

To obtain a working Eclipse, I installed the following by hand:

  • Xtext SDK 2.5.3
  • Xtend 2.0.0M5
  • Xtend UI 2.0.0M5
  • Xtend M2 extension 2.5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.