Basic data structures - NTU-ALComLab/LSV-PA GitHub Wiki

In the following we list the data structures that will probably be used in the PAs.

Important classes

Abc_Frame_t: command registration, store the current network, etc.

Abc_Ntk_t: model a network

A network could have different types. In the demo, we have seen two types: ABC_NTK_LOGIC (logic network) and ABC_NTK_STRASH (AIG). You can find the complete description here.

Abc_Obj_t: model a gate

A gate could have different types. Most often we will use ABC_OBJ_PI, ABC_OBJ_PO, and ABC_OBJ_NODE. You can find the complete description here.

Operation

Rule of Thumb: Always try to use the provided APIs to operate these objects!

For example, to access the current network (e.g., the circuit read by command read), use function Abc_FrameReadNtk(Abc_Frame_t* p).

Most of the time there is an API for the specific operation you want. If you cannot find a suitable API, create an issue and the TA will take a look.

You can find many useful APIs in this file.

Notice that there are many iterators to increase the readability of your code.