blarney-0.1.0.0
Copyright(c) Alexandre Joannou 2020-2021
LicenseMIT
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.Backend.SMT.NetlistUtils

Description

This module provides blarney Netlist pretty printing utilities for SMT code generation

Synopsis

Documentation

declareNLDatatype :: Netlist -> [InstId] -> String -> Doc Source #

Declare a datatype whose fields are specific to the provided Netlist

mkNLDatatype :: String -> [Doc] -> Doc Source #

Invoke the constructor for a datatype declared with declareNLDatatype

defineNLTransition :: Netlist -> Net -> (String, String) -> [InstId] -> [InstId] -> String -> Doc Source #

Declare the transition function for a given root Net in the provided Netlist

defineChainTransition :: String -> (String, String) -> String -> Doc Source #

Define the repeated application of a function

assertBounded :: String -> String -> (String, String) -> [(Integer, InputWidth)] -> Int -> Bool -> Doc Source #

Define inputs and assertion of the bounded property represented by the provided chaining function, with a given initial state, and for a given depth

assertInduction :: String -> (String, String) -> Int -> Bool -> Doc Source #

Define inputs and assertion of the induction step for proof by induction of the provided chaining function for the checked property, for a given induction depth and with optional state restriction. To assert a base case, the assertBounded function can be used.

wireName :: Netlist -> WireId -> String Source #

Derive the name of the signal referred to by the given WireId