AMulet 2.0
AIG Multiplier Verification Tool
aig.h File Reference

contains functions to parse and manipulate the input AIG More...

#include <assert.h>
#include "signal_statistics.h"
#include "../includes/aiger.h"
Include dependency graph for aig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_aig_substitution ()
 
void init_aig_parsing ()
 
void reset_aig_substitution ()
 
void reset_aig_parsing ()
 
const char * aiger_open_and_read_to_model (const char *input_name)
 
bool is_model_input (unsigned val)
 
aiger_and * is_model_and (unsigned val)
 
unsigned get_model_num_latches ()
 
unsigned get_model_num_inputs ()
 
unsigned get_model_num_ands ()
 
unsigned get_model_num_outputs ()
 
unsigned get_model_maxvar ()
 
unsigned get_model_inputs_lit (unsigned i)
 
const char * get_model_inputs_name (unsigned i)
 
unsigned slit (unsigned i)
 
int write_model (FILE *file)
 

Variables

unsigned M
 stores the maximum variable num of the input AIG More...
 
unsigned NN
 stores the number of inputs of the input AIG More...
 
unsigned a0
 input value for the LSB of input vector A More...
 
unsigned al
 input value for the MSB of input vector A More...
 
unsigned ainc
 distance between aiger values of A More...
 
unsigned b0
 input value for the LSB of input vector B More...
 
unsigned bl
 input value for the MSB of input vector B More...
 
unsigned binc
 distance between aiger values of B More...
 
aiger * miter
 
aiger * rewritten
 

Detailed Description

contains functions to parse and manipulate the input AIG

Part of AMulet2.0 : AIG Multiplier Verification Tool. Copyright (C) 2020 Daniela Kaufmann, Johannes Kepler University Linz

Function Documentation

const char* aiger_open_and_read_to_model ( const char *  input_name)

Opens the input file and reads the contents to 'aiger* model'

Parameters
input_namea const char* refering to the name of the input file
Returns
const char*, defining a possible error message Equal to zero if everything went right. )
unsigned get_model_inputs_lit ( unsigned  i)

Returns the value of the i'th input in 'aiger* model'

Parameters
ian unsigned integer, has to be smaller than NN
Returns
an unsigned integer corresponding to the value of the i'th input
const char* get_model_inputs_name ( unsigned  i)

Returns the name of the i'th input in 'aiger* model'

Parameters
ian unsigned integer, has to be smaller than NN
Returns
a const char * corresponding to the name of the i'th input
unsigned get_model_maxvar ( )

Returns the maximum variable number of 'aiger* model'

Returns
an unsigned integer
unsigned get_model_num_ands ( )

Returns the number of AND nodes in 'aiger* model'

Returns
an unsigned integer
unsigned get_model_num_inputs ( )

Returns the number of inputs in 'aiger* model'

Returns
an unsigned integer
unsigned get_model_num_latches ( )

Returns the number of latches in 'aiger* model'

Returns
an unsigned integer
unsigned get_model_num_outputs ( )

Returns the number of outputs in 'aiger* model'

Returns
an unsigned integer
void init_aig_parsing ( )

Initializes the 'aiger* model', which is local to aig.cpp

void init_aig_substitution ( )

Initializes the 'aiger* miter' and 'aiger* rewritten'

aiger_and* is_model_and ( unsigned  val)

Searches for the AIG node with value 'val' in 'aiger* model'

Parameters
valan unsigned integer
Returns
an aiger_and* object, with lefthand side val
bool is_model_input ( unsigned  val)

Checks whether the given value corrensponds to an input of 'aiger* model'

Parameters
valan unsigned integer
Returns
true when val is an input in 'aiger* model'.
void reset_aig_parsing ( )

Resets the 'aiger* model', which is local to aig.cpp

void reset_aig_substitution ( )

Resets the 'aiger* miter' and 'aiger* rewritten'

unsigned slit ( unsigned  i)

Returns the aiger value of the i'th output in 'aiger* model'

Parameters
ian unsigned integer, has to be smaller than NN
Returns
an unsigned integer corresponding to the value of the i'th output
int write_model ( FILE *  file)

Writes the 'aiger* model' to the provided file.

Parameters
fileoutput file
Returns
an integer value, zero if everything went right.

Variable Documentation

unsigned a0

input value for the LSB of input vector A

unsigned ainc

distance between aiger values of A

unsigned al

input value for the MSB of input vector A

unsigned b0

input value for the LSB of input vector B

unsigned binc

distance between aiger values of B

unsigned bl

input value for the MSB of input vector B

unsigned M

stores the maximum variable num of the input AIG

aiger* miter

aiger * storing the generated miter during '-substitution' Will be transformed into CNF and printed to the provided output file.

unsigned NN

stores the number of inputs of the input AIG

aiger* rewritten

aiger * storing the generated rewritten AIG during '-substitution' Will be printed to the provided output file.