public void ToProlog(List <string> executors) { var effects = String.Join(", ", Effects); var condition = "[]"; if (Conditions != null && Conditions.Any()) { condition = FluentParser.GetConditions(Conditions); } if (Executor != null && Executor.Any()) { AdeSystem.PrologEngine.AssertFact("releases(" + ActionName.ToLower() + ", " + Executor.ToLower() + ", [" + effects.ToLower() + "], [" + condition.ToLower() + "])"); } else { foreach (var executor in executors) { AdeSystem.PrologEngine.AssertFact("releases(" + ActionName.ToLower() + ", " + executor.ToLower() + ", [" + effects.ToLower() + "], [" + condition.ToLower() + "])"); } } }