Problem when wrapping .findAll internal function

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem when wrapping .findAll internal function

Francisco Grimaldo Moreno

Hi all,

I am having a problem when trying to wrap the .findAll internal function using
a plan. Maybe it is a bug or I am doing something wrong.

The problem appears when dealing with lists and I have attached a simple
project where it can be clearly seen. In this example:

Why L3 and L4 are generated different?

Thanks for your attention,
Francisco

--
-------------------------------------------
Dr. Francisco Grimaldo Moreno (PhD)
(Id. GnuPG: 0xBAEC75A7)

Departament d'Informàtica
Escola Tècnica Superior d'Enginyeria (ETSE)
Universitat de València
Avda. Vicent Andrés Estellés, s/n
46100 Burjassot-València (SPAIN)

Tel: +34 96 354 44 87 (+34 96 354 45 65)
Fax: +34 96 354 47 68
Email: [hidden email]
Web: http://www.uv.es/grimo
-------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users

findAllWrapper.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem when wrapping .findAll internal function

Jomi Fred Hubner-4
Hi Francisco,

I tried your code and it seems the problem is the value of A2

...
+!start
  <- !findAllWrapper(use(car,Agent),ag(Agent),L);
     .print(L);
         A = use(car,Agent);
         B = ag(Agent);
         !findAllWrapper(A,B,L2);
     .print(L2);
         !findAllWrapper([use(car,Agent)],ag(Agent),L3);
     .print(L3);
         A2 = [use(car,Agent)];
         B2 = ag(Agent);
         !findAllWrapper(A2,B2,L4);
     .print(L4).
....

A2 should be
        A2 = use(car,Agent);
       
and not a list.


Let me know if this is not a solution.

All the best,

Jomi

On 27/06/2010, at 17:16, Francisco Grimaldo Moreno wrote:

>
> Hi all,
>
> I am having a problem when trying to wrap the .findAll internal function using
> a plan. Maybe it is a bug or I am doing something wrong.
>
> The problem appears when dealing with lists and I have attached a simple
> project where it can be clearly seen. In this example:
>
> Why L3 and L4 are generated different?
>
> Thanks for your attention,
> Francisco
>
> --
> -------------------------------------------
> Dr. Francisco Grimaldo Moreno (PhD)
> (Id. GnuPG: 0xBAEC75A7)
>
> Departament d'Informàtica
> Escola Tècnica Superior d'Enginyeria (ETSE)
> Universitat de València
> Avda. Vicent Andrés Estellés, s/n
> 46100 Burjassot-València (SPAIN)
>
> Tel: +34 96 354 44 87 (+34 96 354 45 65)
> Fax: +34 96 354 47 68
> Email: [hidden email]
> Web: http://www.uv.es/grimo
> -------------------------------------------
> <findAllWrapper.zip>------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first_______________________________________________
> Jason-users mailing list
> [hidden email]
> 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


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem when wrapping .findAll internal function

Jomi Fred Hubner-4
BTW, the version with A2=[...] should also work. In this case, it is a bug we are looking for a solution.


On 28/06/2010, at 09:16, Jomi Fred Hubner wrote:

> Hi Francisco,
>
> I tried your code and it seems the problem is the value of A2
>
> ...
> +!start
>  <- !findAllWrapper(use(car,Agent),ag(Agent),L);
>     .print(L);
> A = use(car,Agent);
> B = ag(Agent);
> !findAllWrapper(A,B,L2);
>     .print(L2);
> !findAllWrapper([use(car,Agent)],ag(Agent),L3);
>     .print(L3);
> A2 = [use(car,Agent)];
> B2 = ag(Agent);
> !findAllWrapper(A2,B2,L4);
>     .print(L4).
> ....
>
> A2 should be
> A2 = use(car,Agent);
>
> and not a list.
>
>
> Let me know if this is not a solution.
>
> All the best,
>
> Jomi
>
> On 27/06/2010, at 17:16, Francisco Grimaldo Moreno wrote:
>
>>
>> Hi all,
>>
>> I am having a problem when trying to wrap the .findAll internal function using
>> a plan. Maybe it is a bug or I am doing something wrong.
>>
>> The problem appears when dealing with lists and I have attached a simple
>> project where it can be clearly seen. In this example:
>>
>> Why L3 and L4 are generated different?
>>
>> Thanks for your attention,
>> Francisco
>>
>> --
>> -------------------------------------------
>> Dr. Francisco Grimaldo Moreno (PhD)
>> (Id. GnuPG: 0xBAEC75A7)
>>
>> Departament d'Informàtica
>> Escola Tècnica Superior d'Enginyeria (ETSE)
>> Universitat de València
>> Avda. Vicent Andrés Estellés, s/n
>> 46100 Burjassot-València (SPAIN)
>>
>> Tel: +34 96 354 44 87 (+34 96 354 45 65)
>> Fax: +34 96 354 47 68
>> Email: [hidden email]
>> Web: http://www.uv.es/grimo
>> -------------------------------------------
>> <findAllWrapper.zip>------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first_______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> 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
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> 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


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem when wrapping .findAll internal function

Francisco Grimaldo Moreno
In reply to this post by Jomi Fred Hubner-4

Hi Jomi,

Actually, I would like to generate a list of lists, such as L3.

If I use "A2 = use(car,Agent);" I will obtain L2.

The problem is when generating a list of lists.

Thanks,
Francisco


A Dilluns, 28 de juny de 2010 14:16:53, Jomi Fred Hubner va escriure:

> Hi Francisco,
>
> I tried your code and it seems the problem is the value of A2
>
> ...
> +!start
>   <- !findAllWrapper(use(car,Agent),ag(Agent),L);
>      .print(L);
> A = use(car,Agent);
> B = ag(Agent);
> !findAllWrapper(A,B,L2);
>      .print(L2);
> !findAllWrapper([use(car,Agent)],ag(Agent),L3);
>      .print(L3);
> A2 = [use(car,Agent)];
> B2 = ag(Agent);
> !findAllWrapper(A2,B2,L4);
>      .print(L4).
> ....
>
> A2 should be
> A2 = use(car,Agent);
>
> and not a list.
>
>
> Let me know if this is not a solution.
>
> All the best,
>
> Jomi
>
> On 27/06/2010, at 17:16, Francisco Grimaldo Moreno wrote:
> > Hi all,
> >
> > I am having a problem when trying to wrap the .findAll internal function
> > using a plan. Maybe it is a bug or I am doing something wrong.
> >
> > The problem appears when dealing with lists and I have attached a simple
> > project where it can be clearly seen. In this example:
> >
> > Why L3 and L4 are generated different?
> >
> > Thanks for your attention,
> > Francisco
>

--
-------------------------------------------
Dr. Francisco Grimaldo Moreno (PhD)
(Id. GnuPG: 0xBAEC75A7)

Departament d'Informàtica
Escola Tècnica Superior d'Enginyeria (ETSE)
Universitat de València
Avda. Vicent Andrés Estellés, s/n
46100 Burjassot-València (SPAIN)

Tel: +34 96 354 44 87 (+34 96 354 45 65)
Fax: +34 96 354 47 68
Email: [hidden email]
Web: http://www.uv.es/grimo
-------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users