1 | // returns comments |
2 | static LS gazelle_proposeVarDiscriminators(ai_gazelle_analyzeStatementsForRule_Data data) { |
3 | LS discriminators = ll(f isInteger); |
4 | new LS out; |
5 | varLoop: for (S var : data.usedVars) { |
6 | Pair<Set<S>> p = gazelle_goodAndBadValuesForVariable(data, var); |
7 | if (nempty(p.a) && nempty(p.b)) |
8 | for (S discriminator : discriminators) pcall { |
9 | if (scoreDiscriminator(discriminator, p).allCorrect()) { |
10 | out.add(format("var " + quote(var) + " should satisfy *", discriminator)); |
11 | continue varLoop; |
12 | } |
13 | } |
14 | } |
15 | ret out; |
16 | } |
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: | 266 / 309 |
Version history: | 6 change(s) |
Referenced in: | [show references] |