g2glab / pg

PG Tools
MIT License
6 stars 1 forks source link

Is `<-` allowed? #29

Closed ryotayamanaka closed 8 months ago

ryotayamanaka commented 3 years ago
a -> b :knows

is the syntax.

b <- a :knows

allows?

nichtich commented 10 months ago

No, but I'd suppport extending the Direction rule to also include <-.

ryotayamanaka commented 10 months ago

Need to consider whether <- improves usability.

FYI,

Formatter https://g2glab.github.io/pg-formatter/

Visualization https://sandbox.blitzboard.io/

ryotayamanaka commented 10 months ago

Thank you for the suggestion!

We also need to consider if <- should exist or not.

This implementation is based on the definition of the ISWC paper below (Definition 5): https://arxiv.org/abs/2203.06393

So, we should update this definition if it is necessary.

nichtich commented 10 months ago

I stick to the property graph model (Definition 4 in https://arxiv.org/abs/2203.06393). The model is too abstract to directly be serialized so there are two minor differences in my current implementation (can be discussed):

So, we should update this definition if it is necessary.

For a final specification it needs to be updated anyway because NODE_ID, STRING and NUMBER are not included and whitespace should better be included as well. I'll try to write a proposal to be discussed.

hchiba1 commented 8 months ago

To be honest, I don't see the necessity for <-.

Pros(?)

Cons

If the merit is limited, then we should keep the specification simple.

nichtich commented 8 months ago

Thanks for summary of your arguments! For me it seemed just a minimal backwards-compatible addition to syntax which is being extended anyway. I can roll back the implementation in pgraphs and move the idea to the list of possible extensions not to be included in version 1.0.0 of PG format, if you prefer.

nichtich commented 8 months ago

I've update pgraphs so with version 0.4.0 direction <- is not allowed in PG format. This issue can be closed.