info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] How to dereference a VariableTerm by it's name


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] How to dereference a VariableTerm by it's name
Date: Thu, 21 Jul 2011 18:44:20 +0100

Hello,

That isn't a stack overflow error but rather a array index out of bounds
error. GPJ is not based on GNU-Prolog but is an entirely separate
implementation. Modifying the stack size for GPJ is probably done by
modifying the size of the stack used for Java when you start Java.

If you can provide the code and input that caused the error I could take
a look and try and work out why it is being triggered. Unfortunately
InterpretedByteCode is fairly illegible.

Daniel

On Sat, 2011-07-16 at 20:05 +0200, Juan Galán wrote:
> Hello again
> 
> Thank you for your answer. It's exactly what I was looking for. I saved lot 
> of time thanks to this.
> I have another question:
> I get an exception that i guess it is a stack overflow problem. I've tried 
> executing the same prolog program in Swi-Prolog and in GNU-Prolog. In 
> swi-prolog it works properly but in GNU-Prolog I get a stack overflow error. 
> As GPJ is based on GNU-Prolog it seems to be a stack overflow problem. This 
> happens while running a prolog implementation of Dijkstra Algorithm for big 
> graphs.
> 
> My question is if it is possible to modify the stack size in GPJ.
> 
> This is the exception I get:
> 
> java.lang.ArrayIndexOutOfBoundsException: 57620
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:587)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.Predicate_call.staticExecute(Predicate_call.java:144)
>       at 
> gnu.prolog.vm.buildins.allsolutions.Predicate_findall.findall(Predicate_findall.java:77)
>       at 
> gnu.prolog.vm.buildins.allsolutions.Predicate_bagof.execute(Predicate_bagof.java:76)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.Predicate_call.staticExecute(Predicate_call.java:144)
>       at gnu.prolog.vm.Interpreter.execute(Interpreter.java:507)
>       at mentalarithmetic.pruebaCesar.generateQuestion(pruebaCesar.java:110)
>       at mentalarithmetic.pruebaCesar.main(pruebaCesar.java:65)
> gnu.prolog.vm.PrologException: 
> error(system_error,'java.lang.ArrayIndexOutOfBoundsException:\x20\57620')
>       at gnu.prolog.vm.PrologException.getError(PrologException.java:125)
>       at gnu.prolog.vm.PrologException.systemError(PrologException.java:140)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:770)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.Predicate_call.staticExecute(Predicate_call.java:144)
>       at 
> gnu.prolog.vm.buildins.allsolutions.Predicate_findall.findall(Predicate_findall.java:77)
>       at 
> gnu.prolog.vm.buildins.allsolutions.Predicate_bagof.execute(Predicate_bagof.java:76)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:522)
>       at 
> gnu.prolog.vm.interpreter.Predicate_call.staticExecute(Predicate_call.java:144)
>       at gnu.prolog.vm.Interpreter.execute(Interpreter.java:507)
>       at mentalarithmetic.pruebaCesar.generateQuestion(pruebaCesar.java:110)
>       at mentalarithmetic.pruebaCesar.main(pruebaCesar.java:65)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 57620
>       at 
> gnu.prolog.vm.interpreter.InterpretedByteCode.execute(InterpretedByteCode.java:587)
>       ... 13 more
> 
> Thank you
> Juan Galán
> Universidad de Sevilla 
> 
> 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]