Esempio n. 1
0
#!/usr/bin/env python3
from parse import parseAnalyzing
from Common import clusterBFS


def backtraceClusterBFS(profile, searchSet, args, verbose=1):
    """ Search set contains backtrace based index of call site yet in double precision.
        Returns the new search set and the set of call site successfully converted to single precision.
    """
    ## Composed constants
    return clusterBFS(profile, searchSet, args, False, verbose=verbose)


if __name__ == "__main__":
    ## Parsing arguments
    args = parseAnalyzing()
    profileFile = args.readdir + "/" + profileFile
    ## get verbose level from generateStrat.py
    profile = Profile(profileFile)
    initSet = profile._doublePrecisionSet
    initSet = set(profile.convertSloc2BtId(initSet))
    slocClusterBFS(profile, initSet, args)
Esempio n. 2
0
strat5 = "SLOC"
strat6 = "SLOC-C"
strat7 = "SLOC-C->SLOC"
strat8 = "SLOC-C->SLOC->BT"
strat9 = "SLOC-C->SLOC->BT-Cf"
strat10 = "SLOC-C->SLOC->BT-Cf->BT"
strat11 = "SLOC-C->SLOC->BT-C"
strat12 = "SLOC-C->SLOC->BT-C->BT"
strat13 = "SLOC->BT"
strategies = np.array([
    strat0, strat1, strat2, strat3, strat4, strat5, strat6, strat7, strat8,
    strat9, strat10, strat11, strat12, strat13
])
## Parsing arguments
verbose = 1
args = parseAnalyzing(verbose)
print(args)
##SLOC BT -C -Cf ->
strategy = args.strategy
## Composed constants
profileFile = args.readdir + "/" + args.profilefile

## Fill initial type configuration list indexed by backtrace based call site ID
profile = Profile(profileFile, 0)
initSet = profile._doublePrecisionSlocSet
slocsuccess = []
btsuccess = []
## S:success F:failure
S = set()
F = set()
##TODO: why need profileFile to apply strategy (libC++)?