Import comments to Polyspace Code Prover

20 views (last 30 days)
Hi guys, i have a question, please help me.
Does any way to import comment of analyzed warnings from Csv file or Excel file to Polyspace comments database ?
And how to read file ps_comments.db or how to find the decryption key for this file ?
Thanks for your help.

Accepted Answer

Anirban
Anirban on 10 Mar 2020
Edited: Anirban on 10 Mar 2020
Hi Hong,
I would like to know the full workflow to understand why you cannot assign the comments in the Polyspace user interface itself. It sounds like you are exporting the results to an Excel file, then adding comments and then re-importing the comments back to the results (or perhaps to some other results).
If you want to transfer comments from one Polyspace result set to another, see here: https://www.mathworks.com/help/bugfinder/ug/import-comments-from-previous-polyspace-analysis.html
  2 Comments
Tran Thang
Tran Thang on 16 Mar 2020
Hi Anirban,
Thank you for spending time answering my question.
Yes, you're right. I'd like to edit comments automatically because there are many records then I'd like to note which one is already analyzed or not yet without opening the Polyspace project. I realized that if comments are changed then the content of ps_comments.db file is also updated. So I assumed that comments are stored in that file and I'd like to read it.
I cannot assign the comments in the Polyspace user interface itself because there are many comments and they are different, if I do that, I have to input comments manually a lot and spend too much time.
Is there any way to change comments by using the command line?
Thank you so much for your support.
Anirban
Anirban on 16 Mar 2020
Edited: Anirban on 16 Mar 2020
Hi Hong,
We do not offer a way to access ps_comments.db directly. This is intentional, because we want the user to at least look at a result before justifying it through comments.
However, in the Polyspace UI, you can mass-select many results and add the same comment to them.
But I want to understand your workflow better. You want to write a script that adds comments to a bunch of results. In that script, how will you decide what type of results? Is it always specific types of results that you want to comment on? Maybe you do not want to review those results at all? In the UI, you can create a review scope so that specific types of results are never shown. See here: https://www.mathworks.com/help/bugfinder/ug/filter-results.html
If your intention is to comment on results so that you see only new results in the next run (the ones that are uncommented), there are easier ways to do this. Actually, there is no work required on your part. Just use the 'New' filter in the UI (details here: https://www.mathworks.com/help/bugfinder/ug/filter-results.html). If you really want a command-line workflow, there are ways to do that too:
In either case, the end-product is something that you do not open in the Polyspace UI (a CSV file or a MATLAB table). Nothing is written back to the Polyspace results. The only way we support writing back to the Polyspace results is through the UI.
But the bottomline is: if you just want to see new results compared to a previous analysis, the product gives you this info. You do not need to add comments and then display uncommented results later to see what’s new.
If you want to see only unreviewed results (results that might have been in the previous analysis but never got reviewed), that is the only case where you need the comments workflow you are suggesting. Here, you would comment a result to indicate that someone has looked at it. For this workflow, it is preferable that you open the results in the UI and add your comments the first time (by mass-selecting results or whatever). Then you can keep importing those comments to the next analysis (both from the UI and command line). So, for each result, it is a one-time effort. For details, see here: https://www.mathworks.com/help/bugfinder/ug/import-comments-from-previous-polyspace-analysis.html
You can also contact MathWorks Technical Support: https://www.mathworks.com/support/contact_us.html. I am only giving generic information about workflows. Technical Support can try to understand your intentions better and support you with the features that are already present in your version of the product.

Sign in to comment.

More Answers (0)

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!