Initial AMP Contribution per CQ 3295.
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.classpath b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.project b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.project
new file mode 100644
index 0000000..1f8b715
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.amp.axf.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/META-INF/MANIFEST.MF b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bec0306
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.amp.axf.core
+Bundle-Version: 0.2.0.qualifier
+Bundle-Activator: org.eclipse.amp.axf.core.ModelExecutionEnginePlugin
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.amp.axf.core
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/build.properties b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/build.properties
new file mode 100644
index 0000000..34d2e4d
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/plugin.properties b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/plugin.properties
new file mode 100644
index 0000000..16c3e36
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/plugin.properties
@@ -0,0 +1,32 @@
+# /**

+#  * <copyright>

+#  *

+#  * Copyright (c) 2009 Metascape, LLC.

+#  * 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: 

+#  *   Metascape - Initial API and Implementation

+#  *

+#  * </copyright>

+#  *

+#  * $Id: plugin.properties

+#  */

+

+

+# ====================================================================

+# To code developer:

+#   Do NOT change the properties between this line and the

+#   "%%% END OF TRANSLATED PROPERTIES %%%" line.

+#   Make a new property name, append to the end of the file and change

+#   the code to use the new property.

+# ====================================================================

+

+# ====================================================================

+# %%% END OF TRANSLATED PROPERTIES %%%

+# ====================================================================

+

+pluginName = Agent Execution Engine Core

+providerName = Eclipse.org

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/AbstractLifecycleListener.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/AbstractLifecycleListener.java
new file mode 100644
index 0000000..a006838
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/AbstractLifecycleListener.java
@@ -0,0 +1,141 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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: 

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+*/

+package org.eclipse.amp.axf.core;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The listener interface for receiving abstractModel events. The class that is interested in processing a abstractModel

+ * event implements this interface, and the object created with that class is registered with a component using the

+ * component's <code>addAbstractModelListener<code> method. When

+ * the abstractModel event occurs, that object's appropriate

+ * method is invoked.

+ * 

+ * @see AbstractModelEvent

+ */

