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

Re: [csmith-project/csmith] da5501: add Comma operators and embedded assignments



Cool!  But I can't compile:

g++ -g -O3 -Wall -Wextra -Wno-long-long -o csmith csmith-AbsExtension.o csmith-AbsProgramGenerator.o csmith-AbsRndNumGenerator.o csmith-ArrayVariable.o csmith-Block.o csmith-Bookkeeper.o csmith-CFGEdge.o csmith-CGContext.o csmith-CGOptions.o csmith-CVQualifiers.o csmith-CompatibleChecker.o csmith-Constant.o csmith-CoverageTestExtension.o csmith-CrestExtension.o csmith-DFSOutputMgr.o csmith-DFSProgramGenerator.o csmith-DFSRndNumGenerator.o csmith-DefaultOutputMgr.o csmith-DefaultProgramGenerator.o csmith-DefaultRndNumGenerator.o csmith-DeltaMonitor.o csmith-DepthSpec.o csmith-Effect.o csmith-Error.o csmith-Expression.o csmith-ExpressionFuncall.o csmith-ExpressionVariable.o csmith-ExtensionMgr.o csmith-ExtensionValue.o csmith-Fact.o csmith-FactMgr.o csmith-FactPointTo.o csmith-FactUnion.o csmith-Filter.o csmith-Finalization.o csmith-Function.o csmith-FunctionInvocation.o csmith-FunctionInvocationBinary.o csmith-FunctionInvocationUnary.o csmith-FunctionInvocationUser.o csmith-KleeExtension.o csmith-Lhs.o csmith-LinearSequence.o csmith-MspFilters.o csmith-OutputMgr.o csmith-PartialExpander.o csmith-Probabilities.o csmith-RandomNumber.o csmith-RandomProgramGenerator.o csmith-SafeOpFlags.o csmith-Sequence.o csmith-SequenceFactory.o csmith-SimpleDeltaRndNumGenerator.o csmith-SimpleDeltaSequence.o csmith-SplatExtension.o csmith-Statement.o csmith-StatementArrayOp.o csmith-StatementAssign.o csmith-StatementBreak.o csmith-StatementContinue.o csmith-StatementExpr.o csmith-StatementFor.o csmith-StatementGoto.o csmith-StatementIf.o csmith-StatementReturn.o csmith-StringUtils.o csmith-Type.o csmith-Variable.o csmith-VariableSelector.o csmith-VectorFilter.o csmith-platform.o csmith-random.o csmith-Reducer.o csmith-ReducerOutputMgr.o csmith-util.o
Undefined symbols:
  "typeinfo for ExpressionComma", referenced from:
FactPointTo::rhs_to_lhs_transfer(std::vector<Fact const*, std::allocator<Fact const*> > const&, std::vector<Variable const*, std::allocator<Variable const*> > const&, Expression const*)in csmith-FactPointTo.o FactUnion::rhs_to_lhs_transfer(std::vector<Fact const*, std::allocator<Fact const*> > const&, std::vector<Variable const*, std::allocator<Variable const*> > const&, Expression const*)in csmith-FactUnion.o
  "typeinfo for ExpressionAssign", referenced from:
FactPointTo::rhs_to_lhs_transfer(std::vector<Fact const*, std::allocator<Fact const*> > const&, std::vector<Variable const*, std::allocator<Variable const*> > const&, Expression const*)in csmith-FactPointTo.o FactUnion::rhs_to_lhs_transfer(std::vector<Fact const*, std::allocator<Fact const*> > const&, std::vector<Variable const*, std::allocator<Variable const*> > const&, Expression const*)in csmith-FactUnion.o "ExpressionComma::make_random(CGContext&, Type const*, CVQualifiers const*)", referenced from: Expression::make_random_param(CGContext&, Type const*, CVQualifiers const*, eTermType)in csmith-Expression.o Expression::make_random(CGContext&, Type const*, CVQualifiers const*, bool, bool, eTermType)in csmith-Expression.o "ExpressionAssign::make_random(CGContext&, Type const*, CVQualifiers const*)", referenced from: Expression::make_random_param(CGContext&, Type const*, CVQualifiers const*, eTermType)in csmith-Expression.o Expression::make_random(CGContext&, Type const*, CVQualifiers const*, bool, bool, eTermType)in csmith-Expression.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [csmith] Error 1
make: *** [all-recursive] Error 1
John-Regehrs-MacBook-Air:csmith$





John


