zxcalc / quantomatic

Quantomatic is a tool for doing automated graph rewriting.
http://quantomatic.github.io
152 stars 22 forks source link

Theory editory doesn't create good default_data #194

Closed akissinger closed 6 years ago

akissinger commented 6 years ago

The default_data field of a given type in a theory needs to look something like this:

"default_data": { "type": "Z", "value": "" }

In particular, it must give values for "type" and "value", even though we can guess the type already. This is a bit redundant, but quanto expects this field to be there, so it either needs to beincluded, or quanto needs to pull this type field from somewhere else if it doesn't find it when loading a graph.

hmillerbakewell commented 6 years ago

Slightly misleading commit title: Nodes are now created with default data.

In the future this should probably be changed: The default data on the node shouldn't need to know the node's name (redundant duplication of data) as the theory should handle that.