runtimeverification / runtimeverification/kontrol

Handling of `setUp` functions in symbolic testing and compositional verification

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

Nobody has claimed this yet.

cse enhancement
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

This issue summarises the problems that exist when it comes to connecting the outcome of runningsetUp functions (and contract constructors) with the initial states of their associated tests, in symbolic testing and compositional verification alike.

Somewhat ad-hoc and dominantly concrete grafting

Currently, we execute the setUp function in isolation, starting from a configuration that uses concrete values for a number of essential cells (e.g., <accounts>), and then graft parts of its final state to the initial state of the test to be run using the _update_cterm_from_node function. The choices that this function makes are not documented and are not necessarily exhaustive. @ehildenb also mentioned to me that there should also exist a relationship between this grafting and the construction of proof objects, perhaps he coud expand on that slightly.

Separately, @palinatolmach ran into issues (cf. issue #457) when trying to adapt constructors to be useful for non-test functions as part of Compositional Symbolic Execution (CSE). What was happening was that the concrete values in a number of cells in the final configuration of setUp were overwriting the symbolic variables that should be present in the initial configurations for CSE. While this is not explicitly related to setUp functions, the principle is the same.

Handling of setUp path constraints

Currently, path constraints are not propagated from the setUp function to the tests. This means that any assumptions made within setUp, together with any constraints introduced by the semantics, will be lost. PR #480 addresses this issue by propagating these constraints explicitly.

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.

Research direction

Start with src/kontrol/prove.py and _update_cterm_from_node, then review PR #480 and issue #457 for the existing setup and constructor behavior. Done means connecting setUp and constructor outcomes to test or CSE initial states, preserving path constraints, and clarifying any relationship to proof-object construction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, testing
Issue type
Feature
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.