Lisp.Attribute
Primus Lisp Attributes.
This module enables declaring new attributes as well as accessing definition attributes via the knowledge base using Attribute.Set.slot
.
module Parse : sig ... end
The interface to the abstract parse tree.
val declare :
?desc:string ->
?package:string ->
domain:'a Bap_core_theory.KB.domain ->
parse:(package:string -> Parse.tree list -> 'a) ->
string ->
'a t
declare ~domain ~parse name
declares a new attribute.
The domain
defines the domain structure of the attribute carrier. When attributes are accumulated they should agree with respect to the domain ordering. The domain
's join
function will be used to accumulate attributes of a definition that are declared on different scopes.
The parse
function denotes the concrete syntax of the attribute, it is called for each declaration of the form
(<name> <payload>v} and applied to the {v<payload>v}. The result is then merged with the existing value of this attribute using the join function from the provided domain.
module Set : sig ... end
The set of attributes.