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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6828bb58accfa664 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-10 20:43:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail From: Caffeine Junky Subject: Re: Conditional types? Newsgroups: comp.lang.ada References: User-Agent: Pan/0.11.3 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "tmoran" Message-ID: NNTP-Posting-Host: 12.241.145.39 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1036989780 12.241.145.39 (Mon, 11 Nov 2002 04:43:00 GMT) NNTP-Posting-Date: Mon, 11 Nov 2002 04:43:00 GMT Organization: AT&T Broadband Date: Mon, 11 Nov 2002 04:43:00 GMT Xref: archiver1.google.com comp.lang.ada:30696 Date: 2002-11-11T04:43:00+00:00 List-Id: On Sun, 10 Nov 2002 16:35:31 -0500, tmoran wrote: >> the system you can safely assume it's passing either a float, an >> integer, or an unsigned 32 bit integer. Is there a way do this in Ada >> ... > There is clearly no way to do this in Ada or any other language. A > given set of 32 bits could be a representation of any of the above. If, > however, you know things like "if it's an integer, its between -100 .. > 100" or "if it's a float it's > +1.0E7" then you can rule out certain > possibilities, and hopefully be left with exactly one remaining > possibility. If you know "this is either a table of integers, most of > which are small in absolute value, or it's a table of floats, with many > non-zero bits to the right of the point", then you can make a > probabilistic guess based on Bayes Theorem. Are you trying to decrypt an > undocumented old tape or something? Old tapes was one of the possible uses I considered for this type of thing, but general data recovery is what I'm looking into. I realize that there are tons of tools already available in this area, but I havent found one that deals with this specific type of situation. I'm researching Bayes Theorem as you suggested. One possible solution I'm considering is generating/fetching a set of known data that hasnt been destroyed/corrupted from the same system, or a set of data from an identical system, and using the instruction set of the damaged system(most likely from the CPU) and a comparison algorithm of some sort to generate a second set or sets and comparing the two to get the most probable interpretation of the bits left in memory. Needless to say that Boolean Algebra book is coming in very handy. Heh. Of course there are other "variables" that could(and probably will) come into play, such as the BIOS/ROM/Program Loader that the system is using, chips embedded into the various storage peripherals(Hard Drive controllers and such) and all the other wonderful hurdles that I'll doubtlessly stumble upon. Why would I be writing this type of software? I really have no crying need for it(at the moment), but I find it to be an intellectually stimulating challenge and quite a useful tool for others if I can hammer out the details. And that's the catch. ;-) I've been considering using Forth for this particular project, but I'm also curious to see what I can accomplish with Ada in this regard. Any pointers would be helpful. Thanks. Chris Caffiene Junky