nb-03 solutions: Exceptions and conflicting rules
For LLMs2 sections
← Back to lessonChapter 03 / 25 · Beginner · Worked solution
Exercise
Section titled “Exercise”Bob holds a disability badge and has outstanding fines recorded.
- What is the status of
truth(permit_eligible(bob)), and which test name andexpectline say so? - Which single package element explains why Ann’s fines case on the
resident route answers
FALSE_ONLYinstead, and what would Ann’s answer become if that element were deleted?
Solution
Section titled “Solution”BOTH. The test iswithout priority the conflict persistsinpacks/examples/language-demo/permits/tests/permits.lawtest, whose expectation isexpect truth_status == BOTH;. BothBadgeEligibility(fromdisability_badge(bob)) andFinesRefusal(fromoutstanding_fines(bob)) fire, and no priority ranks that pair, so both supports stand.- The
priority RefusalOverEligibilityblock inpacks/examples/language-demo/permits/package.law(prefer FinesRefusal over PermitEligibility; reason lex_specialis;), which the badge pair lacks. If it were deleted, Ann’s fines case would become the same shape as Bob’s —PermitEligibilityfor,FinesRefusalagainst, no ranking — and the answer would beBOTH, as the badge test demonstrates.
Checked against: law test packs/examples/language-demo/permits
(28 checked, 28 passed), which runs both tests.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.