runtimeverification / runtimeverification/llvm-backend

Duplications between llvm-backend and blockchain-k-plugin

Open
#383 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
43
Forks
22
PR merge metrics
No merged PRs in 30d

Description

runtime/json/json.cpp implements KoreHandler, KoreWriter, and write_json. In blockchain-k-plugin in plugin-c/json.cpp those are also being implemented, and slightly differently (I guess they're older versions?). Making a header file with declarations for these would allow the blockchain plugin to use them.

Inversely, runtime/json/json.cpp has a few structs declared which are provided by a header file in blockchain-k-plugin in plugin-c/k.h. These are zinj, stringinj, boolinj, jsonlist, json, and jsonmember, along with some extern "C" stuff. There are also declarations of global block * and blockheader constructs scattered around, even in firefly and iele-semantics. These are just typedefs and simple constructs but maybe it would be good to get them centralized somewhere with some basic utilities as a rudimentary "K API".

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by comparing runtime/json/json.cpp with blockchain-k-plugin/plugin-c/json.cpp and plugin-c/k.h to inventory duplicated implementations and declarations. Then inspect the scattered block and blockheader declarations in firefly and iele-semantics. Done should be defined as an agreed shared set of declarations and utilities that removes the identified duplication across these components.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.