Case Study: Experiences with Implementation of a CAD Compiler in Scala 3
This case study explores our experiences in implementing a place-and-route CAD compiler using Scala 3. Our initial development was in Python, but challenges with mutability led us to adopt Scala, drawing from positive experiences with the Chisel hardware construction language and the FIRRTL compiler. We initially utilised JavaSMT for SMT solver interactions but opted to develop bespoke SMT abstractions for finer control. Our approach emphasised global immutability while allowing local mutability for performance, alongside type classes for extensibility. We leveraged Mill, uPickle, and Ammonite for efficient development. Despite Scala’s advantages, including cross-platform compatibility and blending of functional and object-oriented programming, challenges such as limited library support and recruitment difficulties persist.