Skip to content

bug in integer comparison translation #8

@m-carrasco

Description

@m-carrasco

Hi

The following snippet shows a wrong behavior in advance-pta and cci-version

class Test{

        int i;
        public void Test()
        {
            Contract.Assume(i != 0);
        }
}

           $r0 = this;   //Backend.ThreeAddressCode.Instructions.LoadInstruction 
           $r1 = $r0.i;   //Backend.ThreeAddressCode.Instructions.LoadInstruction 
           $r2 = 0;   //Backend.ThreeAddressCode.Instructions.LoadInstruction 
           $r3 = $r1 > $r2;   //Backend.ThreeAddressCode.Instructions.BinaryInstruction 
           System.Diagnostics.Contracts.Contract::Assume($r3);   

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions