Skip to content

Fix temporarily invalid instructions in goto convert  #2357

Description

@peterschrammel

See #2356 for the context

A couple of initial suggestions to fix this:

  1. Use an explicit dummy target to be passed to make_goto()
    • very simple
    • helps avoiding wrongly incomplete initialisations
    • allows checking that a converted goto program does not have incompletely initialised instructions
  2. Refactor goto_convert to perform single-step initialisation of goto instructions
    • quite some work
  3. Keep NO_INSTRUCTION_TYPE and move if-then-else optimisation into a goto pass
    • doable, but doesn't feel right
    • makes invalid instructions explicit and the absence of incompletely initialised instructions can be easily checked
  4. ?

In any case also https://github.com/diffblue/cbmc/blob/develop/src/goto-programs/goto_program.h#L495 should be removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions