quangis / transforge

Describe processes as type transformations, with inference that supports subtypes and parametric polymorphism. Create and query corresponding transformation graphs.
GNU General Public License v3.0
2 stars 0 forks source link

Annotating types of data sources #88

Open nsbgn opened 2 years ago

nsbgn commented 2 years ago

We want to work with the most specific type possible. However, we deduce the type of data sources from the most general corresponding input type of the tools that process it (cf graph.py#L202). This is not necessarily the most specific type of the data, and so the final output type may not be the most specific, either.

It would be helpful to be able to annotate data sources with their specific type. The only thing that would be needed would be for the library to understand <source node> ta:type <type node> statements in the workflow specification and to instantiate corresponding source expression with the corresponding type.

Deduction via tool specification is still a pretty good method if such annotations aren't available. Note that it's not a problem at all that a data source can be conceptualized in multiple ways (see also issue #87). In this case, there would simply be multiple ta:type predicates on the source, and the tool would pick the one it likes via the standard polymorphic mechanisms.

nsbgn commented 2 years ago

See commit 2905a4c570e8a3681923da56ad8e81794fa133c7 for where this behaviour should be added.