Skip to content

7.0.0

Compare
Choose a tag to compare
@sdcondon sdcondon released this 20 Oct 10:46
· 6 commits to main since this release

Quite a substantial one. Apologies for any annoyance caused by the breaking changes, but I hope you'll agree that the overall structure of the library is markedly improved. Also hope you'll agree that the addition of feature vector index implementations is a fairly big deal - consider it an attempt to make up for all the breaking stuff..

Changes compared to 6.0.0:

  • BREAKING: Removed Constant type from the model. There has never been any real need for it - a constant is just a function with arity zero. Now that parsing and formatting are configurable with regards to the inclusion or not of brackets for zero arity functions, there really is no excuse not to get rid of this.
  • BREAKING: significant re-organisation of sentence manipulation logic. Two motivations here. First, to tidy up the SentenceManipulation namespace, by moving concrete manipulation classes downward into one of two sub-namespaces (Normalisation and VariableManipulation), leaving just the abstractions in SentenceManipulation itself. Second, to push the specifics of our CNF conversion logic (notably, the standardised variable and Skolem function identifier types) downward, so that they don't pollute our model. The CNFSentence and CNFClause types should be usable without needing to also use our conversion logic. If consumers want to normalise using their own logic/identifiers, that should be doable without confusion. Specifics:
    • SkolemFunctionIdentifier and StandardisedVariableIdentifier moved from SCFirstOrderLogic to new SCFirstOrderLogic.SentenceManipulation.Normalisation namespace.
    • CNFExplainer moved from SentenceFormatting to Normalisation namespace.
    • CNFInspector moved from SentenceManipulation to Normalisation namespace.
    • CNFClause.Restandardise method removed, replaced by extension method in new NormalisationExtensions class in Normalisation namespace.
    • ToCNF method removed from Sentence class, replaced by extension method in NormalisationExtensions.
    • CNFClause unification extension methods moved from SentenceManipulation.Unification to a new VariableManipulationExtensions class in a new SentenceManipulation.VariableManipulation namespace.
    • VariableSubstitution and MutableVariableSubstitution moved from SentenceManipulation to VariableManipulation namespace.
    • Unifier moved from SentenceManipulation.Unification to VariableManipulation namespace.
    • CNFSentence's Sentence-accepting ctor changed so that it no longer converts to CNF for you - it expects the sentence to already be a conjunction of disjunctions of literals.
  • Added a couple of feature vector index implementations (one synchronous, one asynchronous) to a new ClauseIndexing namespace. As with the term indexing types, there are node abstractions here to allow you to bring your own backing store, but the only node implementations provided by the library just store things in memory.
  • Optional ctor parameter added to SentenceFormatter - a delegate for controlling whether brackets should be included for zero arity functions with a given identifier. Defaults to always including them.
  • Added some extension methods for Terms to VariableManipulationExtensions class in the SentenceManipulation.VariableManipulation namespace. Specifically, added IsInstanceOf(Term), IsGeneralisationOf(Term), Ordinalise(Sentence), Ordinalise(Literal) and Ordinalise(Term).
  • Added an implicit conversion operator to OperableFunction, to eliminate a situation where the compiler complains due to ambiguity. Should probably also make several other similar additions to other operable types, but.. haven't bothered for now.
  • Minor changes to Unifier class - trivial performance improvement when working with Predicates.
  • Package README update
  • Some XML doc improvements

Changes compared to 7.0.0-pre.4

  • Optional ctor parameter added to SentenceFormatter - a delegate for controlling whether brackets should be included for zero arity functions with a given identifier. Defaults to always including them.
  • Package README update