Skip to content

7.0.0-pre.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@sdcondon sdcondon released this 29 Sep 19:30
· 22 commits to main since this release

Changes compared to 7.0.0-pre.2:

  • BREAKING: Feature vector index changes:
    • Feature vector index nodes expose full key-value pair collection property instead of GetSubsuming/Subsumed methods. This is to keep the focus of the nodes on the backing store, and to facilitate e.g. visualisers.
    • Feature vector indices now ignore the actual variable identifiers for the purposes of uniqueness. That is, trying to add P(x, y) when P(a, b) has already been added will result in an exception stating that the key is already present (but will not for P(x, x)). And of course similar for get and delete.
    • Bug fix: when using an explicitly provided feature comparer (as opposed to the default) with the library-provided dictionary nodes, the comparer wasn't being passed down to new nodes, meaning that it was only being used for the root node.
  • Added Ordinalise(Sentence) and Ordinalise(Literal) to VariableManipulationExtensions.
  • Re-added Sentence-accepting CNFSentence ctor - though this new version expects the passed sentence to be in CNF - that is, be a conjunction of disjunctions of literals. Intended as another step on the road to a bit more flexibility for consumers in exactly how conversion to CNF is carried out.

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 is somewhat configurable (lessening the chance of confusion/issues occurring due to zero arity functions being specifiable with or without parentheses), 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:
    • CNFExplainer moved from SentenceFormatting to SentenceManipulation.Normalisation.
    • CNFInspector moved from SentenceManipulation to SentenceManipulation.Normalisation.
    • CNFClause.Restandardise method removed, replaced with extension methods in Normalisation namespace.
    • SkolemFunctionIdentifier and StandardisedVariableIdentifier moved from SCFirstOrderLogic to SCFirstOrderLogc.SentenceManipulation.Normalisation.
    • CNFClause unification extension methods moved from SentenceManipulation.Unification to SentenceManipulation.VariableManipulation, & class renamed from CNFClauseExtensions to NormalisationExtensions.
    • ToCNF method removed from Sentence class, replaced by extension method in NormalisationExtensions.
    • 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.
    • VariableSubstitution and MutableVariableSubstitution moved from SentenceManipulation to SentenceManipulation.VariableManipulation.
    • Unifier moved from SentenceManipulation.Unification to SentenceManipulation.VariableManipulation.
  • Added first pass of a feature vector index implementation to a new ClauseIndexing namespace. It does need some (performance and robustness in the face of duplicates being added) tweaks and further testing prior to proper v7 release. Such changes are fairly likely to be breaking changes. But this is a good starting point.
  • Added some extension methods for Terms to a new VariableManipulationExtensions class in the new 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
  • As always, some XML doc improvements