API change: convert the abstract class "FormulaType" to interface.#615
API change: convert the abstract class "FormulaType" to interface.#615kfriedberger wants to merge 2 commits intomasterfrom
Conversation
This change makes JavaSMT more open, and allows user applications to define their own formula types and use them in JavaSMT. This also blocks us from marking this class as "sealed" at some time in the future, because users can inherit from it.
|
Just to extend the discussion from #611 a bit. Inheriting from the JavaSMT types is generally dangerous in that the user-specified types will not interact well (if at all) with the existing methods in JavaSMT. Essentially, a custom type cannot be used as a parameter to any method of JavaSMT. In a similar way, record types could be implemented on the user-side, or more specialized types like I have not tested how far the user could go with custom wrappers. IIRC, the fact that |
The idea for this change was brought up in a comment about potential API changes.
This change makes JavaSMT more open for user applications, as it allows them to define their own formula types and use them in JavaSMT. This also blocks us from marking this class as "sealed" at some time in the future, because users can inherit from it.
We can discuss benefit and/or negative effects from this change.