Liking cljdoc? Tell your friends :D

Common sense, and how it is checked

  • Covers: what counts as a common-sense test, and the sweep of questions it asks per reasoning subsystem.
  • Not here: what each subsystem does with the questions → the subsystem's own page, from README.md.
  • Assumes: context, defeasible, abducible_predicate → glossary.md.

Two test namespaces ask this knowledge base the questions it exists to answer, one per reasoning subsystem.

common_sense_test.cljreasoning over the shipped schema and the test-world's cast
common_sense_qualitative_test.cljthe six algebras plus duration and metric time, over networks

What counts as a common-sense test

A question with no stored answer. That is the whole selection rule, and it is what separates these two namespaces from the three hundred beside them: a test that reads back what its fixture asserted is testing storage, and belongs next to the subsystem it exercises. What is left is knowledge the KB produced — a type nobody stated, a comparison nobody computed, a containment nobody wrote down.

The second rule is that each one is phrased the way somebody would ask it. A cup in a box in a room is in the room. Half an hour and an hour are ninety minutes. Which of two animals is heavier is read off their weights. If the name of a test needs the engine's vocabulary to make sense, it is a subsystem test wearing the wrong hat.

The sweep

subsystemthe question it is askeddoc
taxonomyis a penguin a thing; is a dog a cattaxonomy.md
disjointnesscan one animal be two kinds that exclude each othertaxonomy.md
inheritanceare dogs bigger than ants, given only that mammals are bigger than insectsinherit.md
argument typeswhat is Bone1, given only that Muffet eats itargtypes.md
evaluablesis 1970 before 1995; what is 3 × (2 + 4)inference.md
backward chainingwho is older, given two birth yearsinference.md
defaultsdoes the eagle fly, and does the penguinnmtms.md
exceptionstold the cat is asleep, is it still awakeexceptions.md
beliefknown-true against a default, and default against defaultnmtms.md
aggregationhow many children has Bob; how many of the people are parentsaggregate.md
negation as failureis anything known about whether the cat is asleepnaf.md
inertiathe cat fell asleep at three and woke at five — asleep at fourtime.md
change over timetold later that it was let out, is it still indoorstime.md
joined NAFis any child of Tom a sibling of Ann — one witness, not twonaf.md
universalsis every child of Bob a parent; is every child of a childless catnaf.md
closed extentstold the sibling relation is completely known, are these two not siblingsnaf.md
abductionwhy would a dog not be awakeabduction.md
equalitytwo names arrive for one personequality.md
non-atomic termswho is the mother of this dog, named or notnat.md
skolemizationevery dog had a mother, whether or not anyone knows whoskolem.md
quantitydoes a kilogram outweigh 999 grams; which animal is heavierquantity.md
mereologywhere is the piston, given where the car iscontexts.md
contextscan the social theory see the natural world's factscontexts.md
levelshow hard was each of these to answerlevels.md
RCC-8a cup in a box in a roomspace.md
scenarioswrite down one arrangement that satisfies all of itscenario.md
refutationthree intervals each before the next, in a ringqcn.md
Allenbreakfast before lunch before dinnertime.md
point algebraone moment before another before a thirdtime.md
events on a clockis the hare asleep while the tortoise goes pasttime.md
cardinal directionnorth of something east of somethingspace.md
relative directionleft of a thing left of a thingspace.md
distancetwo things very close to a thirdspace.md
durationhalf an hour and an hour; two meals that cannot overlapduration.md
metric timesix hours then six hoursstp.md
sign arithmeticdoes the tub fill while the tap beats the drainsign.md
trendsdoes a cooling body's temperature fallsign.md

What is deliberately not here. Anytime evaluation bounds a computation rather than answering about the world, and within fifty milliseconds is not a common-sense question. The Solver protocol wants a labelling context and set/assumptionRule rules to ground, which is a mechanism rather than a story — the belief question it settles is asked above, at the level a person would ask it. Equational rewriting, preview, watch, overlay and the foreign bridge are not claims about the world at all.

What the schema carries for these questions

Four things the questions need live in the shipped KB rather than in the tests, because a gap a test papers over locally is a gap every other consumer still has.

The unit table. CxMeasure ships Length in Meter, Mass in Kilogram and Duration in Second, so the measure vocabulary is something a query can compute with rather than a grammar. The test for admitting a unit is the one CxCore applies to its own vocabulary: a unit belongs when its factor is a definition rather than a measurement. A minute is sixty seconds by stipulation; how much a particular dog weighs is not.

weightOf / heightOf, and the comparisons over them. heavierThan and tallerThan are backward rules in CxSize reading two measures through the quantity provers — the same shape olderThan has over two birth years. All three are also declared transitive, which is the route a common-sense KB actually takes: nobody weighs an elephant, and two stated comparisons compose into a third off the closure. The two halves of CxSize are deliberately not connected: a dog being a larger kind than a cat does not make this dog heavier than that cat.

The sign vocabulary, and no numbers at all. CxMeasure also ships signOf / trendOf, the three qualitative* arithmetic relations, the derivativeOf edge and greaterInMagnitudeThan — which is the layer for the questions a person can answer and a measure cannot, because nobody has the figure. A tub fills while the tap beats the drain, and the KB says so from four sentences none of which mentions a litre (sign.md).

motherOf / fatherOf, with MotherFn / FatherFn beside them. The reified functions are what let a KB name somebody by their role before it knows their name, and the correspondence is what stops (MotherFn Pup) from minting a second name for a mother already stored. Both predicates are functional, so a second mother merges rather than piling up.

The event calculus, and the fluents to run it on. CxChange ships the inertia axioms and CxTime the vocabulary they are stated in, so asleep at four is a question about the shipped KB rather than about a theory the test wrote for itself. The fluents are the test-world's, because a fluent is contingent: (AsleepFn Whiskers) is one animal's state, and CxWell is where the cast declares its reifiable functions so the natural world and the fables can both use them.

One abducible grant. CxBiology declares (abducible_predicate asleep) and nothing else, which is what makes why is this dog not awake answerable and why does it not fly refused with the dead end named. A grant is a policy the context states, and the whole value of abduction here is what is not granted.

Running it

lein test vaelii.common-sense-test vaelii.common-sense-qualitative-test

Both are ordinary members of :default, so lein gate runs them.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close