Added:
trunk/procilege/src/main/java/merisis/Mark.java
trunk/procilege/src/main/java/merisis/MerisisVM.java
- copied, changed from r71, /trunk/procilege/src/main/java/merisis/traitspace/MerisisVM.java
trunk/procilege/src/main/java/merisis/impl/
trunk/procilege/src/main/java/merisis/impl/MarkReferrenceImpl.java
Removed:
trunk/procilege/src/main/java/merisis/traitspace/MerisisVM.java
Modified:
trunk/procilege/src/main/java/merisis/contentcloud/impl/ContentCloudImpl.java
trunk/procilege/src/main/java/merisis/traitspace/Morphism.java
trunk/procilege/src/main/java/merisis/traitspace/impl/ProcessContext.java
trunk/procilege/src/main/java/merisis/traitspace/impl/SketchImpl.java
trunk/procilege/src/main/java/merisis/traitspace/impl/TraitSpaceImpl.java
trunk/procilege/src/main/java/procilege/impl/ComputationalEntityMgr.java
trunk/procilege/src/main/java/procilege/impl/DefaultProcilegeModule.java
trunk/procilege/src/main/java/procilege/impl/PrivFormAnalysisImpl.java
trunk/procilege/src/test/java/merisis/contentcloud/AbstractContentCloudTest.java
trunk/procilege/src/test/java/merisis/contentcloud/ContentCloudTest1.java
trunk/procilege/src/test/java/merisis/traitspace/AbstractTraitSpaceTest.java
trunk/procilege/src/test/java/merisis/traitspace/MorphismIsaTest.java
trunk/procilege/src/test/java/merisis/traitspace/MorphismTest1.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch1Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch2Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch3Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch4Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch5Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch6Test.java
trunk/procilege/src/test/java/merisis/traitspace/Sketch7Test.java
trunk/procilege/src/test/java/merisis/traitspace/Spectrum1Test.java
trunk/procilege/src/test/java/procilege/test/TestZero.java
trunk/procilege/src/test/java/procilege/test/pal/AbstractPalTest.java
trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest1.java
trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest2.java
trunk/procilege/src/test/java/procilege/test/pal/EntityIsATest1.java
trunk/procilege/src/test/java/procilege/test/pal/EntityPropertyTest1.java
trunk/procilege/src/test/java/procilege/test/pal/RecursivePrivilegeTest.java
trunk/procilege/src/test/java/procilege/test/simplecase/SimpleCaseTest.java
Log:
[Issue 37] Refined the interfaces of merisis.
Added: trunk/procilege/src/main/java/merisis/Mark.java
==============================================================================
--- (empty file)
+++ trunk/procilege/src/main/java/merisis/Mark.java Thu Jun 7 03:13:07 2007
@@ -0,0 +1,5 @@
+package merisis;
+
+public interface Mark {
+
+}
Copied: trunk/procilege/src/main/java/merisis/MerisisVM.java (from r71, /trunk/procilege/src/main/java/merisis/traitspace/MerisisVM.java)
==============================================================================
--- /trunk/procilege/src/main/java/merisis/traitspace/MerisisVM.java (original)
+++ trunk/procilege/src/main/java/merisis/MerisisVM.java Thu Jun 7 03:13:07 2007
@@ -1,26 +1,28 @@
-package merisis.traitspace;
+package merisis;
public interface MerisisVM {
long[] background();
-
- void zoomin(long... foucs);
- void source(long... points);
-
+ void stepin();
+
+ void stepout();
+
void autobeam();
- void exit();
-
- void focus(long... guides);
-
- void tprism(long... traits);
-
+ void source();
+
+ void focus();
+
+ void tprism();
+
void tcomplementary();
-
+
void roll(long roll);
- long where();
+ void give(long... dots);
+
+ Mark mark();
long[] read();
Modified: trunk/procilege/src/main/java/merisis/contentcloud/impl/ContentCloudImpl.java
==============================================================================
--- trunk/procilege/src/main/java/merisis/contentcloud/impl/ContentCloudImpl.java (original)
+++ trunk/procilege/src/main/java/merisis/contentcloud/impl/ContentCloudImpl.java Thu Jun 7 03:13:07 2007
@@ -6,8 +6,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import merisis.MerisisVM;
import merisis.contentcloud.ContentCloud;
-import merisis.traitspace.MerisisVM;
import com.google.inject.Inject;
Added: trunk/procilege/src/main/java/merisis/impl/MarkReferrenceImpl.java
==============================================================================
--- (empty file)
+++ trunk/procilege/src/main/java/merisis/impl/MarkReferrenceImpl.java Thu Jun 7 03:13:07 2007
@@ -0,0 +1,7 @@
+package merisis.impl;
+
+import merisis.Mark;
+
+public class MarkReferrenceImpl implements Mark {
+
+}
Modified: trunk/procilege/src/main/java/merisis/traitspace/Morphism.java
==============================================================================
--- trunk/procilege/src/main/java/merisis/traitspace/Morphism.java (original)
+++ trunk/procilege/src/main/java/merisis/traitspace/Morphism.java Thu Jun 7 03:13:07 2007
@@ -7,6 +7,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import merisis.MerisisVM;
import merisis.util.BitUtil;
import org.apache.solr.util.OpenBitSet;
@@ -19,12 +20,12 @@
private Logger logger;
@Inject
- private MerisisVM ts;
+ private MerisisVM mvm;
public void set(long f, long a, long b) {
- long isainst = ts.occur(a, f);
- long occurrence = ts.occur(isainst, b);
+ long isainst = mvm.occur(a, f);
+ long occurrence = mvm.occur(isainst, b);
if (logger.isLoggable(Level.FINER)) {
logger.finer(format("morphism %d:(%d:(%d %d), %d)", occurrence,
@@ -131,9 +132,10 @@
private OpenBitSet infimumB(OpenBitSet infimum, long f, long a) {
- ts.source(f, a);
- ts.focus();
- long[] suspicious = ts.read();
+ mvm.give(f, a);
+ mvm.source();
+ mvm.focus();
+ long[] suspicious = mvm.read();
if (logger.isLoggable(Level.FINEST)) {
logger.finest(String.format("suspicious instances: {%s}", BitUtil
.toString(suspicious)));
@@ -144,22 +146,25 @@
long instance = suspicious[i];
long[] sp;
- ts.autobeam();
+ mvm.autobeam();
try {
- ts.focus(instance);
- sp = ts.read();
+ mvm.give(instance);
+ mvm.focus();
+ sp = mvm.read();
if (sp == null)
continue;
} finally {
- ts.exit();
+ mvm.stepout();
}
OpenBitSet aparents = new OpenBitSet();
for (int j = 0; j < sp.length; j++) {
long aparent = sp[j];
- ts.source(f, a);
- ts.focus(aparent);
- if (ts.read() != null) {
+ mvm.give(f, a);
+ mvm.source();
+ mvm.give(aparent);
+ mvm.focus();
+ if (mvm.read() != null) {
aparents.set(aparent);
}
}
@@ -180,9 +185,10 @@
private OpenBitSet infimumA(OpenBitSet infimum, long f, long b) {
- ts.source(f, b);
- ts.focus();
- long[] suspects = ts.read();
+ mvm.give(f, b);
+ mvm.source();
+ mvm.focus();
+ long[] suspects = mvm.read();
if (logger.isLoggable(Level.FINEST)) {
logger.finest(String.format("suspicious: {%s}", BitUtil
.toString(suspects)));
@@ -193,22 +199,25 @@
long suspect = suspects[i];
- ts.autobeam();
+ mvm.autobeam();
try {
- ts.focus(suspect);
+ mvm.give(suspect);
+ mvm.focus();
} finally {
- ts.exit();
+ mvm.stepout();
}
- long[] sp = ts.read();
+ long[] sp = mvm.read();
if (sp == null)
continue;
for (int j = 0; j < sp.length; j++) {
- ts.source(f,b);
- ts.focus(sp[j]);
- if (ts.read() != null) {
+ mvm.give(f,b);
+ mvm.source();
+ mvm.give(sp[j]);
+ mvm.focus();
+ if (mvm.read() != null) {
continue SUSPECT;
}
}
@@ -218,22 +227,25 @@
ArrayList<Long> suspInfimum = new ArrayList<Long>();
for (long witness : witnessOfABranches) {
- ts.autobeam();
+ mvm.autobeam();
try {
- ts.focus(witness);
+ mvm.give(witness);
+ mvm.focus();
} finally {
- ts.exit();
+ mvm.stepout();
}
- long[] sp = ts.read();
+ long[] sp = mvm.read();
if (sp == null)
continue;
for (int j = 0; j < sp.length; j++) {
- ts.source(b);
- ts.focus(sp[j]);
- if (ts.read() != null)
+ mvm.give(b);
+ mvm.source();
+ mvm.give(sp[j]);
+ mvm.focus();
+ if (mvm.read() != null)
continue;
suspInfimum.add(sp[j]);
@@ -243,23 +255,26 @@
for(long witness : suspInfimum) {
- ts.autobeam();
+ mvm.autobeam();
try {
- ts.focus(witness);
+ mvm.give(witness);
+ mvm.focus();
} finally {
- ts.exit();
+ mvm.stepout();
}
- long[] sp = ts.read();
+ long[] sp = mvm.read();
if (sp == null)
continue;
for (int j = 0; j < sp.length; j++) {
- ts.source(f);
- ts.focus(sp[j]);
- if (ts.read() != null)
+ mvm.give(f);
+ mvm.source();
+ mvm.give(sp[j]);
+ mvm.focus();
+ if (mvm.read() != null)
continue;
infimum.set(sp[j]);
Modified: trunk/procilege/src/main/java/merisis/traitspace/impl/ProcessContext.java
==============================================================================
--- trunk/procilege/src/main/java/merisis/traitspace/impl/ProcessContext.java (original)
+++ trunk/procilege/src/main/java/merisis/traitspace/impl/ProcessContext.java Thu Jun 7 03:13:07 2007
@@ -12,7 +12,7 @@
SketchImpl sketch;
- OpenBitSet thisresult;
+ OpenBitSet objective;
public ProcessContext(History history) {
sketch = new SketchImpl(history);
Modified: trunk/procilege/src/main/java/merisis/traitspace/impl/SketchImpl.java
==============================================================================
--- trunk/procilege/src/main/java/merisis/traitspace/impl/SketchImpl.java (original)
+++ trunk/procilege/src/main/java/merisis/traitspace/impl/SketchImpl.java Thu Jun 7 03:13:07 2007
@@ -211,6 +211,9 @@
public OpenBitSet tcomplementary() {
+ if (focused == null || focused.isEmpty())
+ return null;
+
// negative spectrum
OpenBitSet nselected = new OpenBitSet();
for (long node = focused.nextSetBit(0); node >= 0; node = focused
@@ -219,7 +222,7 @@
long[] preivios = history.previous(node);
if (preivios == null)
continue;
-
+
for (int j = 0; j < preivios.length; j++) {
long point = preivios[j];
@@ -277,6 +280,17 @@
}
private void search() {
+
+ if (logger.isLoggable(Level.FINEST)) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("sources: {");
+ BitUtil.format(sb, bound, ",");
+ sb.append("}, parts: {");
+ BitUtil.format(sb, part, ",");
+ sb.append("}");
+ logger.finest(sb.toString());
+ }
+
if (bound == null)
return;
Modified: trunk/procilege/src/main/java/merisis/traitspace/impl/TraitSpaceImpl.java
==============================================================================
--- trunk/procilege/src/main/java/merisis/traitspace/impl/TraitSpaceImpl.java (original)
+++ trunk/procilege/src/main/java/merisis/traitspace/impl/TraitSpaceImpl.java Thu Jun 7 03:13:07 2007
@@ -4,10 +4,11 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import merisis.Mark;
+import merisis.MerisisVM;
import merisis.sense.SenseMaker;
import merisis.traitspace.History;
import merisis.traitspace.PointGroup;
-import merisis.traitspace.MerisisVM;
import merisis.util.BitUtil;
import org.apache.solr.util.OpenBitSet;
@@ -27,12 +28,13 @@
private ThreadLocal<ProcessContext> processces = new ThreadLocal<ProcessContext>();
- public void zoomin(long... foucs) {
+ public void stepin() {
ProcessContext ctx = getProcessContext();
Stack<HistoryView> viewStack = ctx.viewStack;
- OpenBitSet hvbound = BitUtil.bitsetOrArray(new OpenBitSet(), foucs);
+ OpenBitSet hvbound = new OpenBitSet();
+ hvbound.or(ctx.objective);
if (!viewStack.isEmpty()) {
hvbound.or(viewStack.peek().bound);
}
@@ -41,15 +43,19 @@
hv.bound = hvbound;
viewStack.push(hv);
+
+ ctx.objective = null;
}
- public void source(long... points) {
+ public void source() {
ProcessContext ctx = getProcessContext();
HistoryView hv = ctx.viewStack.peek();
- OpenBitSet pickup;
- pickup = BitUtil.bitsetOrArray(new OpenBitSet(), points);
+ OpenBitSet pickup = new OpenBitSet();
+
+ pickup.or(ctx.objective);
+ ctx.objective = null;
pickup.or(hv.bound);
hv.pickup = pickup;
@@ -83,13 +89,13 @@
}
}
- public void exit() {
+ public void stepout() {
ProcessContext ctx = getProcessContext();
ctx.viewStack.pop();
}
- public void focus(long... points) {
+ public void focus() {
ProcessContext ctx = getProcessContext();
@@ -103,38 +109,50 @@
}
SketchImpl sketch = ctx.sketch;
- sketch.setBoundPart(bound, (points == null) ? null : BitUtil
- .bitsetOrArray(new OpenBitSet(), points));
+ sketch.setBoundPart(bound, ctx.objective);
+ ctx.objective = null;
OpenBitSet bs = sketch.focus();
-
- ctx.thisresult = bs;
+
+ ctx.objective = bs;
}
- public void tprism(long... traits) {
+ public void tprism() {
ProcessContext ctx = getProcessContext();
- OpenBitSet t = BitUtil.bitsetOrArray(new OpenBitSet(), traits);
-
- ctx.thisresult = ctx.sketch.tspectrum(t);
+ ctx.objective = ctx.sketch.tspectrum(ctx.objective);
}
public void tcomplementary() {
ProcessContext ctx = getProcessContext();
- ctx.thisresult = ctx.sketch.tcomplementary();
+ ctx.objective = ctx.sketch.tcomplementary();
}
public void roll(long roll) {
ProcessContext ctx = getProcessContext();
- ctx.thisresult = ctx.sketch.historical().rollHistory((int) roll);
+ ctx.objective = ctx.sketch.historical().rollHistory((int) roll);
+ }
+
+ public void clear() {
+
+ ProcessContext ctx = getProcessContext();
+ ctx.objective = null;
+ }
+
+ public void give(long... dots) {
+
+ ProcessContext ctx = getProcessContext();
+ ctx.objective = new OpenBitSet();
+
+ BitUtil.bitsetOrArray(ctx.objective, dots);
}
- public long where() {
+ public Mark mark() {
throw new UnsupportedOperationException();
}
@@ -142,7 +160,7 @@
public long[] read() {
ProcessContext ctx = getProcessContext();
- OpenBitSet r = ctx.thisresult;
+ OpenBitSet r = ctx.objective;
if (r == null || r.isEmpty())
return null;
@@ -157,7 +175,7 @@
public PointGroup readPointGroup() {
ProcessContext ctx = getProcessContext();
- OpenBitSet r = ctx.thisresult;
+ OpenBitSet r = ctx.objective;
return new BitSetPointIterator(r);
}
Modified: trunk/procilege/src/main/java/procilege/impl/ComputationalEntityMgr.java
==============================================================================
--- trunk/procilege/src/main/java/procilege/impl/ComputationalEntityMgr.java (original)
+++ trunk/procilege/src/main/java/procilege/impl/ComputationalEntityMgr.java Thu Jun 7 03:13:07 2007
@@ -6,11 +6,11 @@
import javax.xml.namespace.QName;
+import merisis.MerisisVM;
import merisis.contentcloud.ContentCloud;
import merisis.sense.SenseMaker;
import merisis.traitspace.AmbiguityException;
import merisis.traitspace.Morphism;
-import merisis.traitspace.MerisisVM;
import merisis.util.BitUtil;
import procilege.compiler.PalCompiler;
@@ -41,7 +41,7 @@
private ExprFormatter ftr;
@Inject
- private MerisisVM ts;
+ private MerisisVM mvm;
@Inject
private PalCompiler pal;
@@ -202,24 +202,25 @@
long subject = ((NameImpl) entity).nameId;
long predicate = smr.sense(new QName(PROPS_NS, property));
- ts.source(subject, predicate, namePropEntities);
- ts.focus();
- long[] onto = ts.read();
+ mvm.give(subject, predicate, namePropEntities);
+ mvm.source();
+ mvm.focus();
+ long[] onto = mvm.read();
long occurence = -1;
if (onto == null || onto.length == 0) {
- occurence = ts.occur(subject, predicate, namePropEntities);
+ occurence = mvm.occur(subject, predicate, namePropEntities);
} else if (onto.length == 1) {
occurence = onto[0];
} else if (onto.length > 0) {
- occurence = ts.occur(onto);
+ occurence = mvm.occur(onto);
}
long cid = cloud.occur(value);
- occurence = ts.occur(occurence, cid);
+ occurence = mvm.occur(occurence, cid);
if (logger.isLoggable(Level.FINEST)) {
logger.finest(String.format(
@@ -238,22 +239,24 @@
long predicate = smr.sense(new QName(PROPS_NS, property));
long[] onto;
- ts.zoomin(subject, predicate, namePropEntities);
+ mvm.give(subject, predicate, namePropEntities);
+ mvm.stepin();
try {
- ts.focus();
- onto = ts.read();
+ mvm.focus();
+ onto = mvm.read();
} finally {
- ts.exit();
+ mvm.stepout();
}
- ts.autobeam();
+ mvm.autobeam();
try {
// NOTICE: changes the souces instead of the focus.
- ts.tprism(subject, predicate, namePropEntities);
- ts.tcomplementary();
- onto = ts.read();
+ mvm.give(subject, predicate, namePropEntities);
+ mvm.tprism();
+ mvm.tcomplementary();
+ onto = mvm.read();
} finally {
- ts.exit();
+ mvm.stepout();
}
if (onto == null || onto.length == 0)
Modified: trunk/procilege/src/main/java/procilege/impl/DefaultProcilegeModule.java
==============================================================================
--- trunk/procilege/src/main/java/procilege/impl/DefaultProcilegeModule.java (original)
+++ trunk/procilege/src/main/java/procilege/impl/DefaultProcilegeModule.java Thu Jun 7 03:13:07 2007
@@ -1,11 +1,11 @@
package procilege.impl;
+import merisis.MerisisVM;
import merisis.contentcloud.ContentCloud;
import merisis.contentcloud.impl.ContentCloudImpl;
import merisis.sense.SenseMaker;
import merisis.sense.impl.SenseMakerImpl;
import merisis.traitspace.History;
-import merisis.traitspace.MerisisVM;
import merisis.traitspace.impl.MemoryHistoryImpl;
import merisis.traitspace.impl.TraitSpaceImpl;
import procilege.Procilege;
Modified: trunk/procilege/src/main/java/procilege/impl/PrivFormAnalysisImpl.java
==============================================================================
--- trunk/procilege/src/main/java/procilege/impl/PrivFormAnalysisImpl.java (original)
+++ trunk/procilege/src/main/java/procilege/impl/PrivFormAnalysisImpl.java Thu Jun 7 03:13:07 2007
@@ -7,7 +7,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-import merisis.traitspace.MerisisVM;
+import merisis.MerisisVM;
import org.apache.solr.util.OpenBitSet;
Modified: trunk/procilege/src/test/java/merisis/contentcloud/AbstractContentCloudTest.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/contentcloud/AbstractContentCloudTest.java (original)
+++ trunk/procilege/src/test/java/merisis/contentcloud/AbstractContentCloudTest.java Thu Jun 7 03:13:07 2007
@@ -4,16 +4,15 @@
import javax.xml.namespace.QName;
+import merisis.MerisisVM;
import merisis.sense.SenseMaker;
import merisis.traitspace.History;
-import merisis.traitspace.MerisisVM;
import merisis.util.BitUtil;
import org.apache.solr.util.OpenBitSet;
import org.junit.Before;
import procilege.impl.DefaultProcilegeModule;
-import procilege.impl.NameImpl;
import procilege.test.TestZero;
import com.google.inject.Guice;
@@ -29,7 +28,7 @@
protected ContentCloud cloud;
@Inject
- protected MerisisVM cvm;
+ protected MerisisVM mvm;
@Inject
protected History ht;
Modified: trunk/procilege/src/test/java/merisis/contentcloud/ContentCloudTest1.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/contentcloud/ContentCloudTest1.java (original)
+++ trunk/procilege/src/test/java/merisis/contentcloud/ContentCloudTest1.java Thu Jun 7 03:13:07 2007
@@ -25,27 +25,29 @@
// ////////////////////////////////////////////////////////////
/* Scene-1: The 'doc1' is created, of which the version is 1 */
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
long doc1 = cloud.occur("a"); // the doc1's content
assertEquals(7, doc1);
// the editor set the properties.
- occurrence = cvm.occur(doc1, nm("content-type"), nm("pdf"));
+ occurrence = mvm.occur(doc1, nm("content-type"), nm("pdf"));
assertEquals(8, occurrence);
// tom give it a tag
- occurrence = cvm.occur(doc1, cvm.occur(nm("tag"), nm("doc1")));
+ occurrence = mvm.occur(doc1, mvm.occur(nm("tag"), nm("doc1")));
assertEquals(10, occurrence);
} finally {
- cvm.exit();
+ mvm.stepout();
}
dumpHistory("** Scene-1 History **", 0, 40);
// /////////////////////////////////////////////////////////////
/* Scene-2: The 'doc1' is modified, of which the version is 2 */
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
long[] docs = findLatestPdfDocByLable(nm("doc1"));
Assert.assertNotNull(docs);
@@ -53,28 +55,30 @@
Assert.assertEquals(7L, doc1);
Assert.assertEquals("a", cloud.retrieve(doc1));
- cvm.zoomin(doc1);
+ mvm.give(doc1);
+ mvm.stepin();
try {
long doc = cloud.occur("ab");
assertEquals(11L, doc);
- occurrence = cvm.occur(doc, nm("content-type"), nm("pdf"));
+ occurrence = mvm.occur(doc, nm("content-type"), nm("pdf"));
assertEquals(12, occurrence);
} finally {
- cvm.exit();
+ mvm.stepout();
}
// the editor set the properties.
} finally {
- cvm.exit();
+ mvm.stepout();
}
dumpHistory("** Scene-2 History **", 0, 40);
// /////////////////////////////////////////////////////////////
/* Scene-3: The 'doc1' is modified, of which the version is 2 */
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
long[] docs = findLatestPdfDocByLable(nm("doc1"));
Assert.assertNotNull(docs);
@@ -82,24 +86,26 @@
Assert.assertEquals(11L, doc1);
Assert.assertEquals("ab", cloud.retrieve(doc1));
- cvm.zoomin(doc1);
+ mvm.give(doc1);
+ mvm.stepin();
try {
long doc = cloud.occur("abc"); // append char 'c'
assertEquals(13L, doc);
// The system describs the modification
- occurrence = cvm.occur(doc, nm("content-type"), nm("pdf"));
+ occurrence = mvm.occur(doc, nm("content-type"), nm("pdf"));
assertEquals(14, occurrence);
} finally {
- cvm.exit();
+ mvm.stepout();
}
} finally {
- cvm.exit();
+ mvm.stepout();
}
// /////////////////////////////////////////////////////////////
/* Scene-4: The 'doc1' is modified, of which the version is 2 */
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
long[] docs = findLatestPdfDocByLable(nm("doc1"));
Assert.assertNotNull(docs);
@@ -107,20 +113,22 @@
Assert.assertEquals(13L, doc1);
Assert.assertEquals("abc", cloud.retrieve(doc1));
- cvm.zoomin(doc1);
+ mvm.give(doc1);
+ mvm.stepin();
try {
// tom gives the doc a tag 'doc1-1.0'
- occurrence = cvm.occur(doc1, cvm.occur(nm("tag"),
+ occurrence = mvm.occur(doc1, mvm.occur(nm("tag"),
nm("doc1-1.0")));
assertEquals(16, occurrence);
} finally {
- cvm.exit();
+ mvm.stepout();
}
} finally {
- cvm.exit();
+ mvm.stepout();
}
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
long[] docs = findLatestPdfDocByLable(nm("doc1"));
Assert.assertNotNull(docs);
@@ -132,26 +140,29 @@
doc1 = docs[0];
Assert.assertEquals(13L, doc1);
} finally {
- cvm.exit();
+ mvm.stepout();
}
- cvm.zoomin(nm("tom"));
+ mvm.give(nm("tom"));
+ mvm.stepin();
try {
Assert.assertEquals(7L, findExactPdfDocByLable(nm("doc1")));
Assert.assertEquals(13L, findExactPdfDocByLable(nm("doc1-1.0")));
} finally {
- cvm.exit();
+ mvm.stepout();
}
}
private long[] findLatestPdfDocByLable(long lbl) {
- cvm.source(nm("tag"), lbl);
- cvm.focus();
- cvm.tprism(lbl, nm("tag"));
- cvm.tcomplementary();
+ mvm.give(nm("tag"), lbl);
+ mvm.source();
+ mvm.focus();
+ mvm.give(lbl, nm("tag"));
+ mvm.tprism();
+ mvm.tcomplementary();
- long[] prop1 = cvm.read();
+ long[] prop1 = mvm.read();
Assert.assertNotNull(prop1);
logger.fine("tag spectrum:" + BitUtil.toString(prop1));
@@ -159,11 +170,13 @@
OpenBitSet bs = new OpenBitSet();
for (int i = 0; i < prop1.length; i++) {
- cvm.source(prop1[i], nm("content-type"), nm("pdf"));
- cvm.focus();
- cvm.tprism(nm("pdf"), nm("content-type"));
- cvm.tcomplementary();
- long[] prop2 = cvm.read();
+ mvm.give(prop1[i], nm("content-type"), nm("pdf"));
+ mvm.source();
+ mvm.focus();
+ mvm.give(nm("pdf"), nm("content-type"));
+ mvm.tprism();
+ mvm.tcomplementary();
+ long[] prop2 = mvm.read();
if (prop2 == null)
continue;
@@ -178,13 +191,15 @@
}
private long findExactPdfDocByLable(long lbl) {
+
+ mvm.give(nm("tag"), lbl);
+ mvm.source();
+ mvm.focus();
+ mvm.give(lbl, nm("tag"));
+ mvm.tprism();
+ mvm.tcomplementary();
- cvm.source(nm("tag"), lbl);
- cvm.focus();
- cvm.tprism(lbl, nm("tag"));
- cvm.tcomplementary();
-
- long[] prop1 = cvm.read();
+ long[] prop1 = mvm.read();
Assert.assertNotNull(prop1);
logger.fine("tag spectrum:" + BitUtil.toString(prop1));
@@ -192,11 +207,13 @@
OpenBitSet bs = new OpenBitSet();
for (int i = 0; i < prop1.length; i++) {
- cvm.source(prop1[i], nm("content-type"), nm("pdf"));
- cvm.focus();
- cvm.tprism(nm("pdf"), nm("content-type"));
- cvm.tcomplementary();
- long[] prop2 = cvm.read();
+ mvm.give(prop1[i], nm("content-type"), nm("pdf"));
+ mvm.source();
+ mvm.focus();
+ mvm.give(nm("pdf"), nm("content-type"));
+ mvm.tprism();
+ mvm.tcomplementary();
+ long[] prop2 = mvm.read();
if (prop2 == null)
continue;
Modified: trunk/procilege/src/test/java/merisis/traitspace/AbstractTraitSpaceTest.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/AbstractTraitSpaceTest.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/AbstractTraitSpaceTest.java Thu Jun 7 03:13:07 2007
@@ -7,6 +7,7 @@
import javax.xml.namespace.QName;
import junit.framework.Assert;
+import merisis.MerisisVM;
import merisis.sense.SenseMaker;
import merisis.util.BitUtil;
Modified: trunk/procilege/src/test/java/merisis/traitspace/MorphismIsaTest.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/MorphismIsaTest.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/MorphismIsaTest.java Thu Jun 7 03:13:07 2007
@@ -25,7 +25,8 @@
long isa = n("isa");
- mvm.zoomin(n("T0"));
+ mvm.give(n("T0"));
+ mvm.stepin();
try {
mp.set(isa, n("a"), n("b"));
mp.set(isa, n("b"), n("c"));
@@ -44,7 +45,7 @@
Assert.assertFalse(mp.exists(isa, n("b"), n("b")));
Assert.assertFalse(mp.exists(isa, n("c"), n("c")));
} finally {
- mvm.exit();
+ mvm.stepout();
}
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/MorphismTest1.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/MorphismTest1.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/MorphismTest1.java Thu Jun 7 03:13:07 2007
@@ -32,7 +32,8 @@
ht.emerge(n("T0"), n("e"));
ht.emerge(n("T0"), n("f"));
- mvm.zoomin(n("T0"));
+ mvm.give(n("T0"));
+ mvm.stepin();
try {
mp.set(n("f1"), n("a"), n("d"));
mp.set(n("f1"), n("b"), n("d"));
@@ -70,7 +71,7 @@
.domain(n("f1"), n("f"), true));
} finally {
- mvm.exit();
+ mvm.stepout();
}
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch1Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch1Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch1Test.java Thu Jun 7 03:13:07 2007
@@ -12,56 +12,80 @@
ht.emerge(1, 2);
ht.emerge(1, 3);
- mvm.source(1);
- mvm.focus(2);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(2);
- mvm.focus(1);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(1);
+ mvm.focus();
assertSetEquals(null, mvm.read());
- mvm.source(3);
- mvm.focus(1);
+ mvm.give(3);
+ mvm.source();
+ mvm.give(1);
+ mvm.focus();
assertNull(mvm.read());
- mvm.source(2, 3);
- mvm.focus(1);
+ mvm.give(2,3);
+ mvm.source();
+ mvm.give(1);
+ mvm.focus();
assertNull(mvm.read());
- mvm.source(1, 3);
- mvm.focus(3);
+ mvm.give(1,3);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
- mvm.source(1, 3);
- mvm.focus(null);
+ mvm.give(1,3);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
- mvm.source(1, 3);
- mvm.focus(2);
+ mvm.give(1,3);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertNull(mvm.read());
- mvm.source(1);
- mvm.focus(1);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(1);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(1);
- mvm.focus(null);
+ mvm.give(1);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(2, 3), mvm.read());
- mvm.source(2);
- mvm.focus(2);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(3);
- mvm.focus(3);
+ mvm.give(3);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
- mvm.source(2);
- mvm.focus(3);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertNull(mvm.read());
-
- mvm.source(3);
- mvm.focus(2);
+
+ mvm.give(3);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertNull(mvm.read());
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch2Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch2Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch2Test.java Thu Jun 7 03:13:07 2007
@@ -13,36 +13,51 @@
ht.emerge(1, 2);
ht.emerge(2, 3);
- mvm.source(10);
- mvm.focus(null);
+ mvm.give(10);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
- mvm.source(10);
- mvm.focus(1);
+ mvm.give(10);
+ mvm.source();
+ mvm.give(1);
+ mvm.focus();
assertSetEquals(ay(10), mvm.read());
- mvm.source(10);
- mvm.focus(2);
+ mvm.give(10);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(10);
- mvm.focus(3);
+ mvm.give(10);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(1);
- mvm.focus(3);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(10, 1);
- mvm.focus(3);
+ mvm.give(10, 1);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(1);
- mvm.focus(3);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(2);
- mvm.focus(2);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch3Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch3Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch3Test.java Thu Jun 7 03:13:07 2007
@@ -15,28 +15,37 @@
ht.emerge(1, 2);
ht.emerge(1, 3);
- mvm.source(10);
- mvm.focus(null);
+ mvm.give(10);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(2, 3), mvm.read());
- mvm.source(10, 20);
- mvm.focus(null);
+ mvm.give(10,20);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(2, 3), mvm.read());
- mvm.source(10);
- mvm.focus(3);
+ mvm.give(10);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(10,1);
- mvm.focus(3);
+ mvm.give(10,1);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(10,1);
- mvm.focus(null);
+ mvm.give(10,1);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(2,3), mvm.read());
- mvm.source(10, 20);
- mvm.focus(2,3);
+ mvm.give(10,20);
+ mvm.source();
+ mvm.give(2,3);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch4Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch4Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch4Test.java Thu Jun 7 03:13:07 2007
@@ -12,20 +12,27 @@
ht.emerge(1, 2);
ht.emerge(3, 2);
- mvm.source(1,2);
- mvm.focus(null);
+ mvm.give(1,2);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(1,2);
- mvm.focus(2);
+ mvm.give(1,2);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(1);
- mvm.focus(2);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(1), mvm.read());
- mvm.source(3);
- mvm.focus(2);
+ mvm.give(3);
+ mvm.source();
+ mvm.give(2);
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
}
@@ -36,24 +43,33 @@
ht.emerge(4, 5);
ht.emerge(5, 6);
- mvm.source(4);
- mvm.focus(null);
+ mvm.give(4);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(6), mvm.read());
- mvm.source(4);
- mvm.focus(6);
+ mvm.give(4);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(5), mvm.read());
- mvm.source(4);
- mvm.focus(5);
+ mvm.give(4);
+ mvm.source();
+ mvm.give(5);
+ mvm.focus();
assertSetEquals(ay(4), mvm.read());
- mvm.source(5);
- mvm.focus(6);
+ mvm.give(5);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(5), mvm.read());
- mvm.source(5);
- mvm.focus(5);
+ mvm.give(5);
+ mvm.source();
+ mvm.give(5);
+ mvm.focus();
assertSetEquals(ay(5), mvm.read());
}
@@ -66,42 +82,55 @@
ht.emerge(14, 13);
ht.emerge(13, 12);
- mvm.source(10);
- mvm.focus(null);
+ mvm.give(10);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(12), mvm.read());
mvm.roll(1);
assertSetEquals(ay(11), mvm.read());
- mvm.source(14);
- mvm.focus(null);
+ mvm.give(14);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(12), mvm.read());
mvm.roll(1);
assertSetEquals(ay(13), mvm.read());
- mvm.source(10, 14);
- mvm.focus(null);
+ mvm.give(10,14);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(12), mvm.read());
mvm.roll(1);
assertSetEquals(null, mvm.read());
- mvm.source(10, 14);
- mvm.focus(12);
+ mvm.give(10,14);
+ mvm.source();
+ mvm.give(12);
+ mvm.focus();
assertSetEquals(ay(12), mvm.read());
- mvm.source(10);
- mvm.focus(12);
+ mvm.give(10);
+ mvm.source();
+ mvm.give(12);
+ mvm.focus();
assertSetEquals(ay(11), mvm.read());
- mvm.source(14);
- mvm.focus(12);
+ mvm.give(14);
+ mvm.source();
+ mvm.give(12);
+ mvm.focus();
assertSetEquals(ay(13), mvm.read());
- mvm.source(12);
- mvm.focus(12);
+ mvm.give(12);
+ mvm.source();
+ mvm.give(12);
+ mvm.focus();
assertSetEquals(ay(12), mvm.read());
- mvm.source(11);
- mvm.focus(11);
+ mvm.give(11);
+ mvm.source();
+ mvm.give(11);
+ mvm.focus();
assertSetEquals(ay(11), mvm.read());
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch5Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch5Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch5Test.java Thu Jun 7 03:13:07 2007
@@ -20,32 +20,44 @@
ht.emerge(6, 8);
ht.emerge(7, 8);
- mvm.source(1);
- mvm.focus(null);
+ mvm.give(1);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(8), mvm.read());
- mvm.source(1);
- mvm.focus(3);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(3);
+ mvm.focus();
assertSetEquals(ay(2, 4), mvm.read());
- mvm.source(2);
- mvm.focus(null);
+ mvm.give(2);
+ mvm.source();
+ mvm.focus();
assertSetEquals(ay(8), mvm.read());
- mvm.source(2);
- mvm.focus(8);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(8);
+ mvm.focus();
assertSetEquals(ay(6, 7), mvm.read());
- mvm.source(2);
- mvm.focus(7);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(7);
+ mvm.focus();
assertSetEquals(ay(5), mvm.read());
- mvm.source(2);
- mvm.focus(3, 7);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(3,7);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(2);
- mvm.focus(6);
+ mvm.give(2);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(3), mvm.read());
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch6Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch6Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch6Test.java Thu Jun 7 03:13:07 2007
@@ -21,29 +21,41 @@
ht.emerge(3, 5);
ht.emerge(5, 7);
ht.emerge(8, 7);
-
- mvm.source(9, 1);
+
+ mvm.give(9, 1);
+ mvm.source();
mvm.focus();
assertSetEquals(ay(6, 7), mvm.read());
- mvm.source(9);
- mvm.focus(6);
+ logger.info("---");
+ mvm.give(9);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(3, 4), mvm.read());
- mvm.source(4,1);
- mvm.focus(6);
+ mvm.give(4, 1);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(4), mvm.read());
- mvm.source(3,1);
- mvm.focus(6);
+ mvm.give(3, 1);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(6), mvm.read());
- mvm.source(9);
- mvm.focus(4);
+ mvm.give(9);
+ mvm.source();
+ mvm.give(4);
+ mvm.focus();
assertSetEquals(ay(2), mvm.read());
- mvm.source(1);
- mvm.focus(6);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(6);
+ mvm.focus();
assertSetEquals(ay(4), mvm.read());
}
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Sketch7Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Sketch7Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Sketch7Test.java Thu Jun 7 03:13:07 2007
@@ -34,8 +34,10 @@
// different with the case 1.
ht.emerge(6, 5);
- mvm.source(1);
- mvm.focus(11);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(11);
+ mvm.focus();
mvm.roll(0);
assertSetEquals(ay(7, 9), mvm.read());
mvm.roll(1);
@@ -78,8 +80,10 @@
// different with the case 1.
ht.emerge(5, 6);
- mvm.source(1);
- mvm.focus(11);
+ mvm.give(1);
+ mvm.source();
+ mvm.give(11);
+ mvm.focus();
assertSetEquals(ay(7, 9), mvm.read());
mvm.roll(1);
assertSetEquals(ay(6), mvm.read());
@@ -119,11 +123,13 @@
ht.emerge(5, 6);
- mvm.source(1);
+ mvm.give(1);
+ mvm.source();
mvm.focus();
assertSetEquals(ay(13), mvm.read());
- mvm.source(3, 4);
+ mvm.give(3,4);
+ mvm.source();
mvm.focus();
assertSetEquals(ay(13), mvm.read());
}
Modified: trunk/procilege/src/test/java/merisis/traitspace/Spectrum1Test.java
==============================================================================
--- trunk/procilege/src/test/java/merisis/traitspace/Spectrum1Test.java (original)
+++ trunk/procilege/src/test/java/merisis/traitspace/Spectrum1Test.java Thu Jun 7 03:13:07 2007
@@ -11,7 +11,7 @@
ht.emerge(2, 6);
ht.emerge(2, 7);
ht.emerge(3, 10);
-
+
ht.emerge(6, 8);
ht.emerge(8, 9);
ht.emerge(7, 10);
@@ -19,23 +19,28 @@
ht.emerge(4, 5);
ht.emerge(4, 7);
ht.emerge(5, 8);
-
+
ht.emerge(9, 11);
ht.emerge(10, 11);
- mvm.source(1,2);
+ mvm.give(1, 2);
+ mvm.source();
mvm.focus();
assertSetEquals(ay(11), mvm.read());
- mvm.tprism(4);
- assertSetEquals(ay(7,8), mvm.read());
-
+ mvm.give(4);
+ mvm.tprism();
+ assertSetEquals(ay(7, 8), mvm.read());
+
mvm.tcomplementary();
assertSetEquals(null, mvm.read());
-
- mvm.source(1,2);
- mvm.focus(11);
+
+ mvm.give(1, 2);
+ mvm.source();
+ mvm.give(11);
+ mvm.focus();
assertSetEquals(ay(9), mvm.read());
- mvm.tprism(4);
+ mvm.give(4);
+ mvm.tprism();
assertSetEquals(ay(8), mvm.read());
mvm.tcomplementary();
assertSetEquals(ay(1), mvm.read());
Modified: trunk/procilege/src/test/java/procilege/test/TestZero.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/TestZero.java (original)
+++ trunk/procilege/src/test/java/procilege/test/TestZero.java Thu Jun 7 03:13:07 2007
@@ -9,9 +9,9 @@
import javax.xml.namespace.QName;
+import merisis.MerisisVM;
import merisis.contentcloud.ContentCloud;
import merisis.sense.SenseMaker;
-import merisis.traitspace.MerisisVM;
import procilege.Procilege;
import procilege.compiler.PalCompiler;
Modified: trunk/procilege/src/test/java/procilege/test/pal/AbstractPalTest.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/AbstractPalTest.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/AbstractPalTest.java Thu Jun 7 03:13:07 2007
@@ -4,9 +4,9 @@
import javax.xml.namespace.QName;
+import merisis.MerisisVM;
import merisis.sense.SenseMaker;
import merisis.traitspace.History;
-import merisis.traitspace.MerisisVM;
import merisis.util.BitUtil;
import org.apache.solr.util.OpenBitSet;
Modified: trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest1.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest1.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest1.java Thu Jun 7 03:13:07 2007
@@ -16,7 +16,8 @@
@Test
public void test1() {
- mvm.zoomin(nm("testcase"));
+ mvm.give(nm("testcase"));
+ mvm.stepin();
def(nn("p1"), pvm(nn("a")));
dumpHistory(0, 30);
Modified: trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest2.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest2.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/ComputationalEntityMgrTest2.java Thu Jun 7 03:13:07 2007
@@ -21,7 +21,8 @@
@Test
public void test1() {
- mvm.zoomin(nm("testcase"));
+ mvm.give(nm("testcase"));
+ mvm.stepin();
def(nn("p1"), pvm(nn("a")));
dumpHistory(0, 30);
Modified: trunk/procilege/src/test/java/procilege/test/pal/EntityIsATest1.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/EntityIsATest1.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/EntityIsATest1.java Thu Jun 7 03:13:07 2007
@@ -21,11 +21,12 @@
@Test
public void test1() {
- mvm.zoomin(nm("T0"));
+ mvm.give(nm("T0"));
+ mvm.stepin();
try {
} finally {
- mvm.exit();
+ mvm.stepout();
}
Modified: trunk/procilege/src/test/java/procilege/test/pal/EntityPropertyTest1.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/EntityPropertyTest1.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/EntityPropertyTest1.java Thu Jun 7 03:13:07 2007
@@ -9,7 +9,8 @@
@Test
public void test() {
- mvm.zoomin(nm("T0"));
+ mvm.give(nm("T0"));
+ mvm.stepin();
try {
cem.setEntityProperty(nn("d1"), "title", "MyTitle1");
@@ -30,7 +31,7 @@
assertEquals("2004", cem.getEntityProperty(nn("d2"), "year"));
assertEquals("2007", cem.getEntityProperty(nn("d1"), "year"));
} finally {
- mvm.exit();
+ mvm.stepout();
}
}
}
Modified: trunk/procilege/src/test/java/procilege/test/pal/RecursivePrivilegeTest.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/pal/RecursivePrivilegeTest.java (original)
+++ trunk/procilege/src/test/java/procilege/test/pal/RecursivePrivilegeTest.java Thu Jun 7 03:13:07 2007
@@ -12,7 +12,7 @@
@Test
public void norm() {
- mvm.zoomin(nm("TT"));
+ mvm.give(nm("TT"));
try {
PrivExprComposition pfexpr;
@@ -47,7 +47,7 @@
assertTrue(z.available(z.ln("q")));
} finally {
- mvm.exit();
+ mvm.stepout();
}
}
}
Modified: trunk/procilege/src/test/java/procilege/test/simplecase/SimpleCaseTest.java
==============================================================================
--- trunk/procilege/src/test/java/procilege/test/simplecase/SimpleCaseTest.java (original)
+++ trunk/procilege/src/test/java/procilege/test/simplecase/SimpleCaseTest.java Thu Jun 7 03:13:07 2007
@@ -22,7 +22,8 @@
@Test
public void playWithoutSubstitution() {
- mvm.zoomin(nm("tc"));
+ mvm.give(nm("tc"));
+ mvm.stepin();
try {
tell("let dtn1 is dnotes");
@@ -66,7 +67,7 @@
z.tell("let usr1 is manager");
assertTrue(pfa.available(pfa.privform(z.ln("guard"))));
} finally {
- mvm.exit();
+ mvm.stepout();
}
}