equal
deleted
inserted
replaced
24 import isac.interfaces.ICalcElement; |
24 import isac.interfaces.ICalcElement; |
25 import isac.interfaces.ICalcIterator; |
25 import isac.interfaces.ICalcIterator; |
26 import isac.interfaces.IToCalc; |
26 import isac.interfaces.IToCalc; |
27 import isac.interfaces.IToUser; |
27 import isac.interfaces.IToUser; |
28 import isac.kestore.KEStoreServices; |
28 import isac.kestore.KEStoreServices; |
29 import isac.util.CalcChangedEvent; |
29 import isac.util.CalcChanged; |
30 import isac.util.Formalization; |
30 import isac.util.Formalization; |
31 import isac.util.formulae.Assumptions; |
31 import isac.util.formulae.Assumptions; |
32 import isac.util.formulae.CalcHead; |
32 import isac.util.formulae.CalcHead; |
33 import isac.util.formulae.CalcFormula; |
33 import isac.util.formulae.CalcFormula; |
34 import isac.util.formulae.Formula; |
34 import isac.util.formulae.Formula; |
76 MathEngine me = MathEngine.getMathEngine(); |
76 MathEngine me = MathEngine.getMathEngine(); |
77 |
77 |
78 IToCalc ct = me.getCalcTree(fmz); |
78 IToCalc ct = me.getCalcTree(fmz); |
79 IToUser user = new MockIToUser(); |
79 IToUser user = new MockIToUser(); |
80 ct.addDataChangeListener(user); |
80 ct.addDataChangeListener(user); |
81 CalcChangedEvent cce = null; |
81 CalcChanged cce = null; |
82 System.out.println(".end step_a-----"); |
82 System.out.println(".end step_a-----"); |
83 //end step_a |
83 //end step_a |
84 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
84 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
85 |
85 |
86 ct.completeCalcHead(); |
86 ct.completeCalcHead(); |
109 //end step_c |
109 //end step_c |
110 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
110 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
111 |
111 |
112 //display the steps generated |
112 //display the steps generated |
113 Object fch = null; |
113 Object fch = null; |
114 ci = (ICalcIterator) cce.getLastUnchangedFormula().clone(); |
114 ci = (ICalcIterator) cce.getLastUnchangedFormula().cloneIterator(); |
115 int i = 0; |
115 int i = 0; |
116 // while (ci.compareTo(cce.getLastGeneratedFormula()) < 0) { |
116 // while (ci.compareTo(cce.getLastGeneratedFormula()) < 0) { |
117 // i++; |
117 // i++; |
118 // boolean b = ci.moveDown(); |
118 // boolean b = ci.moveDown(); |
119 // System.out.print("..iterator at " + ci.toSMLString()); |
119 // System.out.print("..iterator at " + ci.toSMLString()); |
167 MathEngine me = MathEngine.getMathEngine(); |
167 MathEngine me = MathEngine.getMathEngine(); |
168 |
168 |
169 IToCalc ct = me.getCalcTree(fmz); |
169 IToCalc ct = me.getCalcTree(fmz); |
170 IToUser user = new MockIToUser(); |
170 IToUser user = new MockIToUser(); |
171 ct.addDataChangeListener(user); |
171 ct.addDataChangeListener(user); |
172 CalcChangedEvent cce = null; |
172 CalcChanged cce = null; |
173 System.out.println(".end step_a-----"); |
173 System.out.println(".end step_a-----"); |
174 //end step_a |
174 //end step_a |
175 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
175 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
176 |
176 |
177 ct.completeCalcHead(); |
177 ct.completeCalcHead(); |
302 MathEngine me = MathEngine.getMathEngine(); |
302 MathEngine me = MathEngine.getMathEngine(); |
303 |
303 |
304 IToCalc ct = me.getCalcTree(fmz); |
304 IToCalc ct = me.getCalcTree(fmz); |
305 IToUser user = new MockIToUser(); |
305 IToUser user = new MockIToUser(); |
306 ct.addDataChangeListener(user); |
306 ct.addDataChangeListener(user); |
307 CalcChangedEvent cce = null; |
307 CalcChanged cce = null; |
308 System.out.println(".end step_a-----"); |
308 System.out.println(".end step_a-----"); |
309 //end step_a |
309 //end step_a |
310 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
310 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
311 |
311 |
312 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |
312 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |
432 MathEngine me = MathEngine.getMathEngine(); |
432 MathEngine me = MathEngine.getMathEngine(); |
433 |
433 |
434 IToCalc ct = me.getCalcTree(fmz); |
434 IToCalc ct = me.getCalcTree(fmz); |
435 IToUser user = new MockIToUser(); |
435 IToUser user = new MockIToUser(); |
436 ct.addDataChangeListener(user); |
436 ct.addDataChangeListener(user); |
437 CalcChangedEvent cce = null; |
437 CalcChanged cce = null; |
438 System.out.println(".end step_a-----"); |
438 System.out.println(".end step_a-----"); |
439 //end step_a |
439 //end step_a |
440 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
440 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
441 |
441 |
442 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |
442 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |
551 MathEngine me = MathEngine.getMathEngine(); |
551 MathEngine me = MathEngine.getMathEngine(); |
552 |
552 |
553 IToCalc ct = me.getCalcTree(fmz); |
553 IToCalc ct = me.getCalcTree(fmz); |
554 IToUser user = new MockIToUser(); |
554 IToUser user = new MockIToUser(); |
555 ct.addDataChangeListener(user); |
555 ct.addDataChangeListener(user); |
556 CalcChangedEvent cce = null; |
556 CalcChanged cce = null; |
557 System.out.println(".end step_a-----"); |
557 System.out.println(".end step_a-----"); |
558 //end step_a |
558 //end step_a |
559 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
559 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
560 |
560 |
561 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |
561 ct.autoCalculate(IToCalc.SCOPE_CALCULATION, 0); |