Support YAML syntax for outer parsing

Open
#4,177 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
yaml
Domain
compilers

Research direction

Start by locating the current XML outer parser and reviewing how configuration schemas and cell contents are handled. Compare that path with the YAML-like information display in Simbolik, then define the parser, schema-validation, and compatibility work needed for YAML rule syntax before implementation.

Written by the indexing model from the issue text.

Description

outer-parsing pyk

Currently we use XML, which we consistently get negative feedback at conferences about because it feels legacy and can be hard to read. XML is good because it has very clear open/close brackets for each cell.

YAML also has the nice property of being easily outer-parsed, but does not feel legacy and is much less verbose than XML. Indentation of YAML allows you to write arbitrary code directly into each YAML block. We can use an off-the-shelf YAML parser for doing configuration parsing, then check that the schema is allowed by the declared configuration after the fact and then just parse the contents of the cells themselves directly.

This would also line up better with how we display information to the user in Simbolik, because essentially a YAML like display is produced there for them to inspect, and then we have to explain how that maps to the XML like syntax anyway.

Overall, offering YAML as a way to write rule syntax I think could make parsing much faster (inner parsing only needs to be done on individual cells, not entire configurations), and would make definitions more compact and readable, nad be less scary to users.

Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.