MCPcopy Create free account
hub / github.com/csmith-project/csmith / InitProbabilityTable

Method InitProbabilityTable

src/StatementAssign.cpp:70–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68DistributionTable StatementAssign::assignOpsTable_;
69
70void
71StatementAssign::InitProbabilityTable()
72{
73 assignOpsTable_.add_entry((int)eSimpleAssign, 70);
74 assignOpsTable_.add_entry((int)eBitAndAssign, 10);
75 assignOpsTable_.add_entry((int)eBitXorAssign, 10);
76 assignOpsTable_.add_entry((int)eBitOrAssign, 10);
77 if (CGOptions::pre_incr_operator())
78 assignOpsTable_.add_entry((int)ePreIncr, 5);
79 if (CGOptions::pre_decr_operator())
80 assignOpsTable_.add_entry((int)ePreDecr, 5);
81 if (CGOptions::post_incr_operator())
82 assignOpsTable_.add_entry((int)ePostIncr, 5);
83 if (CGOptions::post_decr_operator()) {
84 assignOpsTable_.add_entry((int)ePostDecr, 5);
85 }
86}
87
88eAssignOps
89StatementAssign::AssignOpsProbability(const Type* type)

Callers

nothing calls this directly

Calls 1

add_entryMethod · 0.80

Tested by

no test coverage detected