Header menu logo issie

TruthTableReduce Module

Functions and values

Function or value Description

hasRedundancies table

Full Usage: hasRedundancies table

Parameters:
Returns: bool

Returns true if a truth table has redundancies

table : TruthTable
Returns: bool

inputDCRows input table

Full Usage: inputDCRows input table

Parameters:
Returns: (TruthTableRow * TruthTableRow) list

Finds all rows where a given input is Don't Care (X)

input : CellIO
table : TruthTable
Returns: (TruthTableRow * TruthTableRow) list

isValidDCRow row table

Full Usage: isValidDCRow row table

Parameters:
Returns: TruthTableRow option

Given a row containing Don't Care terms, validate it against the Truth Table to check if the relationship it describes is correct.

row : TruthTableRow
table : TruthTable
Returns: TruthTableRow option

reduceTruthTable table maxDepth

Full Usage: reduceTruthTable table maxDepth

Parameters:
Returns: TruthTable

Top-level function for DC reduction of truth tables

table : TruthTable
maxDepth : int option
Returns: TruthTable

reduceTruthTable' table depth maxDepth

Full Usage: reduceTruthTable' table depth maxDepth

Parameters:
    table : TruthTable
    depth : int
    maxDepth : int option

Returns: TruthTable

Recursive function for Don't Care reduction of a Truth Table. Table is repeatedly reduced until running the reduction logic does not change the returned table.

table : TruthTable
depth : int
maxDepth : int option
Returns: TruthTable

reduceWithDCRow regularRows (dcLeft, dcRight)

Full Usage: reduceWithDCRow regularRows (dcLeft, dcRight)

Parameters:
Returns: (TruthTableCell list * TruthTableCell list) list

Reduce the Truth Table by removing rows covered by Don't Care Rows.

regularRows : (TruthTableCell list * TruthTableCell list) list
dcLeft : TruthTableCell list
dcRight : TruthTableCell list
Returns: (TruthTableCell list * TruthTableCell list) list

rowEquals row1 row2

Full Usage: rowEquals row1 row2

Parameters:
Returns: bool

Returns true if two rows are equal, supporting Don't Care terms

row1 : TruthTableRow
row2 : TruthTableRow
Returns: bool

tableTryFind row tMap

Full Usage: tableTryFind row tMap

Parameters:
Returns: TruthTableRow list option

Alternative to Map.tryFind for Table Maps which supports Don't Care terms. If a row maps to multiple rows (happens with Don't Care Rows), all rows are returned.

row : TruthTableRow
tMap : Map<TruthTableRow, TruthTableRow>
Returns: TruthTableRow list option

Type something to start searching.