comp.lang.ada
 help / color / mirror / Atom feed
From: John Cupak <jcupak@gmail.com>
Subject: Re: CONSTRAINT ERROR: erroneous memory access - SOLVED
Date: Mon, 8 Jun 2020 17:39:32 -0700 (PDT)
Date: 2020-06-08T17:39:32-07:00	[thread overview]
Message-ID: <af223183-bcff-4b29-b355-f694e2c72091o@googlegroups.com> (raw)
In-Reply-To: <968e2a27-e3a4-4199-97c2-5ad0a2e4facdo@googlegroups.com>

First of all, I'd like to thank all the nice Ada Experts who responded to my post.

After moving the instantiation of SP after the declaration of the subtype Vertex is Natural range 0..Vertices-1, the procedure worked. I removed the Directed_Edge, as I embedded the code as Display procedures. 

The tinyEWD.txt data file was taken from Sedwick's Algorithms, and when used to run the main program, the results did NOT correspond the output in Sedwick's. After a little digging, I discovered an error in the Shortest_Paths.adb package on page 575 of the ARM.

Near the end of the package body, in the Rebuild path from target to source, the Prepend (The_Path, N); statement before the while N /= Source loop is missing. When I inserted the statement, recompiled, and ran the main program, the output matched Sedwick's.

Again, many thanks to all suggestions.

  reply	other threads:[~2020-06-09  0:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-06 23:40 CONSTRAINT ERROR: erroneous memory access jcupak
2020-06-07  8:00 ` Egil H H
2020-06-09  0:39   ` John Cupak [this message]
2020-06-09 10:07     ` CONSTRAINT ERROR: erroneous memory access - SOLVED AdaMagica
2020-06-07  8:51 ` CONSTRAINT ERROR: erroneous memory access Jeffrey R. Carter
2020-06-07 10:20   ` Simon Wright
2020-06-07 14:47     ` Jeffrey R. Carter
2020-06-07 15:53 ` Anh Vo
2020-06-07 16:17   ` Egil H H
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox