[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[csmith-project/csmith] 308848: formalizing effect analysis for assignments
Branch: refs/heads/master
Home: https://github.com/csmith-project/csmith
Commit: 3088484c18d83314663dc7df23f66c45dc51c78f
https://github.com/csmith-project/csmith/commit/3088484c18d83314663dc7df23f66c45dc51c78f
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date: 2011-07-21 (Thu, 21 Jul 2011)
Changed paths:
M src/CGContext.cpp
M src/CGContext.h
M src/Effect.cpp
M src/Effect.h
M src/Expression.cpp
M src/Function.cpp
M src/FunctionInvocation.cpp
M src/Lhs.cpp
M src/Lhs.h
M src/StatementAssign.cpp
Log Message:
-----------
formalizing effect analysis for assignments
assignment operator is different from other binary operators in that although evaluations of RHS and LHS are unordered, some partial ordering exist: a) read on RHS happens before write on LHS of the same object; 2) function calls on RHS happen before write on LHS.
Current effect analysis uses effect_context to solve the order of evaluation problem, which is not well suited for generating assignments, especially when there are embedded assignments and/or prefix/postfix ++/-- operators on RHS of assignments. A temporary solution here is keeping track a list of written variables on RHS of assignment, and adding them to the effect context when generating LHS. A better solution, we probably have to adopt later, is formalizing sequence points in effect analysis. Only with this we can extend Csmith to languages other than C/C++.
Commit: a791a6f61138111b07d4b278fdee26eee2221bb6
https://github.com/csmith-project/csmith/commit/a791a6f61138111b07d4b278fdee26eee2221bb6
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date: 2011-07-21 (Thu, 21 Jul 2011)
Changed paths:
M src/ExpressionAssign.cpp
Log Message:
-----------
fix a bugs in generating side-effecting expressions
avoid writing to volatile storages when creating embedded assignments or prefix/postfix ++/-- operators. This is for the benefit of effect analysis.
Commit: bd4a83ac65549d9e30417dc6b038b1c45d26e9d0
https://github.com/csmith-project/csmith/commit/bd4a83ac65549d9e30417dc6b038b1c45d26e9d0
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date: 2011-07-21 (Thu, 21 Jul 2011)
Changed paths:
M src/Variable.h
Log Message:
-----------
fix a bug in generating unions
a field in a nested struct which is inside an union should be considered inside union
Commit: 11305f8409501b56495e61359c83a0116e7e2d01
https://github.com/csmith-project/csmith/commit/11305f8409501b56495e61359c83a0116e7e2d01
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date: 2011-07-21 (Thu, 21 Jul 2011)
Changed paths:
M src/Reducer.cpp
M src/Reducer.h
M src/ReducerOutputMgr.cpp
Log Message:
-----------
fix a bug in the reducer
Compare: https://github.com/csmith-project/csmith/compare/7d6fae9...11305f8