Skip to content

Comments

Analyze the package with RcppDeepState#63

Merged
ms609 merged 1 commit intoms609:masterfrom
RcppDeepState:RcppDeepState
Aug 30, 2022
Merged

Analyze the package with RcppDeepState#63
ms609 merged 1 commit intoms609:masterfrom
RcppDeepState:RcppDeepState

Conversation

@FabrizioSandri
Copy link
Contributor

RcppDeepState Analysis

This package contains problems, according to RcppDeepState. The report was generated by RcppDeepState-action in this repository's fork and is accessible here.

@FabrizioSandri
Copy link
Contributor Author

RcppDeepState Report

function name message file line address trace R code
all_quartets 8 bytes in 1 blocks are definitely lost in loss record 7 of 1,293 AllQuartets.cpp:33 No Address Trace found
Test code
testlist <- list(nTips = c(-1034462886L, 130012951L, -1915885210L, -1538685084L, -1705104631L, -1023490640L, -1272709731L, -1200673158L, -964176434L, 1185736148L, 2060335646L, 398558129L, 548322018L, -1400925600L, -1567621542L, -13838907L, -1280666631L, 1450757584L, 1174925149L, -915271959L, 550030284L, 1214066154L, -332708373L, 1461367050L, -1002175718L, -1110316285L, -656776799L, 1282378348L, 945109120L, -1301976417L, -1867543833L, -918818419L, -2131384259L, -963428194L, 1839284409L, 298460489L, 543017426L, -1020038829L, -470008916L, 925645495L, 568521959L, 1966442210L, -691627033L))
result <- do.call(Quartet:::all_quartets, testlist)
tqdist_OneToManyQuartetAgreementChar 62 bytes in 1 blocks are possibly lost in loss record 24 of 1,307 NewickParser.cpp:77 No Address Trace found
Test code
testlist <- list(tree = c(NA, "uxrvwcycbzpjndhsrhbx", NA, "bxancqcmncsbqunzxvdy", "xznvtbir", NA, "", "whuzntssyhhjwh", "qrykbefxwnqcmfulbmzq", "lbnu", "gwsmtlogwrf", "", "qxpibgflblxeppmqiqum", "kljvsbzllaywqlwquets", "evkiazrttskmbfrqomis", NA, "osiwjhxdvlbuvgpdv", "rihbxigzoxjodgkznddm", NA, "cdtcwzfhoqvvmwdktsjv", "seyfnbdbbqsdsyqmugjk", NA, "isgbkhaerzraurxzztfn", "zanoxtjidozbchwqhvaz", "bugwxhnhowjqanwvwqvo", NA, NA, "oiedwjpdskyhyspbymdu", NA, "llwsiiacud", "hxehpf", NA, NA, "efjgmdrwlvpztsmxht", "mpjyuzstmucaaithqjuv", "thqujeonwbwnfyawlkma", NA, "ggmaszxzqshphbboctpv", "usdevabdwbic", "eaerhepugn", NA, "ibbkjoecdahbmxgckxj"), trees = c("tafittgehdoumeohnyhr", "knrcfmytenlyfsfgukzu", "whrxkhjabyplglpszqcv", NA, NA))
result <- do.call(Quartet:::tqdist_OneToManyQuartetAgreementChar, testlist)
tqdist_QuartetAgreementChar 62 bytes in 1 blocks are possibly lost in loss record 24 of 1,307 NewickParser.cpp:77 No Address Trace found
Test code
testlist <- list(string1 = c(NA, "uxrvwcycbzpjndhsrhbx", NA, "bxancqcmncsbqunzxvdy", "xznvtbir", NA, "", "whuzntssyhhjwh", "qrykbefxwnqcmfulbmzq", "lbnu", "gwsmtlogwrf", "", "qxpibgflblxeppmqiqum", "kljvsbzllaywqlwquets", "evkiazrttskmbfrqomis", NA, "osiwjhxdvlbuvgpdv", "rihbxigzoxjodgkznddm", NA, "cdtcwzfhoqvvmwdktsjv", "seyfnbdbbqsdsyqmugjk", NA, "isgbkhaerzraurxzztfn", "zanoxtjidozbchwqhvaz", "bugwxhnhowjqanwvwqvo", NA, NA, "oiedwjpdskyhyspbymdu", NA, "llwsiiacud", "hxehpf", NA, NA, "efjgmdrwlvpztsmxht", "mpjyuzstmucaaithqjuv", "thqujeonwbwnfyawlkma", NA, "ggmaszxzqshphbboctpv", "usdevabdwbic", "eaerhepugn", NA, "ibbkjoecdahbmxgckxj"), string2 = c("tafittgehdoumeohnyhr", "knrcfmytenlyfsfgukzu", "whrxkhjabyplglpszqcv", NA, NA))
result <- do.call(Quartet:::tqdist_QuartetAgreementChar, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
all_quartets 3 3
tqdist_AllPairsQuartetAgreement 3 0
tqdist_AllPairsQuartetAgreementChar 3 0
tqdist_AllPairsQuartetDistance 3 0
tqdist_AllPairsQuartetDistanceChar 3 0
tqdist_AllPairsTripletDistance 3 0
tqdist_OneToManyQuartetAgreement 3 0
tqdist_OneToManyQuartetAgreementChar 3 2
tqdist_PairsQuartetDistance 3 0
tqdist_PairsTripletDistance 3 0
tqdist_QuartetAgreement 3 0
tqdist_QuartetAgreementChar 3 2
tqdist_QuartetDistance 3 0
tqdist_TripletDistance 3 0
which_index 3 0

Report details

  • Report generated by: 20f0c8c
  • Inputs generator seed: 1661799024

@ms609 ms609 merged commit 3c3ffea into ms609:master Aug 30, 2022
@ms609
Copy link
Owner

ms609 commented Aug 30, 2022

Thanks for this – problems now patched (I think – we'll see whether the test passes!)

Is setting up the checks for my other repos (https://github.com/ms609/TreeTools, https://github.com/ms609/TreeSearch, https://github.com/ms609/TreeDist, https://github.com/ms609/Rogue) as easy as copying and pasting the script you've provided, or would you recommend tweaks / are other steps required?

@FabrizioSandri
Copy link
Contributor Author

FabrizioSandri commented Aug 30, 2022

@ms609 I appreciate you include this new action in your repository.

If you are familiar with workflows, I recommend manually copying and pasting the RcppDeepState.yml workflow file into your repository and adjusting the parameters according to the instructions provided in the action's repository's README file.

One thing to keep in mind is the location option supplied to the action: relative path to the repository's root where the package to be evaluated is placed; if your package is not stored in the repository's root, please specify the location relative to root.

@ms609
Copy link
Owner

ms609 commented Aug 30, 2022

Thanks. At https://github.com/ms609/TreeSearch/actions/runs/2956693949 I see the message

We can't test the function - all_tbr - due to the following datatypes falling out of the allowed ones: IntegerMatrix

which seems to cause the entire run to fail – is this the anticipated behaviour?

@FabrizioSandri
Copy link
Contributor Author

RcppDeepState currently supports the analysis of the following datatypes:

  • Rcpp::NumericVector
  • Rcpp::NumericMatrix
  • Rcpp::CharacterVector
  • Rcpp::IntegerVector
  • arma::mat
  • std::double
  • std::string
  • std::int

In this scenario, the package you are trying to analyze includes all functions that use at least one unsupported datatype: IntegerMatrix. I have in plan to add support for other datatypes to RcppDeepState.

As a workaround you can:

@ms609
Copy link
Owner

ms609 commented Aug 30, 2022

Thanks; I've submitted a PR for the IntegerMatrix type. As writing a custom test harness for each function would entail quite a bit of technical expertise, I wonder whether you might consider allowing the user (or documenting?) an option to simply skip all functions that aren't supported by the current RcppDeepState build?

Thanks for the useful package - hoepfully this will end up sparing my users a few crashes down the line!

@FabrizioSandri
Copy link
Contributor Author

You are right, writing a custom test harness for each function it's a difficult task. Thank you for adding support for IntegerMatrix to RcppDeepState. You may now re-run this task to see if the functions with the argument IntegerMatrix are analyzed.

I wonder whether you might consider allowing the user (or documenting?) an option to simply skip all functions that aren't supported by the current RcppDeepState build?

Regarding this, RcppDeepState currently skips all functions that aren't supported, reporting a warning message. However, if the package only includes functions with unsupported datatypes, RcppDeepState will fail and display an error message. Instead of failing, I feel the acton should report that no function was analyzed without returning an error. I will fix this

@FabrizioSandri
Copy link
Contributor Author

I still notice a linking problem in the latest execution log:

 /github/workspace/src/rearrange.cpp:3:10: fatal error: 'TreeTools/renumber_tree.h' file not found
#include <TreeTools/renumber_tree.h> /* for preorder_edges_and_nodes */
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

This has something to do with FabrizioSandri/RcppDeepState-action#19. I'll update you when this problem is resolved; I'm working on it.

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

Successfully merging this pull request may close these issues.

2 participants