blob: 4d1760f19b6023f641b4706c976fcbaa24414c99 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Akos Horvath, Gergely Varro - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.Vector;
import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.ExecutionEnvironment;
import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoal;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoalIncremental;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.Rule;
import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
public class PatternNodeIncremental extends PatternNode {
public PatternNodeIncremental(PatternMatcherWrapper patternMatcher,
BodyNode parent, GTPatternCall call)
throws PatternMatcherCompileTimeException {
super(parent, call);
this.patternMatcher = patternMatcher;
this.children = new BodyNode[0];
}
/*public PatternNodeIncremental(PatternMatcherWrapper patternMatcher,
GTPattern pattern) throws PatternMatcherCompileTimeException {
super(patternMatcher, pattern);
String[] context = {pattern.getName()};
throw new PatternMatcherCompileTimeException(
PatternMatcherErrorStrings.INTERNAL_INCREMENTAL_PATTERNNODE_ROOT
,context
,pattern);
}*/
@Override
public RemoteGoal buildRuleGoalGraph(Boolean[] adornment,
Map<String, RemoteGoal> rggRoots) throws PatternMatcherRuntimeException {
RemoteGoal result = new RemoteGoalIncremental(this, adornment,patternMatcher);
rggRoots.put(RemoteGoal.generateID(this, adornment), result);
return result;
}
protected PatternNode causesRecursion(GTPattern patternToTest) {
return null;
}
@Override
protected boolean traverse(PatternVariantIterator token) {
return false;
}
public Iterator<List<IFlattenedPatternElement>> iterator() {
return null;
}
}