Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Unifying Model Types #2

Open
toolCHAINZ opened this issue Jul 3, 2024 · 0 comments
Open

Consider Unifying Model Types #2

toolCHAINZ opened this issue Jul 3, 2024 · 0 comments

Comments

@toolCHAINZ
Copy link
Owner

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:

  • This isn't really guaranteed to be a basic block in the program graph, so it's less useful for actual analysis
  • If you want a function to be more generally usable, you pay the price with a bunch of noisy trait bounds; often things just don't bother and choose one.
  • This is confusing

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.

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

No branches or pull requests

1 participant