[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-project/csmith] e7e494: Support Unions in random programs to the extend St...



Branch: refs/heads/master
Home:   https://github.com/csmith-project/csmith

Commit: e7e49454c6c42625ab967223ee7061eddca7110d
    https://github.com/csmith-project/csmith/commit/e7e49454c6c42625ab967223ee7061eddca7110d
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date:   2011-06-10 (Fri, 10 Jun 2011)

Changed paths:
  M src/ArrayVariable.cpp
  M src/Bookkeeper.cpp
  M src/Bookkeeper.h
  M src/CGContext.cpp
  M src/CGOptions.cpp
  M src/CGOptions.h
  M src/CVQualifiers.cpp
  M src/Constant.cpp
  M src/DFSOutputMgr.cpp
  M src/DFSOutputMgr.h
  M src/DFSProgramGenerator.cpp
  M src/DefaultOutputMgr.cpp
  M src/Effect.cpp
  M src/Expression.cpp
  M src/ExpressionFuncall.cpp
  M src/Function.cpp
  M src/FunctionInvocation.cpp
  M src/OutputMgr.h
  M src/Probabilities.cpp
  M src/Probabilities.h
  M src/RandomProgramGenerator.cpp
  M src/ReducerOutputMgr.cpp
  M src/ReducerOutputMgr.h
  M src/StatementArrayOp.cpp
  M src/Type.cpp
  M src/Type.h
  M src/Variable.cpp
  M src/Variable.h
  M src/VariableSelector.cpp
  M src/VariableSelector.h

Log Message:
-----------
Support Unions in random programs to the extend Structs were supported

Note the unspecified behavior: writing to one field of an union, then reading the value of another field, is not avoided currently. They are supposed to be handled by an updated generation time analyzer that I will check in soon.


Commit: 4cb9161768016662734cbc73371e1203af833438
    https://github.com/csmith-project/csmith/commit/4cb9161768016662734cbc73371e1203af833438
Author: Xuejun Yang <jxyang@cs.utah.edu>
Date:   2011-06-10 (Fri, 10 Jun 2011)

Changed paths:
  M src/Bookkeeper.cpp
  M src/Bookkeeper.h
  M src/CGContext.cpp
  M src/Effect.cpp
  M src/Effect.h
  M src/Probabilities.cpp
  M src/Variable.h
  M src/VariableSelector.cpp

Log Message:
-----------
special handling of unions when doing effect analysis

1) recognize the fact that write to one field of an union is in conflict with read/write to another field. This is in contrast with structures.
2) print out statistics of how many union variables are generated at the end of the program
3) clean up statistics collecting a little


Compare: https://github.com/csmith-project/csmith/compare/a776365...4cb9161