crucible-llvm-0.6: Support for translating and executing LLVM code in Crucible
Copyright(c) Galois Inc 2019
LicenseBSD3
MaintainerRob Dockins <rdockins@galois.com>
Stabilityprovisional
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.LLVM.QQ

Description

 
Synopsis

Documentation

llvmType :: QuasiQuoter Source #

This quasiquoter parses values in LLVM type syntax, extended with metavariables, and builds values of Text.LLVM.AST.Type.

Type metavariables start with a $ and splice in the named program variable, which is expected to have type Type.

Numeric metavariables start with # and splice in an integer type whose width is given by the named program variable, which is expected to be a NatRepr.

llvmDecl :: QuasiQuoter Source #

This quasiquoter parses values in LLVM function declaration syntax, extended with metavariables, and builds values of Text.LLVM.AST.Declare.

Type metavariables start with a $ and splice in the named program variable, which is expected to have type Type.

Numeric metavariables start with # and splice in an integer type whose width is given by the named program variable, which is expected to be a NatRepr.

The name of the declaration may also be a $ metavariable, in which case the named variable is expeted to be a Symbol.

llvmOvr :: QuasiQuoter Source #

This quasiquoter parses values in LLVM function declaration syntax, extended with metavariables, and partially applies the LLVMOverride constructor so that it expectes a single remaining argument to populate the llvmOverride_def field.

Type metavariables start with a $ and splice in the named program variable, which is expected to have type Type. In addition a related variable must be in scope to give the crucible TypeRepr associated. For example variable $x should be a LLVM Type and $x_repr should be a Crucible TypeRepr.

Numeric metavariables start with # and splice in an integer type whose width is given by the named program variable, which is expected to be a NatRepr. Both the LLVM type and the Crucible TypeRepr are built from the NatRepr.

The name of the declaration may also be a $ metavariable, in which case the named variable is expeted to be a Symbol.