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

Missing varialbe and parameter types from C functions inside M3 Model #80

Open
matteasu opened this issue Jan 4, 2024 · 2 comments
Open

Comments

@matteasu
Copy link

matteasu commented Jan 4, 2024

Setup:

  • Rascal 0.35.0-RC1
  • Clair 0.12.0
  • Ubuntu 22.10 aarch64
  • OpenJDK 17.0.7

Given a simple C program, such as:

#include <stdio.h>

int main(int argc, char argv[]){
    int a=0;
    printf("Hello world!");
    return 0;
}

Similar to issue #69, but this time, it regards the type of variables that may be defined inside a program

"declaredType": [
        [
            "c+variable:///main(int,char.*)/a",
            "any"
        ],
]
"declaredType": [
        [
            "cpp+variable:///main(int,char.*)/a",
            {
                "modifiers": [],
                "baseType": "int"
            }
        ],
]
@jurgenvinju
Copy link
Member

Thanks for the report! Are you analyzing this in TS or JS? I would suggest using the pattern matching features of Rascal, and then export the analysis result to JSON.

I'll try and fix this issue on Monday. Please keep reporting, this is very helpful!

@matteasu
Copy link
Author

matteasu commented Jan 7, 2024

Are you analyzing this in TS or JS?

I export the JSON from Rascal and then process it using Python

I'll try and fix this issue on Monday. Please keep reporting, this is very helpful!

Thanks!

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

2 participants