This is a read only archive of pad.okfn.org. See the shutdown announcement for details.

shex-cg ## Telecon 2018-02-13  Minutes

 * Participants: Kat, Eric, Gregg, Jeremie, Lucas, Harold, Tom
 * Regrets: Dimitris, Lars

Call in Jitsi # https://meet.jit.si/ShEx


 * Chair: Eric
 * Scribe: Gregg

last minutes: https://github.com/shexSpec/shex/blob/master/meetings/20180130-minutes.md

Agenda: https://github.com/shexSpec/shex/blob/master/meetings/20180213-agenda.md

## Pending actions

Eric: there's been lots of work on Jupyter, but Tom's going to be late to discuss.

### New members

Jeremie: I've been recruited to work on the Java ShEx implementation. Mostly to take Iovka's work and push it as far as I can.
... I've managed to implement a parser and some of the algorithms, so I understand how it works.
... For now, I don't have any specific things to work on. I'm also hear to update Iovka about what' happening in the community.

## Community Updates

### Brainstorming document for a publication related to Harold's PyShEx: https://pad.okfn.org/p/shex-article-outlines

Harold: I've done some more work with Jupyter Notebook to do some of the cool stuff. There are some pretty interesting things
... we could do, particularly as relates to ANdra's work. Any page can have something to render as SVG.
... We could have a straig ShEx magic page and edit in it's raw form, without needing multiple quotes.
... I can always use inputs/reviews/ideas. Someone had mentioned trying to represent an image of the Primer in Jupyter.

Eric: I think Tom's still working on that.

Harold: The biggest challenge is switching to Markdown for the actual documentation. ReSpec tends to look like one big document, which
makes muliti-page things that Jupyter uses challenging.

Gregg: Yvonne had suggested that for JSON-LD 1.1, has lots of examples, you want to be able to see different versions, inline expansions, etc. Trying to do that statically gets to be verbose
... a more dynamic mechanism that would allow you to switch modes, or show results of framing, or build the playground into the spec, that is what ericP did with Shex spec. Why not extend
... to allow live examples. Live capability in respec would be grate. maybe iframes?

Eric: The Primer has "tryit" links which solve a similar problem.

### Updates on Restrictions and Extension

* [Extension](https://rawgit.com/shexSpec/primer/on-shape-expression/index.html#extension)

Eric: This is a start on a branch of the Primer talking about Inheritance. This is an un-marked up version, which uses "@" to describe extension.
... This was an example from the ShEx 1 Fancy ShEx demo, which models a bit of what the extension does. I wanted to use this to ask the group if this is what we want.
... This one is fairly simple, saying "I've got an Issue Shape reported by a Person Shape and User Shape". User Shape extends Person Shape, as does Employee SHape.

* [Validator](https://rawgit.com/shexSpec/shex.js/on-shape-expression/doc/shex-simple.html?manifestURL=../examples/inheritance/manifest.json)

Eric: (shares screen) There's a clinical use case. We have an observation, with Blood Pressure and Observation with a component including systolic and diastolic.
... It's meant to be a difficult problem for the validator. When someone has one of these observations, they have an observation with two components.
... If they have a posture  or recliened observation, it has more components. Validating has all but two pass.
... To do this, I needed to close all the inherited classes (this is how to do without inheritance).
... I also needed to put lables on Triple Expressions so that people know how to reuse schemas.

Harold: This is a constraint type language, but we've made promises to the FHIR community that we can do this, in a way that is easier to understand than in native FHIR.
... This proves doable, but needs work.

Eric: Another screen uses inheritance, so that "VItal" doesn't need to be a closure. Shows PostureBP extending both BP and PostureVital.
... It's restricted to "*", and it has 2, so it fits.
... If something passes BP, it must also pass Observation.
... EXTENDS means to "grab" the expressions of each extension. Now I have three components, coming from each.
... One of the things Gregg warned about is what happens when you have complex things with multiple inheritance.
... I looked at different languages to model this and thought Eifel had dealt with this, you get to include a structure twice, but RDF doesn't do that (only one copy of statements).
... If addresses are embedded, I don't know which come from one vs the other.
... When you extend, and you inherit twice, it only shows up one.
... The other interesting bit, is if I have something that matches both, a restriction does not necessarily apply to both.
... When we validate the partition allocated to Reclined, we only test part of the partition. We had a partition where lieA and lieB were applied to BP, and lieC was applied to Reclined.
... We only test lieC because the others would fail. I have some harry examples that explore this.
... We eneded up attaching Shape Expressions to Triple Expressions.
... We basically improve ShEx by saying you can attach Shape Expressions to Triple Expressions.
... I then extended my parser to have a surface syntax to do this, using the "ON" keyword.
... That effectively extends the abstract syntax, and provides a concrete syntax that may not be that useful, except it allows you to say what a shape turns into after processing extensions and restrictions,
... RESTRICTS and EXTENDS are represented in ShExJ as well. No round-tripping after unwinding to use ON syntax.
... It seems crazy to have to extend the abstract syntax to do this, but this use case shows why it's important.
... (Gregg suggests testing to show processors expand the same way, and not necessarily just test for pass/fail)
... This creates a good extension point.

Harold: Can we get a quazi-formal description of onShapeExpression soon? I'd like to go over the logic.

Eric: I need to figure that out, I can tell you how I implemented it
... You can pass in a "neighborhood", any shapes it's validating work from the neighborhood, rather than the graph.

Harold: I want to go back to some other constraint languages and see the issues they've hit, and if this might speak to them as well.

Eric: One thing my implementation doesn't do is, if I'm validating a Triple Expression and then need to evaluate a Shape Expression with a neighborhood,
... if that had a reference out that pointed out, the override of the neighborhood is gone, but that edge case is pretty far off.

Harold: As an experiment, I took the ShEx spec which was quazi-formal and implemented it as literally as I could and I was able to produce a ShEx interpreter.

Eric: Do Extensions participate in Inheritance? The example "J" assumes that they do.