@@ -167,9 +167,6 @@ namespace SolveAvdoshin
167167
168168 abstract public byte Eval();
169169 abstract new public string ToString();
170− abstract public int CountVariables();
171− abstract public void SetIthVar(int i, BooleanVariable value);
172− abstract public int SetIthOp(int i, BooleanOperation value);
173170 abstract public BooleanExpression Clone();
174171
175172 public override int GetHashCode()
@@ -237,20 +234,6 @@ namespace SolveAvdoshin
237234 Right = right;
238235 }
239236
240− public OpExpression(BooleanOperation op, BooleanVariable left, BooleanExpression right)
241− {
242− Op = op;
243− Left = new VarExpression(left);
244− Right = right;
245− }
246−
247− public OpExpression(BooleanOperation op, BooleanExpression left, BooleanVariable right)
248− {
249− Op = op;
250− Left = left;
251− Right = new VarExpression(right);
252− }
253−
254237 public OpExpression(BooleanOperation op, BooleanVariable left, BooleanVariable right)
255238 {
256239 Op = op;
@@ -344,45 +327,6 @@ namespace SolveAvdoshin
344327 return "(" + Left.ToString() + " " + PrintOperation(Op) + " " + Right.ToString() + ")";
345328 }
346329 }
347−
348− public override int CountVariables()
349− {
350− int res = 0;
351−
352− res += Left.CountVariables();
353− res += Right.CountVariables();
354−
355− return res;
356− }
357−
358− public override void SetIthVar(int i, BooleanVariable value)
359− {
360− if(i >= Left.CountVariables()) {
361− Right.SetIthVar(i - Left.CountVariables(), value);
362− }
363− else {
364− Left.SetIthVar(i, value);
365− }
366− }
367−
368− public override int SetIthOp(int i, BooleanOperation value)
369− {
370− if(i < 0) {
371− return 0;
372− }
373− else {
374− if(i == 0) {
375− Op = value;
376− }
377−
378− int res = 1;
379−
380− res += Left.SetIthOp(i - res, value);
381− res += Right.SetIthOp(i - res, value);
382−
383− return res;
384− }
385− }
386330 }
387331
388332 class VarExpression : BooleanExpression
@@ -423,21 +367,6 @@ namespace SolveAvdoshin
423367 {
424368 return VarSymbols[(int)Var];
425369 }
426−
427− public override int CountVariables()
428− {
429− return 1;
430− }
431−
432− public override void SetIthVar(int i, BooleanVariable variable)
433− {
434− this.Var = variable;
435− }
436−
437− public override int SetIthOp(int i, BooleanOperation value)
438− {
439− return 0;
440− }
441370 }
442371}
443372