@@ -0,0 +1,1841 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Eric Bodden - initial API%0A * Mateusz Parzonka - adapted API%0A */%0Apackage prm4j.indexing;%0A%0A%0A/**%0A * An indexing strategy has the single purpose of dispatching a parametric event, represented by instances of the type%0A * %7B@link Event%7D, to all monitors corresponding to compatible variable bindings.%0A *%0A * For example, consider an event with a binding %7Ba=a1,b=b1%7D where a1 and b1 are concrete objects. Also assume that%0A * there are monitor instances for the bindings %7B%7D, %7Ba=a1%7D, and %7Ba=a1,b=b2%7D. The indexing algorithm will dispatch the%0A * event to both %7B%7D, %7Ba=a1%7D but not to %7Ba=a1,b=b2%7D because the latter binding conflicts on variable b: the event binds b%0A * to b1 while the monitor binds it to b2. When the event is dispatched to %7B%7D and %7Ba=a1%7D, this will progress these%0A * monitors' states and the new states will be stored for the binding %7Ba=a1,b=b1%7D.%0A *%0A * Indexing is tricky to get both correct and efficient. Therefore there can be multiple different indexing strategies.%0A * However, they all should be equivalent with respect to their externally visible behavior.%0A *%0A * @param %3CA%3E%0A *            the type of the auxiliary data usable by base monitors%0A */%0Apublic interface IndexingStrategy%3CA%3E %7B%0A%0A    /**%0A     * Update the internal state of all related monitors by sending the parameter event to the respective monitors.%0A     *%0A     * @param symbol%0A     *            The symbol of the event.%0A     * @param binding%0A     *            The variable binding at this event.%0A     */%0A    void processEvent(Event%3CA%3E event);%0A%0A%7D%0A

Add interface for indexing strategies