Open lgeretti opened 7 years ago
Original comment by Pieter Collins (Bitbucket: pietercollins, GitHub: pietercollins)
I've updated the docs; hope this answers your questions.
Original comment by Luca Geretti (Bitbucket: lgeretti, GitHub: lgeretti)
Some questions:
The relationship between Approximate and Naive is not so clear from the doc. Does for example ApproximateKleenean relate to NaiveKleenean as ValidatedKleenean does to Kleenean?
I do not understand when a method should return an Effective type rather than a Validated one.
When can we neglect to specify the Effort, if we return a Validated type?
Original comment by Pieter Collins (Bitbucket: pietercollins, GitHub: pietercollins)
I've made a first implementation (in working-logical) including documentation; please let me know what you think.
The implementation uses custom classes at the user level rather than templates and typedefs. However, there are some generic constructs in use here, and it may be worth seeing to what extent these can be exploited:
Original comment by Luca Geretti (Bitbucket: lgeretti, GitHub: lgeretti)
I am favorable to a more detailed definition of the logical classes and their enforcement throughout the library. So every development towards it is welcome. In general I am against typedefs, so custom classes are ok with me. Could you use this chance to write down a strong definition of their semantics in the API docs, when you write the classes? I am still at a loss regarding their specific role within the library, and a good hint on their proper usage would be nice.
What is the status of this issue?
Originally reported by Pieter Collins (Bitbucket: pietercollins, GitHub: pietercollins)
Currently our Logical classes are templates parametrised by a Paradigm tag, with typedefs to user-level names (Boolean, Sierpinskian, Kleenean). I plan to re-implement so that the user-level names are class names, and make some other changes to the semantics to make the interface slightly cleaner.
Use Boolean, Sierpinskian and Kleenean as top-level class names, with Lower/Upper- modifiers for Kleenean, Negated- for Sierpinskian, and Validated- and Approximate- versions. Here, Kleenean is a completion of Boolean in much the same way as Real is a completion of Rational.
Distinguish Sierpinskian from LowerKleenean. Sierpinskian would be for cases in which there is no possibility for robust falsification (which in our case is essentially for inequality) and LowerKleenean for partial information on a quasidecidable predicate (e.g. testing for positivity of a LowerReal, where positivity of a Real would return Kleenean).
Fix LowerKleenean to be for Verifyable predicates (currently LowerKleenean is for Falsifyable, but this is incorrect, since a verified lower bound of 'true' means the predicate must be true, but a lower bound of 'false' means no information).
Effective logical classes will not be convertible to Validated/Approximate classes, but can only be checked with some given Effort.
Add conjunction/disjunction for Sequences of logical types.
Our SetInterface classes also need Effective and Validated versions. Effective (i.e. exactly specified sets) would have predicates returning (Lower)Kleenean, and Validated sets return their Validated logical versions.
Store the effort_used for a Validated/Approximate logical value, to allow mixed Effective/Validated operations (see above).
Store a cached Validated checked value together with the Effort used with any Effective logical predicate. The advantage of this is fast re-checking of predicates.
Additionally:
possibly(...)
anddefinitely(...)
forApproximate
andNaive
logical values, as these always yieldtrue
andfalse
. (However, the usage is consistent, so may be useful in template code.)decide(...)
. It currently has two orthogonal uses: checkEffective
logical types with minimumEffort
, and select an appropriate case forValidated
(definitely
) andApproximate
(probably
). Maybe rename to something less snappy, likecast_decision
.probably
tois_likely
and adding anis_unlikely
. Consider changing these to only apply toApproximate
logical types.