if (sts[j] != d_var_sygus_types.end())
{
unsigned ntypes = sts[j]->second.size();
- Assert(ntypes > 0);
- unsigned index = Random::getRandom().pick(0, ntypes - 1);
- if (index < ntypes)
+ if(ntypes > 0)
{
- // currently hard coded to 0.0, 0.5
- r = getSygusRandomValue(sts[j]->second[index], 0.0, 0.5);
+ unsigned index = Random::getRandom().pick(0, ntypes - 1);
+ if (index < ntypes)
+ {
+ // currently hard coded to 0.0, 0.5
+ r = getSygusRandomValue(sts[j]->second[index], 0.0, 0.5);
+ }
}
}
}
}
return nm->mkConst(BitVector(ss.str(), 2));
}
+ else if (tn.isFloatingPoint() )
+ {
+ // extremely naive uniform generation of floating points
+ unsigned e = tn.getFloatingPointExponentSize();
+ unsigned s = tn.getFloatingPointSignificandSize();
+ TypeNode bvt = nm->mkBitVectorType(e+s);
+ Node bvc = getRandomValue(bvt);
+ return nm->mkConst(FloatingPoint(e,s,bvc.getConst<BitVector>()));
+ }
else if (tn.isString() || tn.isInteger())
{
// if string, determine the alphabet