SUPER parser

The header <lorina/super.hpp> implements methods to parse the SUPER format.

The class lorina::super_reader provides the following public member functions.

Function

Description

on_super_info(genlib_name, max_num_vars, max_supergates, num_lines)

Callback method for supergate library

on_supergate(name, is_super, fanins_id)

Callback method for parsed gate definition

The following reader functions are available.

Function
Description

read_super

Reader function for the SUPER format.

read_super

Reader function for the SUPER format.
inline return_code lorina::read_super(std::istream &in, const super_reader &reader, diagnostic_engine *diag = nullptr)

Reader function for the SUPER format.

Reads SUPER format from a stream and invokes a callback method for each parsed primitive and each detected parse error.

Parameters
  • in – Input stream

  • reader – SUPER reader with callback methods invoked for parsed primitives

  • diag – An optional diagnostic engine with callback methods for parse errors

Returns

Success if parsing has been successful, or parse error if parsing has failed

inline return_code lorina::read_super(const std::string &filename, const super_reader &reader, diagnostic_engine *diag = nullptr)

Reader function for the SUPER format.

Reads SUPER format from a .super file generated by ABC and invokes a callback method for each parsed primitive and each detected parse error.

Parameters
  • filename – Name of the file

  • reader – SUPER reader with callback methods invoked for parsed primitives

  • diag – An optional diagnostic engine with callback methods for parse errors

Returns

Success if parsing has been successful, or parse error if parsing has failed