+public class AbstractLifecycleListener implements ILifeCycleListener {

+

+    private String name;

+

+    private IStateListener listener;

+

+    /**

+     * Instantiates a new abstract model listener.

+     */

+    public AbstractLifecycleListener() {

+        listener = new LifecycleObservationAdapter(this);

+    }

+

+    /**

+     * Instantiates a new abstract model listener.

+     * 

+     * @param name the name

+     */

+    public AbstractLifecycleListener(String name) {

+        this();

+        this.name = name;

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observationEnd(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observationEnd(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observationEnding(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observationEnding(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observeCreate(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observeCreate(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observeInitialize(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observeInitialize(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observeStart(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observeStart(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observeStop(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observeStop(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observeUpdate(IObservationProvider observed) {

+    }

+

+    /**

+     * @param observed

+     * @see org.eclipse.amp.axf.core.ILifeCycleListener#observing(org.eclipse.amp.axf.core.IObservationProvider)

+     */

+    public void observing(IObservationProvider observed) {

+    }

+

+    /**

+     * @param key

+     * @param updated

+     * @see org.eclipse.amp.axf.core.IStateListener#stateChange(java.lang.Object, java.lang.Object)

+     */

+    public void stateChange(Object key, Object updated) {

+        listener.stateChange(key, updated);

+    }

+

+    /**

+     * Gets the name.

+     * 

+     * @return the name

+     */

+    public String getName() {

+        return name;

+    }

+

+    /**

+     * Sets the name.

+     * 

+     * @param name the new name

+     */

+    public void setName(String name) {

+        this.name = name;

+    }

+

+    /**

+     * @return

+     * @see java.lang.Object#toString()

+     */

+    public String toString() {

+        return name;

+    }

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/EngineControl.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/EngineControl.java
new file mode 100644
index 0000000..bc7d62e
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/EngineControl.java
@@ -0,0 +1,23 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+package org.eclipse.amp.axf.core;

+

+/**

+ * The Enum EngineControl.

+ */

+public enum EngineControl {

+    OPEN, START, RESTART, STEP, PAUSE, RESUME, STOP, SAVE, CLOSE

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ICompositionProvider.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ICompositionProvider.java
new file mode 100644
index 0000000..18f3f43
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ICompositionProvider.java
@@ -0,0 +1,71 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+package org.eclipse.amp.axf.core;

+

+import java.util.List;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The Interface IMemberProvider.

+ */

+public interface ICompositionProvider {

+

+    /**

+     * Gets the iteratable.

+     * 

+     * @param hasIterable the has iterable

+     * 

+     * @return the iteratable

+     */

+    public Iterable getIteratable(Object hasIterable);

+

+    /**

+     * Gets the list.

+     * 

+     * @param hasIterable the has iterable

+     * 

+     * @return the list

+     */

+    public List getList(Object hasIterable);

+

+    /**

+     * Checks if is mutable.

+     * 

+     * @param hasIterable the has iterable

+     * 

+     * @return true, if is mutable

+     */

+    public boolean isMutable(Object hasIterable);

+

+    /**

+     * Gets the list.

+     * 

+     * @param hasIterable the has iterable

+     * 

+     * @return the list

+     */

+    public boolean isChildrenComposition(Object member);

+

+    /**

+     * Gets the list.

+     * 

+     * @param hasIterable the has iterable

+     * 

+     * @return the list

+     */

+    public Object getParent(Object member);

+

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IEngine.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IEngine.java
new file mode 100644
index 0000000..e584895
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IEngine.java
@@ -0,0 +1,102 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+package org.eclipse.amp.axf.core;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The Interface IEngine.

+ */

+public interface IEngine {

+

+    /**

+     * Close.

+     */

+    void close();

+

+    /**

+     * Close finally.

+     */

+    void closeFinally();

+

+    /**

+     * Checks if is close requested.

+     * 

+     * @return true, if is close requested

+     */

+    boolean isCloseRequested();

+

+    /**

+     * Gets the model thread.

+     * 

+     * @return the model thread

+     */

+    Thread getModelThread();

+

+    /**

+     * Checks if is running.

+     * 

+     * @return true, if is running

+     */

+    boolean isRunning();

+

+    /**

+     * Checks if is paused.

+     * 

+     * @return true, if is paused

+     */

+    boolean isPaused();

+

+    /**

+     * Stop.

+     */

+    void stop();

+

+    /**

+     * Control.

+     * 

+     * @param ModelControl the model control

+     */

+    void control(EngineControl ModelControl);

+

+    /**

+     * Observation complete.

+     * 

+     * @param observer the observer

+     */

+    void observationComplete(ILifeCycleListener observer);

+

+    /**

+     * Gets the model.

+     * 

+     * @return the model

+     */

+    IObservationProvider getModel();

+

+    /**

+     * Sets the update granularity. This defines how often observers expect to receive state change notifications.

+     * Regardless of this value, engines should always provide life-cycle notifications.

+     * 

+     * @param granularity the desired update granularity (engine specific).

+     */

+    void setUpdateGranularity(ITimeGranularity granularity);

+

+    /**

+     * Returns the update granularity.

+     * 

+     * @param granularity the desired update granularity (engine specific).

+     */

+    ITimeGranularity getUpdateGranularity();

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ILifeCycleListener.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ILifeCycleListener.java
new file mode 100644
index 0000000..ccda033
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ILifeCycleListener.java
@@ -0,0 +1,92 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.core;
+
+// TODO: Auto-generated Javadoc
+/**
+ * An observer (listener) for any model component. For performance reasons, observers typically monitor the overall
+ * model, but they might also observe other model components such as sub-models or even individual agents.
+ * 
+ * @author milesparker
+ */
+public interface ILifeCycleListener extends IStateListener {
+
+    /**
+     * Notifies that the model is now aware of this observer. Note that models may defer addition of listeners so a
+     * listener adding itself to a model should not assume that it has actually been added until this notification has
+     * occurred.
+     * 
+     * @param observed the observed
+     */
+    public void observing(IObservationProvider observed);
+
+
+    /**
+     * Notifies that the model has been instantiated but has not yet been initialized. At this point it is appropriate
+     * to update settings and parameterizations.
+     * 
+     * @param observed the model event
+     */
+    public void observeCreate(IObservationProvider observed);
+
+    /**
+     * Notifies that the model's initial state has been reached.
+     * 
+     * @param observed the observed
+     */
+    public void observeInitialize(IObservationProvider observed);
+
+    /**
+     * Notifies that the model is just starting execution.
+     * 
+     * @param observed the model event
+     */
+    public void observeStart(IObservationProvider observed);
+
+    /**
+     * Notifies that the model has completed one period of execution at the appropriate level of granularity. Currently
+     * this is always once every period but that will change when more control of update granularity is introduced.
+     * 
+     * @param observed the model event
+     */
+    public void observeUpdate(IObservationProvider observed);
+
+    /**
+     * Notifies that the model has stopped execution. This does not imply that the model is dead, simply that it will no
+     * longer be executing within the context of the life-cycle. In particular, a model may be re-initialized and
+     * re-started.
+     * 
+     * @param observed the model event
+     */
+    public void observeStop(IObservationProvider observed);
+
+    /**
+     * Notifies that the model is about to be closed. The model should still be available for observation at this point.
+     * 
+     * @param observed the model event
+     */
+    public void observationEnding(IObservationProvider observed);
+
+    /**
+     * Notifies that the model is no longer providing observations. Typically it has been disposed at this point.
+     * 
+     * @param observed the model removed event
+     * 
+     * @see modelAdded
+     */
+    public void observationEnd(IObservationProvider observed);
+
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IModel.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IModel.java
new file mode 100644
index 0000000..afc64c4
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IModel.java
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.core;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IModel.
+ */
+public interface IModel extends IObservationProvider {
+
+	/**
+     * Gets the time description.
+     * 
+     * @return the time description
+     */
+	String getTimeDescription();
+    
+    /**
+     * Gets the engine.
+     * 
+     * @return the engine
+     */
+    IEngine getEngine();
+    
+    /**
+     * Gets the name.
+     * 
+     * @return the name
+     */
+    String getName();
+    
+    /**
+     * Gets the period.
+     * 
+     * @return the period
+     */
+    int getPeriod();
+    
+    /**
+     * Gets the stop period.
+     * 
+     * @return the stop period
+     */
+    int getStopPeriod();
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IObservationProvider.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IObservationProvider.java
new file mode 100644
index 0000000..968678b
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IObservationProvider.java
@@ -0,0 +1,53 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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: 

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+*/

+package org.eclipse.amp.axf.core;

+

+import java.util.Collection;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The Interface IObservationProvider.

+ */

+public interface IObservationProvider {

+

+    /**

+     * Adds the model listener.

+     * 

+     * @param listener the listener

+     */

+    public abstract void addModelListener(ILifeCycleListener listener);

+

+    /**

+     * Gets the model listeners.

+     * 

+     * @return the model listeners

+     */

+    public abstract Collection<ILifeCycleListener> getModelListeners();

+

+    /**

+     * Removes the model listener.

+     * 

+     * @param view the view

+     */

+    public abstract void removeModelListener(ILifeCycleListener view);

+

+    /**

+     * Checks if is initialized.

+     * 

+     * @return true, if is initialized

+     */

+    public abstract boolean isInitialized();

+}
\ No newline at end of file
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IStateListener.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IStateListener.java
new file mode 100644
index 0000000..8c068b0
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/IStateListener.java
@@ -0,0 +1,37 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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: 

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+*/

+package org.eclipse.amp.axf.core;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The listener interface for receiving IState events. The class that is interested in processing a IState event

+ * implements this interface, and the object created with that class is registered with a component using the

+ * component's <code>addIStateListener<code> method. When

+ * the IState event occurs, that object's appropriate

+ * method is invoked.

+ * 

+ * @see IStateEvent

+ */

+public interface IStateListener {

+

+    /**

+     * Notifies that the model has had some kind of state or observation status change.

+     * 

+     * @param key the key

+     * @param updated the updated

+     */

+    public void stateChange(Object key, Object updated);

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ITimeGranularity.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ITimeGranularity.java
new file mode 100644
index 0000000..3dbfe73
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ITimeGranularity.java
@@ -0,0 +1,32 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+

+package org.eclipse.amp.axf.core;

+

+/**

+ * A marker interface for levels of update granularity. These are designed to be extensible for particular engine

+ * implementations. Note that granularity can (and will) be used to define more sophisticated granularities. For

+ * example, engines could be defined to update for each state change within an agent, each set of changes for an agent,

+ * or for each complete iteration of the entire model.

+ * 

+ * @see TimeGranularityImpl for an example of how the default granularities are defined.

+ * 

+ * @author mparker

+ * 

+ */

+public interface ITimeGranularity {

+

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifeCycleState.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifeCycleState.java
new file mode 100644
index 0000000..30f50c0
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifeCycleState.java
@@ -0,0 +1,23 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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: 

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+*/

+package org.eclipse.amp.axf.core;

+

+/**

+ * The Enum LifeCycleState.

+ */

+public enum LifeCycleState {

+    OBSERVED, CREATE, INITIALIZE, SETUP, START, UPDATE, STOP, ENDING, END

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifecycleObservationAdapter.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifecycleObservationAdapter.java
new file mode 100644
index 0000000..b5e9967
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/LifecycleObservationAdapter.java
@@ -0,0 +1,73 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+package org.eclipse.amp.axf.core;

+

+// TODO: Auto-generated Javadoc

+/**

+ * The Class LifecycleObservationAdapter.

+ */

+public class LifecycleObservationAdapter implements IStateListener {

+

+    ILifeCycleListener lifeCycleListener;

+

+    /**

+     * Instantiates a new lifecycle observation adapter.

+     * 

+     * @param lifeCycleListener the life cycle listener

+     */

+    public LifecycleObservationAdapter(ILifeCycleListener lifeCycleListener) {

+        super();

+        this.lifeCycleListener = lifeCycleListener;

+    }

+

+    /**

+     * @param notifyType

+     * @param observed

+     * @see org.eclipse.amp.axf.core.IStateListener#stateChange(java.lang.Object, java.lang.Object)

+     */

+    public void stateChange(Object notifyType, Object observed) {

+        if (notifyType instanceof LifeCycleState && observed instanceof IObservationProvider) {

+            IObservationProvider provider = (IObservationProvider) observed;

+            switch ((LifeCycleState) notifyType) {

+                case OBSERVED:

+                    lifeCycleListener.observing(provider);

+                    return;

+                case CREATE:

+                    lifeCycleListener.observeCreate(provider);

+                    return;

+                case INITIALIZE:

+                    lifeCycleListener.observeInitialize(provider);

+                    return;

+                case START:

+                    lifeCycleListener.observeStart(provider);

+                    return;

+                case UPDATE:

+                    lifeCycleListener.observeUpdate(provider);

+                    return;

+                case STOP:

+                    lifeCycleListener.observeStop(provider);

+                    return;

+                case END:

+                    lifeCycleListener.observationEnd(provider);

+                    return;

+                case ENDING:

+                    lifeCycleListener.observationEnding(provider);

+                    return;

+            }

+        }

+    }

+

+}

diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ModelExecutionEnginePlugin.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ModelExecutionEnginePlugin.java
new file mode 100644
index 0000000..69bd8fc
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/ModelExecutionEnginePlugin.java
@@ -0,0 +1,76 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.core;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class ModelExecutionEnginePlugin extends Plugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.eclipse.amp.axf.core";
+
+    // The shared instance
+    private static ModelExecutionEnginePlugin plugin;
+
+    /**
+     * The constructor.
+     */
+    public ModelExecutionEnginePlugin() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+     */
+    /**
+     * @param context
+     * @throws Exception
+     * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+     */
+    /**
+     * @param context
+     * @throws Exception
+     * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance.
+     * 
+     * @return the shared instance
+     */
+    public static ModelExecutionEnginePlugin getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/TimeGranularity.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/TimeGranularity.java
new file mode 100644
index 0000000..cc420e4
--- /dev/null
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.core/src/org/eclipse/amp/axf/core/TimeGranularity.java
@@ -0,0 +1,75 @@
+/**

+ * <copyright>

+ *

+ * Copyright (c) 2009 Metascape, LLC.

+ * 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:

+ *   Metascape - Initial API and Implementation

+ *

+ * </copyright>

+ *

+ */

+

+package org.eclipse.amp.axf.core;

+

+/**

+ * Provides typical model update granularity. Models updates can be delayed or they can be designed to take place only

+ * every n model update periods. Note that these two are mutually exclusive!

+ * 

+ * @author mparker

+ * 

+ */

+public class TimeGranularity implements ITimeGranularity {

+

+    long updateDelay;

+

+    int updateFrequency = 1;

+

+    public final static TimeGranularity DEFAULT_GRANULARITY = new TimeGranularity(0, 1);

+

+    private TimeGranularity(long updateDelay, int updateFrequency) {

+        super();

+        this.updateDelay = updateDelay;

+        this.updateFrequency = updateFrequency;

+    }

+

+    public static TimeGranularity createDelayGranularity(long delay) {

+        return new TimeGranularity(delay, 1);

+    }

+

+    public static TimeGranularity createFrequencyGranularity(int frequency) {

+        return new TimeGranularity(0, frequency);

+    }

+

+    public long getUpdateDelay() {

+        return updateDelay;

+    }

+

+    public void setUpdateDelay(long updateDelay) {

+        updateFrequency = 1;

+        this.updateDelay = updateDelay;

+    }

+

+    public int getUpdateFrequency() {

+        return updateFrequency;

+    }

+

+    public void setUpdateFrequency(int updateFrequency) {

+        updateDelay = 0;

+        this.updateFrequency = updateFrequency;

+    }

+

+    /**

+     * @return

+     * @see java.lang.Object#toString()

+     */

+    public String toString() {

+        return updateDelay == 0 ? (updateFrequency > 1 ? "[update " + updateFrequency + "]" : "") : "[delay "

+            + updateDelay

+            + "ms]";

+    }

+}