toolCHAINZ / jingle

SMT Modeling for Ghidra's PCODE
MIT License
8 stars 1 forks source link

Consider Unifying Model Types #2

Open toolCHAINZ opened 2 months ago

toolCHAINZ commented 2 months ago

Right now we have ModeledBlock (a modeled basic block) and ModeledInstruction (a single instruction) as two similar, but distinct types. ModeledBlock has the extra constraint that it will only be constructed if the block terminates in non-fallthrough branches.

This isn't ideal for a few situations:

Should consider removing this separation and just calling it what it is: a trace of pcode operations. A single trace structure could represent an instruction or our poor-man's basic block. Could also implement Add and friends on it to allow easily manipulating traces.

We should definitely have something for basic blocks eventually, but that will require a more thorough treatment of the program graph. And maybe we can just piggy-back on some of the higher analysis that sleigh performs.