clair icon indicating copy to clipboard operation
clair copied to clipboard

Missing varialbe and parameter types from C functions inside M3 Model

Open matteasu opened this issue 2 years ago • 2 comments

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"
            }
        ],
]

matteasu avatar Jan 04 '24 11:01 matteasu

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!

jurgenvinju avatar Jan 06 '24 11:01 jurgenvinju

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!

matteasu avatar Jan 07 '24 09:01 matteasu