A Core library for Discrete-Event Systems