plast-lab / cclyzer-souffle

CClyzer port to souffle lang
MIT License
18 stars 8 forks source link

Understanding Callgraph Output/Doing Callgraph Analysis #12

Open JamesShaker opened 3 years ago

JamesShaker commented 3 years ago

Hello!

I have run cclyzer with the default context-insensitive analysis on:

#include "stdio.h"

void a() {
    printf("Hello world!");
}

int main (int argc, char* argv[]) {
    a();
    return 0;
}

I am interested in the callgraph so I thought the callgraph_edge relation would be what I needed given its declaration:

.decl callgraph_edge(?calleeCtx: Context, ?callee: FunctionDecl, ?callerCtx: Context, ?callerInstr: Instruction)

However when I look at callgraph_edge.csv I get the following results:

<<empty-context>>   </host/hello.bc>:a  <<empty-context>>   <<empty-context>>
<<empty-context>>   </host/hello.bc>:printf <<empty-context>>   <<empty-context>>

The first, second, and third columns are as I would have expected however in the fourth I was hoping for the caller instruction rather than another context. What am I doing wrong?

Thanks, James

ktrianta commented 3 years ago

Hello James!

This is the current output due to a context-sensitivity related bug, so you are not doing something wrong. We will be fixing this in a overhaul of context-sensitivity in the following days. I will update the issue as soon as we have a fix.

Thank you

JamesShaker commented 3 years ago

Great! Cheers @ktrianta! :)

JamesShaker commented 2 years ago

Hey @ktrianta, just wondering if there is any update on when cclyzer might be back up and running?

ktrianta commented 2 years ago

Hello James, I am sorry but I don't have a complete fix yet. I will try to close the issue in the next 1 or 2 weeks. Thank you for your patience!

JamesShaker commented 2 years ago

No worries, not a problem at all! 🙂

On 5 Aug 2021, at 3:58 pm, Konstantinos Triantafyllou @.***> wrote:

 Hello James, I am sorry but I don't have a complete fix yet. I will try to close the issue in the next 1 or 2 weeks. Thank you for your patience!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

JamesShaker commented 2 years ago

Hello! Sorry to bother you again! Is there any updated timeline on when this repo might be working again? Also do you have any suggested previous commits in which the repo was in a working state?

ktrianta commented 2 years ago

Hello, we will have a fix available by tomorrow most probably!

ktrianta commented 2 years ago

@JamesShaker I have pushed a fix! I am not closing this issue yet. In case you encounter any trouble please write here!