Project

General

Profile

Task #5952

Biased distribution over test situations

Added by Alexander Kamkin almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
05/19/2015
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Published in build:
150605

Description

Similar to biased distributions over operand values.

History

#1

Updated by Andrei Tatarnikov over 4 years ago

  • % Done changed from 0 to 100

Done in r3813. Example:

class RandomSituationTemplate < MiniMipsBaseTemplate

  def run
    int32_dist = dist(
      range(:value => 0,                      :bias => 25),
      range(:value => 1..2,                   :bias => 25),
      range(:value => 0xffffFFFE..0xffffFFFF, :bias => 50))

    sit_dist = dist(
      range(:value => situation('add.overflow'),      :bias => 20),
      range(:value => situation('add.normal'),        :bias => 20),
      range(:value => situation('zero', :size => 32), :bias => 25),
      range(:value => situation('random_biased', :size => 32, :dist => int32_dist), :bias => 35))

    10.times {
      atomic {
        add t1, t2, t3 do random_situation(sit_dist) end
      }
    }
  end
end
#2

Updated by Andrei Tatarnikov over 4 years ago

  • Status changed from New to Resolved

Done in r3813. Example:

class RandomSituationTemplate < MiniMipsBaseTemplate

  def run
    int32_dist = dist(
      range(:value => 0,                      :bias => 25),
      range(:value => 1..2,                   :bias => 25),
      range(:value => 0xffffFFFE..0xffffFFFF, :bias => 50))

    sit_dist = dist(
      range(:value => situation('add.overflow'),      :bias => 20),
      range(:value => situation('add.normal'),        :bias => 20),
      range(:value => situation('zero', :size => 32), :bias => 25),
      range(:value => situation('random_biased', :size => 32, :dist => int32_dist), :bias => 35))

    10.times {
      atomic {
        add t1, t2, t3 do random_situation(sit_dist) end
      }
    }
  end
end
#3

Updated by Andrei Tatarnikov over 4 years ago

  • Status changed from Resolved to Closed
  • Published in build set to 150605

Also available in: Atom PDF