On 7/11/11 1:38 PM, Xuejun Yang wrote:
   Branch: refs/heads/master
   Home:   https://github.com/csmith-project/csmith

   Commit: da550190c39123630069be526989e27c4e55f0ab
       https://github.com/csmith-project/csmith/commit/da550190c39123630069be526989e27c4e55f0ab
   Author: Xuejun Yang<jxyang@cs.utah.edu>
   Date:   2011-07-11 (Mon, 11 Jul 2011)

   Changed paths:
     M src/Expression.h
   A src/ExpressionAssign.cpp
   A src/ExpressionAssign.h
   A src/ExpressionComma.cpp
   A src/ExpressionComma.h
   M src/StatementAssign.h
   M src/csmith.vcproj

   Log Message:
   -----------
   add Comma operators and embedded assignments


   Commit: 1eb4fd9f51e432c60cc5f6dcf358625cd1f21b96
       https://github.com/csmith-project/csmith/commit/1eb4fd9f51e432c60cc5f6dcf358625cd1f21b96
   Author: Xuejun Yang<jxyang@cs.utah.edu>
   Date:   2011-07-11 (Mon, 11 Jul 2011)

   Changed paths:
     M src/CGContext.cpp
   M src/Constant.cpp
   M src/Constant.h
   M src/DefaultRndNumGenerator.cpp
   M src/Effect.cpp
   M src/Expression.cpp
   M src/Expression.h
   M src/ExpressionAssign.cpp
   M src/ExpressionAssign.h
   M src/ExpressionComma.cpp
   M src/ExpressionComma.h
   M src/Fact.h
   M src/FactMgr.cpp
   M src/FactMgr.h
   M src/FactPointTo.cpp
   M src/FactPointTo.h
   M src/FactUnion.cpp
   M src/FactUnion.h
   M src/Filter.cpp
   M src/Function.cpp
   M src/FunctionInvocation.cpp
   M src/FunctionInvocationBinary.cpp
   M src/FunctionInvocationUnary.cpp
   M src/FunctionInvocationUser.cpp
   M src/FunctionInvocationUser.h
   M src/ProbabilityTable.h
   M src/Statement.cpp
   M src/StatementAssign.cpp
   M src/StatementAssign.h
   M src/StatementBreak.cpp
   M src/StatementContinue.cpp
   M src/StatementFor.cpp
   M src/StatementIf.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
   M src/VectorFilter.cpp
   M src/VectorFilter.h

   Log Message:
   -----------
   supporting side-effecting expressions and bug fixing for unions

1) add two more expression types: ExpressionAssign for embedded assignments; and ExpressionComma for comma expressions. Give them enough probability to show up in random programs (10% each for now)

2) allow pointer fields inside unions

3) expanded VectorFilter so it filter out candidates after looking up a ProbabilityTable. This is useful for choosing Expression/statement types where a random number is translated into a type based on pre-determined distributions.

4) expand the points-to analysis to accommodate the facts that a shallow copy of struct/unions could impact multiple pointers that are fields of copied structs.

5) expand the effect analysis to accommodate the facts that RHS of assignments could have side effect if it contains 1) function call, 2) embedded assignments, or 3) comma expressions.

6) to simplify points-to analysis, disallow an integer union field to be loop control variable if another field of the same union happens to be pointer

7) rename class "Table" to "TableEntry"

8) fix some bugs in analyzing read/write conflicts between union fields

9) add debugging code to the random number generator

10) kill some warnings barked by MSVC and gcc

11) clean up obsolete code


   Commit: 3f833ee04a283ba63a16a4ed9f203e717bf9588a
       https://github.com/csmith-project/csmith/commit/3f833ee04a283ba63a16a4ed9f203e717bf9588a
   Author: Xuejun Yang<jxyang@cs.utah.edu>
   Date:   2011-07-11 (Mon, 11 Jul 2011)

   Changed paths:
     M src/Statement.cpp

   Log Message:
   -----------
   fix a typo


   Commit: 4b68f633035c6feb7aa2d7f7ea287a1655251fb0
       https://github.com/csmith-project/csmith/commit/4b68f633035c6feb7aa2d7f7ea287a1655251fb0
   Author: Xuejun Yang<jxyang@cs.utah.edu>
   Date:   2011-07-11 (Mon, 11 Jul 2011)

   Changed paths:
     M src/Makefile.am
   M src/csmith.vcxproj

   Log Message:
   -----------
   add two new classes: ExpressionAssign and ExpressionComma


Compare: https://github.com/csmith-project/csmith/compare/cc2cae0...4b68f63