bug params of Enviromnent

View: New views
3 Messages — Rating Filter:   Alert me  

bug params of Enviromnent

by Marcos Côrtes :: Rate this Message:

| View Threaded | Show Only this Message

Hi, I think I found a bug.

I tried create a enviromnent with params:
[code]
MAS taskalloc {
   infrastructure: Centralised

   environment: br.uff.ic.taskalloc.Organization(outFile("out.xml"), taskCount(500), visionCost(0.8), visionRep(0.2))
   agents:
       rational #5;

   aslSourcePath: "src/main/asl"; 
}
[/code]

in method init of Organization I parse "outFile", "taskCount", etc... with Literal.parseLiteral.

But the Eclipse plugin and when I run the aplication, this throw the exception: 

jason.mas2j.parser.ParseException: Encountered "." at line 10, column 98.
Was expecting one of:
    "," ...
    ")" ...
    
at jason.mas2j.parser.mas2j.generateParseException(mas2j.java:743)
at jason.mas2j.parser.mas2j.jj_consume_token(mas2j.java:679)
at jason.mas2j.parser.mas2j.classDef(mas2j.java:297)
at jason.mas2j.parser.mas2j.parameter(mas2j.java:312)
at jason.mas2j.parser.mas2j.classDef(mas2j.java:289)
at jason.mas2j.parser.mas2j.environment(mas2j.java:459)
at jason.mas2j.parser.mas2j.mas(mas2j.java:74)
at jason.infra.centralised.RunCentralisedMAS.init(RunCentralisedMAS.java:160)
at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:97)

Exception in thread "main" java.lang.NullPointerException
at jason.infra.centralised.RunCentralisedMAS.createEnvironment(RunCentralisedMAS.java:353)
at jason.infra.centralised.RunCentralisedMAS.create(RunCentralisedMAS.java:200)
at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:98)


It is not serious, but I think it help the develop to use the Envrionment params.

Thanks.
--
Ass: Marcos Côrtes
Mestrando Computação - UFF

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Jason-users mailing list
Jason-users@...
https://lists.sourceforge.net/lists/listinfo/jason-users

Re: bug params of Enviromnent

by Jomi Fred Hubner-4 :: Rate this Message:

| View Threaded | Show Only this Message

Hi Marcos,

we realised only now that the mas2j parser does not consider real numbers! (It is really strange that no one has reported this problem before)

it is fixed in the subversion and will be available in the next release of Jason.

as an workaround, you can "wrap" the number as a string:
        ... visionCost("0.8")....

HTH,

Jomi

On 22/09/2011, at 12:16, Marcos Côrtes wrote:

> Hi, I think I found a bug.
>
> I tried create a enviromnent with params:
> [code]
> MAS taskalloc {
>    infrastructure: Centralised
>
>    environment: br.uff.ic.taskalloc.Organization(outFile("out.xml"), taskCount(500), visionCost(0.8), visionRep(0.2))
>    agents:
>        rational #5;
>
>    aslSourcePath: "src/main/asl";
> }
> [/code]
>
> in method init of Organization I parse "outFile", "taskCount", etc... with Literal.parseLiteral.
>
> But the Eclipse plugin and when I run the aplication, this throw the exception:
>
> jason.mas2j.parser.ParseException: Encountered "." at line 10, column 98.
> Was expecting one of:
>     "," ...
>     ")" ...
>    
> at jason.mas2j.parser.mas2j.generateParseException(mas2j.java:743)
> at jason.mas2j.parser.mas2j.jj_consume_token(mas2j.java:679)
> at jason.mas2j.parser.mas2j.classDef(mas2j.java:297)
> at jason.mas2j.parser.mas2j.parameter(mas2j.java:312)
> at jason.mas2j.parser.mas2j.classDef(mas2j.java:289)
> at jason.mas2j.parser.mas2j.environment(mas2j.java:459)
> at jason.mas2j.parser.mas2j.mas(mas2j.java:74)
> at jason.infra.centralised.RunCentralisedMAS.init(RunCentralisedMAS.java:160)
> at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:97)
>
> Exception in thread "main" java.lang.NullPointerException
> at jason.infra.centralised.RunCentralisedMAS.createEnvironment(RunCentralisedMAS.java:353)
> at jason.infra.centralised.RunCentralisedMAS.create(RunCentralisedMAS.java:200)
> at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:98)
>
>
> It is not serious, but I think it help the develop to use the Envrionment params.
>
> Thanks.
> --
> Ass: Marcos Côrtes
> Mestrando Computação - UFF
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1_______________________________________________
> Jason-users mailing list
> Jason-users@...
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Jason-users mailing list
Jason-users@...
https://lists.sourceforge.net/lists/listinfo/jason-users

Re: bug params of Enviromnent

by Marcos Côrtes :: Rate this Message:

| View Threaded | Show Only this Message

Hum. I happy to help we found it :)

I will use the "wrap" method.

bye...

2011/9/22 Jomi Fred Hubner <jomi@...>
Hi Marcos,

we realised only now that the mas2j parser does not consider real numbers! (It is really strange that no one has reported this problem before)

it is fixed in the subversion and will be available in the next release of Jason.

as an workaround, you can "wrap" the number as a string:
       ... visionCost("0.8")....

HTH,

Jomi

On 22/09/2011, at 12:16, Marcos Côrtes wrote:

> Hi, I think I found a bug.
>
> I tried create a enviromnent with params:
> [code]
> MAS taskalloc {
>    infrastructure: Centralised
>
>    environment: br.uff.ic.taskalloc.Organization(outFile("out.xml"), taskCount(500), visionCost(0.8), visionRep(0.2))
>    agents:
>        rational #5;
>
>    aslSourcePath: "src/main/asl";
> }
> [/code]
>
> in method init of Organization I parse "outFile", "taskCount", etc... with Literal.parseLiteral.
>
> But the Eclipse plugin and when I run the aplication, this throw the exception:
>
> jason.mas2j.parser.ParseException: Encountered "." at line 10, column 98.
> Was expecting one of:
>     "," ...
>     ")" ...
>
>       at jason.mas2j.parser.mas2j.generateParseException(mas2j.java:743)
>       at jason.mas2j.parser.mas2j.jj_consume_token(mas2j.java:679)
>       at jason.mas2j.parser.mas2j.classDef(mas2j.java:297)
>       at jason.mas2j.parser.mas2j.parameter(mas2j.java:312)
>       at jason.mas2j.parser.mas2j.classDef(mas2j.java:289)
>       at jason.mas2j.parser.mas2j.environment(mas2j.java:459)
>       at jason.mas2j.parser.mas2j.mas(mas2j.java:74)
>       at jason.infra.centralised.RunCentralisedMAS.init(RunCentralisedMAS.java:160)
>       at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:97)
>
> Exception in thread "main" java.lang.NullPointerException
>       at jason.infra.centralised.RunCentralisedMAS.createEnvironment(RunCentralisedMAS.java:353)
>       at jason.infra.centralised.RunCentralisedMAS.create(RunCentralisedMAS.java:200)
>       at jason.infra.centralised.RunCentralisedMAS.main(RunCentralisedMAS.java:98)
>
>
> It is not serious, but I think it help the develop to use the Envrionment params.
>
> Thanks.
> --
> Ass: Marcos Côrtes
> Mestrando Computação - UFF
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1_______________________________________________
> Jason-users mailing list
> Jason-users@...
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi




--
Ass: Marcos Côrtes
Mestrando Computação - UFF

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Jason-users mailing list
Jason-users@...
https://lists.sourceforge.net/lists/listinfo/jason-users