Journal article

Adtpp: lightweight efficient safe polymorphic algebraic data types for C

L Naish, P Schachte, AM MacNally

Software: Practice and Experience | Wiley: 12 months | Published : 2016

Abstract

Adtpp is an open-source tool that adds support for algebraic data types (ADTs) to the C programming language. ADTs allow more precise description of program types and more robust handling of data structures than are directly supported by C. ADT definitions and other declarations are put in a file that is preprocessed by adtpp to produce a C header (‘.h’) file that can be included in C source files. The generated header file contains C type definitions, macros, and inline functions that support type-safe construction, deconstruction, and pattern matching of ADT values while avoiding unsafe operations such as casts, and avoiding the risk of errors such as dereferencing NULL pointers and access..

View full abstract

University of Melbourne Researchers