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

How to get the output of Analysis which is without "dump" option? #131

Closed
baoheipojis opened this issue Dec 1, 2024 · 4 comments
Closed

Comments

@baoheipojis
Copy link

📝 Overall Description

Hello, I'm learning to use Tai-e to analyze.
I've tried to run cfg or pta analysis which has a "dump" option, then Tai-e could successfully output to output/ directory.
However, when I was trying to run a live-var or null-pointer analysis, there's nothing output to the output/ directory. I wonder how to get the results of it.
Then I've checked the docs, found there's an argument -kr to keep result, but it doesn't help.
Are there something I'm missing?

🎯 Expected Behavior

I hope there is something output to some file or to stdout.

🐛 Current Behavior

There's no output file in the output/ directory.
only the options.yml, tai-e-plan.yml and tai-e.log(empty file)

🔄 Reproducible Example

When I create a file Main.java like this:

public class Main {
    public static void main(String[] args) {
        String str = null;
        int length = str.length();
    }
}

and move tai-e-all.jar and java-benchmarks to that directory, then run

java -jar tai-e-all-0.2.2.jar -cp "." -m Main -java 8 -a "null-pointer" 

the output will be like:

......
cfg starts ...
cfg finishes, elapsed time: 0.00s
is-null starts ...
is-null finishes, elapsed time: 0.00s
null-pointer starts ...
null-pointer finishes, elapsed time: 0.00s
Tai-e finishes, elapsed time: 2.00s

However, I cannot get the result in my output/ dir. Maybe there should be something in my tai-e.log file, but there are not.

⚙️ Tai-e Arguments

  • id: throw
    options:
    exception: explicit
    algorithm: intra
  • id: cfg
    options:
    exception: explicit
    dump: false
  • id: is-null
    options: {}
  • id: null-pointer
    options: {}

📜 Tai-e Log

There's nothing in my tai-e.log file.

ℹ️ Additional Information

No response

@inmaldrerah
Copy link

(As a user of Tai-e:) The process-result analysis helps dump results of other analyses, e.g. with -a 'process-result=analyses:[null-pointer]'.

@baoheipojis
Copy link
Author

(As a user of Tai-e:) The process-result analysis helps dump results of other analyses, e.g. with -a 'process-result=analyses:[null-pointer]'.

That is exactly what I need, after adding this arguments, as:

java -jar tai-e-all-0.2.2.jar -cp "." -m Main -java 8 -a null-pointer -a "process-result=analyses:[null-pointer];action:dump;action-file:1.txt" 

Tai-e successfully detected the null-pointer in my code, and write the result to file 1.txt. Thank you!
But how about the tai-e.log, when will tai-e write that log?

@inmaldrerah
Copy link

There's nothing in my tai-e.log file.

I think that is a bug in v0.2.2 (and older, maybe) and has been fixed by commit cfd0fb7, which is part of v0.5.1-SNAPSHOT pre-release in Releases.

@baoheipojis
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants