Ampersand icon indicating copy to clipboard operation
Ampersand copied to clipboard

Semantics of #-operator

Open RieksJ opened this issue 6 years ago • 3 comments

Based on that the operator # is called the cartesian product, I would expect the following scriptlet to compile without errors:

CONTEXT Issue788
r :: A * B   REPRESENT Arg1 TYPE ALPHANUMERIC
s :: A * C
t :: A * A [PROP]

RULE "what is wrong": r;"Apotheker"#s~ |- t
ENDCONTEXT

Instead, I get a parser error:

Parsing stumbled upon operator '#'
at that point expecting keyword "META", keyword "PATTERN", keyword "PROCESS", keyword "RULE"
, keyword "CLASSIFY", keyword "RELATION", lower case identifier, keyword "CONCEPT", keyword
"REPRESENT", keyword "ROLE", keyword "SERVICE", keyword "SPEC", keyword "IDENT", keyword "VI
EW", keyword "INTERFACE", keyword "SQLPLUG", keyword "PHPPLUG", keyword "PURPOSE", keyword "
POPULATION", keyword "INCLUDE" or keyword "ENDCONTEXT"

My request is rooted in the observation that Ampersand is said to be robust. Therefore:

  • either remove the # operator (e.g. if there is no difference in implementation between # and ;V;)
  • or implement it properly (e.g. if there is a difference, e.g. in performance of created SQL).

The latter option has at least consequences for the parser (as this issue shows) and the type checker (as is shown by #785), but there may be more to it.

RieksJ avatar Jun 03 '18 05:06 RieksJ