Skip to content

Conversation

tautschnig
Copy link
Collaborator

Adds a parser for JSON-encoded goto_functionst and support to symtab2gb to optionally read such from a file and store them in goto_functions of a goto_modelt.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Sep 16, 2025
@tautschnig tautschnig force-pushed the goto-functions-json branch 3 times, most recently from c353aac to e39b7d5 Compare September 16, 2025 16:49
The C front-end created symbols that had the function set to an empty
string. This was not accurately represented in the JSON representation,
but also shouldn't be used at all. Thus, changing the parser rather than
the JSON serialisation.
We were previously only printing a subset, making it impossible to
restore a `source_locationt` from its JSON representation.
The JSON output of a `source_locationt` is different from generic
`irept`.

Also, make `try_get_{bool,string}` publicly available for subsequent
re-use.
We must include all information required to re-produce a goto program
from its JSON representation.
Adds a parser for JSON-encoded `goto_functionst` and support to
`symtab2gb` to optionally read such from a file and store them in
`goto_functions` of a `goto_modelt`.
Tests the full workflow of reading and writing JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant