// returns comments static LS gazelle_proposeVarDiscriminators(ai_gazelle_analyzeStatementsForRule_Data data) { LS discriminators = ll(f isInteger); new LS out; varLoop: for (S var : data.usedVars) { Pair<Set<S>> p = gazelle_goodAndBadValuesForVariable(data, var); if (nempty(p.a) && nempty(p.b)) for (S discriminator : discriminators) pcall { if (scoreDiscriminator(discriminator, p).allCorrect()) { out.add(format("var " + quote(var) + " should satisfy *", discriminator)); continue varLoop; } } } ret out; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1021864 |
| Snippet name: | gazelle_proposeVarDiscriminators |
| Eternal ID of this version: | #1021864/7 |
| Text MD5: | 4b91b7de52029c725904509d3b1428b3 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-02 19:10:53 |
| Source code size: | 591 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 482 / 532 |
| Version history: | 6 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1021892 - gazelle_proposeCalculationFunctions [dev.] |