Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in integer comparison translation #8

Open
m-carrasco opened this issue Jul 5, 2018 · 1 comment
Open

bug in integer comparison translation #8

m-carrasco opened this issue Jul 5, 2018 · 1 comment
Assignees
Labels

Comments

@m-carrasco
Copy link

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);   

@m-carrasco
Copy link
Author

This bug in TinyBCT is quite dangerous because the boogie code will be typed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants