Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TDL/TFS refinements #295

Open
goodmami opened this issue Jun 8, 2020 · 0 comments
Open

TDL/TFS refinements #295

goodmami opened this issue Jun 8, 2020 · 0 comments
Labels
maintenance improving code quality; not features or bugs

Comments

@goodmami
Copy link
Member

goodmami commented Jun 8, 2020

The delphin.tfs module is a core piece that defines the behavior of feature structures, then delphin.tdl subclasses these to create the AVM class, which is basically the same but the values of features are expected to be TDL Terms. AVM is also multiply-inheriting so it is also a TDL Term. This setup causes some unnecessary complexity and inefficiency (see #294).

I kept the FeatureStructure class separate from AVM because I expected to support non-TDL feature structures, such as on tokens. I think I can reduce this complexity a bit without breaking backward compatibility. The basic idea is to move much of the class modeling of delphin.tdl into delphin.tfs (imports would retain the backward compatibility), so that delphin.tdl is almost solely for decoding and encoding TDL files. This is also nice because delphin.tdl was a bit overloaded already. The AVM and FeatureStructure class could possibly be merged, as well. And maybe I would relax the requirement for AVM values to be Terms, instead relying on duck typing and only raising errors if something can't be serialized to TDL (meaning that in-memory TDL structures can contain things that cannot be serialized).

@goodmami goodmami added the maintenance improving code quality; not features or bugs label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance improving code quality; not features or bugs
Projects
None yet
Development

No branches or pull requests

1 participant