Open eignnx opened 4 years ago
ok well with respect to that ambiguous example:
rule subj.Number.Gender = pronoun.Number.Person.Gender
the most common behavior would be to instantiate a new variable if it's unnamed, so i guess the behavior of that code outta be to instantiate new variables.
so then some special syntax is needed to do what i wanted to do originally.
another concern to be accounted for is: what if you have two parameters of the same type? like:
rule string.Bit.Bit = substring.Bit@1.Bit@2
rule something.Number.Gender.Gender = something_else.Number#1.Person.Gender#1.Gender#2
rule something.Number.Gender.Gender = something_else.#1.Person.#2.#3
-- now we've lost all self-documentation of types, so i'm concerned w this sol'n.
rule something.Number.Gender.Gender = something_else.Number@1.Person.Gender@2.Gender@3
rule something.Number.Gender.Gender = something_else.Number::1.Person.Gender::2.Gender::3
rule something.Number.Gender.Gender = something_else.Number::1.Person.Gender::2.Gender::3
rule something.Number.Gender.Gender = something_else.Number^1.Person.Gender^2.Gender^3
rule something.Number.Gender.Gender2 = something_else.^Number.Person.^Gender.^Gender2
-- here the number is only required if the system can't tell which `Gender` is being referred to.
-- the sigil is always required tho.
rule something.Number.Gender.Gender2 = something_else.@Number.Person.@Gender.@Gender2
rule something.Number.Gender.Gender2 = something_else.#Number.Person.#Gender.#Gender2
rule something.Number.Gender.Gender2 = something_else.::Number.Person.::Gender.::Gender2
rule something.Number.Gender.Gender2 = something_else.%Number.Person.%Gender.%Gender2
rule something.Number.Gender.Gender2 = something_else.*Number.Person.*Gender.*Gender2
rule something.Number.Gender.Gender2 = something_else.~Number.Person.~Gender.~Gender2
rule something.Number.Gender.Gender2 = something_else.$Number.Person.$Gender.$Gender2
rule something.Number.Gender.Gender2 = something_else.&Number.Person.&Gender.&Gender2
maybe you use some sigil to both:
rule something.Number.Gender.Gender = something_else.Number`.Person.Gender`.Gender``
rule something.Number.Gender.Gender = something_else.Number!.Person.Gender!.Gender!!
rule something.Number.Gender.Gender = something_else.Number#.Person.Gender#.Gender##
rule something.Number.Gender.Gender = something_else.^Number.Person.^Gender.^^Gender
rule something.Number.Gender.Gender = something_else.@Number.Person.@Gender.@@Gender
rule something.Number.Gender.Gender = something_else.#Number.Person.#Gender.##Gender
rule something.Number.Gender.Gender = something_else.*Number.Person.*Gender.**Gender
rule something.Number.Gender.Gender = something_else.%Number.Person.%Gender.%%Gender
rule something.Number.Gender.Gender = something_else.&Number.Person.&Gender.&&Gender
this will be resolved by #17
basically this is annoying to have to do:
when we wanna forward some parameters, why not just pretend they already exist and have been given names based on the rule signature:
Drawbacks
this could get confusing because i think ppl's default is to use an unnumbered variable both:
example:
does the previous example pass two fresh variable instantiations to
pronoun
? or does it use the parameters passed intosubj
?that's ambiguous and there needs to be one of:
pronoun.@Number.Person.@Gender
) to specify on behavior over the other