code: protected PExp patternToExp(PPattern pattern, IPogAssistantFactory af,
  			UniqueNameGenerator unq)
  	{
  		PatternToExpVisitor visitor = new PatternToExpVisitor(unq, af);
  		try
  		{
  			return pattern.apply(visitor);
  		} catch (AnalysisException e)
  		{
  			return null;
  		}
  	}
docs: Create an expression equivalent to a pattern.