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

Vale/Dafny does not generate invocation to the callee procedure if callee is defined after the caller function #44

Open
superymk opened this issue Jan 22, 2020 · 0 comments

Comments

@superymk
Copy link

superymk commented Jan 22, 2020

Tested with Vale-0.3.10.

Code:

procedure caller(
    out result:reg
)
    reads
        eax;
    modifies
        ebx; ecx;
{
    callee(eax, ebx);

    MOV(ecx, ebx);
}

procedure callee(
    in bool1:reg,
    out result:reg
)
    reads
        eax;
{
    MOV(result, 1);
}

Expect:

function method{:opaque} va_code_caller(result:va_operand_reg):va_code
{
  va_Block(va_CCons(va_code_callee(va_op_reg_reg(EAX), va_op_reg_reg(EBX)),
    va_CCons(va_code_MOV(va_op_word_reg(ECX), va_op_word_reg(EBX)), va_CNil())))
}

Current:

function method{:opaque} va_code_caller(result:va_operand_reg):va_code
{
  va_Block(va_CCons(va_code_MOV(va_op_word_reg(ECX), va_op_word_reg(EBX)), va_CNil()))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant