Skip to content

gongahkia/yuho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yuho

Yuho is a domain-specific language dedicated to simplifying legalese by providing a programmatic representation of Singapore Law.

Current applications are focused on Singapore Criminal Law but really can be applied to any jurisdiction that relies on statutes.

Rationale

The law is innately complex.

Statutes are not always easy to understand, especially for incoming law students new to legalese and its logical structure.

Criminal Law is often a foundational module most students take in their first year of law school. In particular, Singapore Criminal Law is nearly entirely statute-based, largely focusing on the Penal Code.

Yuho is a DSL that seeks to help law students better understand statutes by providing a flexible syntax which affords a programmatic representation of Singapore Criminal Law. By allowing users to decide how to represent stautory provisions in .yh code, the hope is that the statute's key elements and its underlying conditional relationships surface themselves. These representations can be coarse or granular, entirely scoped by their use-cases.

Getting into the specifics, Yuho provides the following four products.

  1. Yuho, a DSL made to be readable and codeable by law students and lawyers
  2. Formalised semantic for legal reasoning modelled after the syntactical patterns of the law
  3. CLI tool for interacting with Yuho's primary functions in the CLI
  4. Transpiler that transpiles to the below targets

Output formats

Target Usage
Mermaid Diagrammatic representations of statutory logic (mindmap, flowchart)
Alloy Semantic and logical verification

Sold on Yuho? Check out the quickstart guide.

Tip

More transpilation outputs might be added in the future. Open an issue to contribute suggestions!

Nerd stuff

For those interested, Yuho provides a grammatically-validated syntax core that splays out all requirements and consequences for a given offence, providing assurance of logical correctness from the get-go. Yuho was also designed to be exception-validated and language-agnostic, transpiling from one formally-specified source of truth to multiple target outputs, encouraging the development of tools that leverage off Yuho's logical core.

Want to find out more? See Yuho's documentation.

Documentation

Quickstart

Learn how Yuho works in 5 minutes at 5_MINUTES.md.

Roadmap

For more details on what's being implemented in the future, refer to ROADMAP.md.

Scope

Development is currently scoped by the following statutes at SCOPE.md.

Contribute

Yuho is open-source. Contribution guidelines are found at CONTRIBUTING.md.

References

Analogues

Yuho takes much inspiration from the following projects.

  • Natural L4: Language with an English-like syntax that transpiles to multiple targets, focused on codification of Singapore law at large and Contract Law in specific.
  • Catala: Language syntax that explicitly mimicks logical structure of the Law, focused on general Socio-fiscal legislature in most jurisidictions.
  • Blawx: User-friendly web-based tool for Rules as Code, a declarative logic knowledge representation tool for encoding, testing and using rules.
  • Morphir: Technology agnostic toolkit for digitisation of business models and their underlying decision logic, enabling automation in fintech.
  • OpenFisca: Open-source platform for modelling social policies through tax and benefits systems across jurisdictions.
  • Docassemble: Document automation system for generating guided interview documents through a question-and-answer interface.
  • Akoma Ntoso: Standardised XML schema for representing parliamentary, legislative and judiciary documents across jurisdictions.

Research

Yuho stands on the shoulders of past research and academia.