Example #1
0
 public ImmutableHashSet <object> VisitZenBitwiseOrExpr <T>(ZenBitwiseOrExpr <T> expression, Unit parameter)
 {
     return(LookupOrCompute(expression, () =>
     {
         var x = expression.Expr1.Accept(this, parameter);
         var y = expression.Expr2.Accept(this, parameter);
         return x.Union(y);
     }));
 }
Example #2
0
 /// <summary>
 /// Convert a 'BitwiseOr' expression.
 /// </summary>
 /// <param name="expression">The expression.</param>
 /// <param name="parameter">The parameter.</param>
 /// <returns>The compilable expression.</returns>
 public Expression VisitZenBitwiseOrExpr <T>(ZenBitwiseOrExpr <T> expression, ExpressionConverterEnvironment parameter)
 {
     return(LookupOrCompute(expression, () =>
     {
         return BitwiseOr <T>(
             expression.Expr1.Accept(this, parameter),
             expression.Expr2.Accept(this, parameter));
     }));
 }
 /// <summary>
 /// Visit a BitwiseOrExpr.
 /// </summary>
 /// <param name="expression">The expression.</param>
 /// <param name="parameter">The parameter.</param>
 /// <returns>The resulting symbolic value.</returns>
 public SymbolicValue <TModel, TVar, TBool, TInt> VisitZenBitwiseOrExpr <T1>(ZenBitwiseOrExpr <T1> expression, SymbolicEvaluationEnvironment <TModel, TVar, TBool, TInt> parameter)
 {
     return(LookupOrCompute(expression, () =>
     {
         var v1 = (SymbolicInteger <TModel, TVar, TBool, TInt>)expression.Expr1.Accept(this, parameter);
         var v2 = (SymbolicInteger <TModel, TVar, TBool, TInt>)expression.Expr2.Accept(this, parameter);
         return new SymbolicInteger <TModel, TVar, TBool, TInt>(this.Solver, this.Solver.BitwiseOr(v1.Value, v2.Value));
     }));
 }