Axiom.Runtime.AMPredicateSet.InstallExternalPredicates C# (CSharp) Method

InstallExternalPredicates() private method

private InstallExternalPredicates ( ) : void
return void
        private void InstallExternalPredicates()
        {
            AMPluginManager p = new AMPluginManager();

            foreach (ExternalPredicate e in p.Plugins)
            {
                IAbstractMachinePredicate predicate = LoadExternalPredicate(e.Path, e.Name);
                if (predicate == null)
                {
                    throw new Exception("Remote predicate " + e.Name + " does not implement correct interface.");
                }

                if (!e.Name.Equals(predicate.Name() + "/" + predicate.Arity().ToString()))
                {
                    throw new Exception("Cannot install corrupted remote predicate: " + e.Name);
                }

                // Add new external predicate
                _predicates[e.Name] = predicate;
            }
        }