BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.07k stars 273 forks source link

adds the high-level calling convention specification language #1520

Closed ivg closed 2 years ago

ivg commented 2 years ago

This language makes it easier to describe various calling conventions using high-level combinators, built on top of the lower level primitives of the Arg language.

In Arg.Language we describe calling conventions declaratively using a list of commands, where each command is a guarded statement, i.e., a pair of a predicate and the statement. The statement is using the [Arg] operators to describe argument passing routine, and the predicate checks if this is applicable to the given arguement. Various combinators combine commands and predicates, into a final statement that fully describes the argument passing procedure for the given subroutine.