Skip to content

Commit

Permalink
feat: weighted sum approach 2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreps1123 committed Apr 8, 2024
1 parent 69d2a9a commit 3c7c8e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fuzz/distance_coverage_orderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
)

const WEIGHT_1 = 1
const WEIGHT_2 = 3
const WEIGHT_3 = 6
const WEIGHT_2 = 6
const WEIGHT_3 = 3

type distanceCoverageBasedOrderer struct {
contract *dto.ContractDTO
Expand All @@ -26,7 +26,7 @@ func (o *distanceCoverageBasedOrderer) OrderTransactions(transactions []*dto.Tra
}

func (o *distanceCoverageBasedOrderer) computeScore(transaction *dto.TransactionDTO) float64 {
// 1, 3, 6
// 1, 6, 3
return WEIGHT_1*o.computeCriticalInstructionsHits(transaction) +
WEIGHT_2*o.computeDistance(transaction) +
WEIGHT_3*o.computeCoverage(transaction)
Expand Down

0 comments on commit 3c7c8e5

Please sign in to comment.