зеркало из https://github.com/github/codeql.git
Merge pull request #1730 from markshannon/python-prepare-for-unrolling
Python prepare for implementing loop unrolling in extractor.
This commit is contained in:
Коммит
34106ec739
|
@ -33,7 +33,6 @@
|
|||
| 63 | seq2 | seq2 | Truthy | test |
|
||||
| 66 | seq3 | seq3 | Truthy | test |
|
||||
| 68 | UnaryExpr | seq4 | Falsey | test |
|
||||
| 78 | seq5 | seq5 | Truthy | test |
|
||||
| 88 | UnaryExpr | x | Falsey | test |
|
||||
| 90 | y | y | Truthy | test |
|
||||
| 93 | UnaryExpr | x | Falsey | test |
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
| 52 | 1 |
|
||||
| 61 | 1 |
|
||||
| 64 | 1 |
|
||||
| 72 | 1 |
|
||||
| 75 | 1 |
|
||||
| 82 | 1 |
|
||||
| 94 | 0 |
|
||||
| 96 | 0 |
|
||||
| 103 | 0 |
|
||||
|
|
|
@ -68,19 +68,19 @@ def loops(seq1, seq2, seq3, seq4, seq5):
|
|||
if not seq4:
|
||||
return
|
||||
#bool(seq3) is False; bool(seq4) is True
|
||||
for var in seq3:
|
||||
count #This is unreachable, but we cannot infer this yet.
|
||||
print(var)
|
||||
for var in seq4:
|
||||
count
|
||||
print(var)
|
||||
#seq5 false then made true
|
||||
if seq5:
|
||||
return
|
||||
seq5.append(1)
|
||||
for var in seq5:
|
||||
count
|
||||
print(var)
|
||||
#for var in seq3:
|
||||
# count #This is unreachable, but we cannot infer this yet.
|
||||
# print(var)
|
||||
#for var in seq4:
|
||||
# count
|
||||
# print(var)
|
||||
##seq5 false then made true
|
||||
#if seq5:
|
||||
# return
|
||||
#seq5.append(1)
|
||||
#for var in seq5:
|
||||
# count
|
||||
# print(var)
|
||||
|
||||
#Logic does not apply to global variables in calls,
|
||||
#as they may be changed from true to false externally.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
| 0 | 81 | 81 | 100.0 |
|
||||
| 1 | 6 | 44 | 13.636363636363637 |
|
|
@ -1 +0,0 @@
|
|||
analysis/CallGraphEfficiency.ql
|
|
@ -1,2 +0,0 @@
|
|||
| 0 | 81 | 81 | 100.0 |
|
||||
| 1 | 3 | 44 | 6.818181818181818 |
|
|
@ -1 +0,0 @@
|
|||
analysis/CallGraphMarginalEfficiency.ql
|
Загрузка…
Ссылка в новой задаче