How to generate identically image file after snapshots

Martin Troielli martin.troielli at gmail.com
Thu Aug 2 18:26:45 UTC 2007


Hi John,

Yes, I think that way we'll show that from different image files the  
extracted "source code" is exactly the same. I hope the certifiers could  
understand this...

Thanks anyway,
Martin

On Wed, 01 Aug 2007 05:15:37 -0300, John M McIntosh  
<johnmci at smalltalkconsulting.com> wrote:

>
> On Jul 31, 2007, at 6:52 AM, Martin Troielli wrote:
>
>> Hi Avi,
>>
>> The main goal is to certify a software development. The certifier must  
>> to check that a set of source files produce a binary output.
>>
>> We give them:
>> 1 - The final image and VM
>> 2 - The Smalltalk source files (fileOuts of our development)
>> 3 - The VM C source files
>> 4 - The base image
>> 5 - A make script that compiles the VM, filesIn the smalltalk source  
>> files on the base image and produces a final images and VM.
>>
>> They need to check that the two images, the one we give (1) and the  
>> generated by our script (5) are the same. They check the differences by  
>> doing a binary diff plus a hash over the files. They only could allow  
>> changes refered to timestamps. They don't know anything about  
>> Smalltalk...
>>
>> Best regards,
>> Martin
>
> 12 years back I had a client like this. Let's see if I remember...
>
> you could try doing
>
> | m |
> m := OrderedCollection new.
> SystemNavigation default allBehaviorsDo: [ :behavior |
> 	behavior selectors do: [ :sel |
> 		decompiled := Decompiler new decompile: sel in: behavior.
> 		m add: decompiled]].
> ^m
>
> where you sort the behaviors by the class name, then sort the selectors  
> and instead of collecting the decompiled value you
> stream the print string out to a stream. This should give you all the  
> source code for the image in a sorted order which you then can
> compare as text files.
>
> Think of it as decompiling the binary to see if the assembly  
> instructions are the same.
>
> What's missing is the globals and class variable values, but you might  
> not need those... ?
>
>
> Perhaps even a file out of all the methods in the image after the build  
> might help?
>
> --
> ======================================================================== 
> ===
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ======================================================================== 
> ===
>
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Squeak-dev mailing list