code: public Set<ContextException> initialize(AModuleModules m,
  			StateContext initialContext)
  	{
  
  		Set<ContextException> trouble = new HashSet<ContextException>();
  
  		for (PDefinition d : m.getImportdefs())
  		{
  			if (d instanceof ARenamedDefinition)
  			{
  				try
  				{
  					initialContext.putList(af.createPDefinitionAssistant().getNamedValues(d, initialContext));
  				} catch (ContextException e)
  				{
  					trouble.add(e); // Carry on...
  				}
  			}
  		}
  
  		for (PDefinition d : m.getDefs())
  		{
  			try
  			{
  				initialContext.putList(af.createPDefinitionAssistant().getNamedValues(d, initialContext));
  			} catch (ContextException e)
  			{
  				trouble.add(e); // Carry on...
  			}
  		}
  
  		try
  		{
  			AStateDefinition sdef = af.createPDefinitionListAssistant().findStateDefinition(m.getDefs());
  
  			if (sdef != null)
  			{
  				af.createAStateDefinitionAssistant().initState(sdef, initialContext);
  			}
  		} catch (ContextException e)
  		{
  			trouble.add(e); // Carry on...
  		}
  
  		return trouble;
  
  	}
docs: Initialize the system for execution from this module. The initial {@link Context} is created, and populated with
  name/value pairs from the local definitions and the imported definitions. If state is defined by the module, this
  is also initialized, creating the state Context.
  
  @param m
  @param initialContext
  @return True if initialized OK.