Swish

Swish is “SWI-Prolog for SHaring.” It is a multi-user web-based development environment that supports both standard SWI-Prolog code and literate programming-style “notebooks” where code and queries are interspersed with Markdown and HTML.

SWI-Prolog is reportedly the most popular version of the Prolog programming language available today, and is an open source implementation.

Prolog languages have been used for encoding legislation since the mid-1980s, with the publication of Kowalski et al’s British Nationality Act as a Logic Program.

In 2021, SWI-Prolog received several updates to add features from the SWI-Prolog re-implementation of s(CASP). This increases the scope of the kinds of questions that SWISH can answer, adds natural language generated justifications for answers, constraint handling in answer set programming, mutliple models per answer (allowing you to see if there is more than one reason that a legal conclusion is true), abducible queries (allowing you to reason with partial information, and make assumptions), and negated queries (allowing you to ask both whether something is true, and whether it is not, and why, without additional code). All of these features are directly applicable to Rules as Code work.