Closed davidweichiang closed 2 years ago
Originally, it was coin
that was a factor with all zero weights. To match code/example12.json though, coin
needed to be a nonterminal. I think I probably just added the zero weights factor 0
to allow me to actually set the extern weights in the json and try running it for debugging purposes.
Are you thinking that the FGG file should have "domains", "factors", "nonterminals", "rules", and "externs"?
I'm thinking that it can be a factor, but its function is "extern"
instead of "categorical"
? Like this:
{
"function": "extern",
"type": ...
}
I think that looks good; then I'll have to modify the FGG side to handle those incomplete factors.
It seems like extern declarations are currently compiled to a factor with all zero weights. For example
has a nonterminal
coin
that rewrites to a factor0
with all zero weights. Is that right? What's the reason for the separation betweencoin
and0
?Should we extend the FGG file format to have external nonterminals or factors, to make explicit that it was declared
extern
?