Re: [eclipse-clp-users] OutOfProcessEclipse Error

From: Christian Wirth <tyrion_at_...215...>
Date: Wed, 23 Jun 2010 14:23:50 +0200
A code snippet is difficult, the prolog source is very complex. I added 
something, but i don't think it will provide any help.
The computation does not take long (less then a second) and the problem 
gets thrown after several of those calcs. It's thrown by the eclipse rpc 
call, hence it should arise during computation.
Is it maybe possible to log the error ?
Additionally, i just tried it on some other machines, and the error gets 
thrown earlier if less RAM is available (but below physical limit) ...

best regards

The calling java code:
            eclipse.rpc("use_module(gorgon_player)");
            CompoundTerm query = new 
CompoundTermImpl("determine",state,lastMoveList,player,null);
            result = eclipse.rpc(query);
            eclipse.rpc("use_module(prolog_reasoner)");

The called predicate (the main part,determine itself is more less a 
findall over matchMoveTree):
It matches a list of edge data to tranverse a tree.

matchMoveTree(Player,Move,[],State,Tree,Effect) :- 
Tree=node{edge:Edges,dat:Data},
                                                                        
         (Data==[]->
                                                                        
                            Effect=[[],[unknown]];
                                                                        
                            matchMove(Player,Move,State,Data,Effect)).
matchMoveTree(Player,Move,[Current|Rest],State,Tree,Effect) :- 
Tree=node{edge:Edges,dat:Data},
                                                                        
                             match(Current,Candidate,Edges,NextNode),
                                                                        
                             
matchMoveTree(Player,Move,Rest,State,NextNode,Effect).

match(Current,Candidate,Edges,NextNode) :- 
member(edge{move:Candidate,node:NextNode},Edges),
                                                                       
(Candidate==[]->
                                                                        
                            (!,false);
                                                                        
                            Current=Candidate).

Wit Jakuczun schrieb:
>
>
> 2010/6/22 Christian Wirth <tyrion_at_...215... 
> <mailto:tyrion_at_...215...>>
>
>     I started now using OutOfProcessEclipse to run multiple,
>     idenpendent eclipse instances.But i get an error when running
>     complex games:
>
>  
>
>     java.net.SocketException: Connection reset
>
>     The error gets thrown when calling a predicate that get's called
>     alot .. also before the error. So it seems somewhat runtime
>     dependent. I already tried increasing the stack sizes, but that
>     didn't help. The RAM usage is a bit higher then expected but still
>     far below my physical limit.
>
>     What could be the reason for this connection reset ? Or is there a
>     way to get the reason from eclipse for the reset ?
>
> How long does computation takes? The connection can be reset after 
> some timeout... When do you experience this exception: during 
> computation? If you could provide us with a code snippet it could be 
> more helpful.
>  
> Best regards
> -- 
> [ Wit Jakuczun  http://www.linkedin.com/in/jakuczunwit  ]
>
>
>      
>
Received on Wed Jun 23 2010 - 12:25:55 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST