From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a05:6214:922:: with SMTP id dk2mr1376569qvb.87.1591663173031; Mon, 08 Jun 2020 17:39:33 -0700 (PDT) X-Received: by 2002:a9d:22aa:: with SMTP id y39mr19093659ota.76.1591663172757; Mon, 08 Jun 2020 17:39:32 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 8 Jun 2020 17:39:32 -0700 (PDT) In-Reply-To: <968e2a27-e3a4-4199-97c2-5ad0a2e4facdo@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=38.132.120.110; posting-account=Vahg2AoAAAA9l6fZ2tukpIK6QgjG8f76 NNTP-Posting-Host: 38.132.120.110 References: <968e2a27-e3a4-4199-97c2-5ad0a2e4facdo@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: CONSTRAINT ERROR: erroneous memory access - SOLVED From: John Cupak Injection-Date: Tue, 09 Jun 2020 00:39:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:59015 Date: 2020-06-08T17:39:32-07:00 List-Id: First of all, I'd like to thank all the nice Ada Experts who responded to m= y post. After moving the instantiation of SP after the declaration of the subtype V= ertex is Natural range 0..Vertices-1, the procedure worked. I removed the D= irected_Edge, as I embedded the code as Display procedures.=20 The tinyEWD.txt data file was taken from Sedwick's Algorithms, and when use= d to run the main program, the results did NOT correspond the output in Sed= wick'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 /=3D Source loop = is missing. When I inserted the statement, recompiled, and ran the main pro= gram, the output matched Sedwick's. Again, many thanks to all suggestions.