or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Shape Expressions + Extends 2020-12-18
Meeting 2023/07/11
Extends between Valuesets…
Proposal FINAL + EXTENDABLE:
EXTENDABLE
FINAL
EXTENDABLE
Proposal FINAL
FINAL
FINAL
Extends on non-Shapes (2023-11-29)
Extending shapes and node-constraints
Extends = OR for node-constraints and each-of shapes
translated to ShEx 2.0:
Data (Turtle):
ShapeMap: <myT'>@<T'>
Screw case
Data (Turtle):
ShapeMap: <myU'>@<U'>
Template template, flattened
previous meeting
Idea about having Shape-Diffs, example:
A shape is a node constraint + triple expression
Discussion between using a keyword
Extendable
vsFinal
extendable
final
Use case of harvest method
ericP's previous model
A Shape A constrains the possible values of a node a neighborhood partition
Restricts 11/12/2020
Thoughts on Extends and restricts (Iovka on 10/12 and on 12/12)
On definition of children and descendants
In the above example, we do not want to say that l1 is child of l0 because d(l1) is not the extendee shape.
However,
extends @l0 { te1 }
is a Shape that extends the ShapeExpression d(l0). So we should be able to say thatextends @l0 { te1 }
is a child ofse0 AND { te0 }
Proposition: The children and descendant relations are defined on Shapes, not on shape labels.
A shape hierarchy is a DAG which roots can be ShapeExpressions, but which innern nodes and leaves are Shapes.
On "has a single Shape"
We considered that ShapeExpression can be extended only if it has a single Shape (so that the "mentioned" properties are well identified as the properties that appear in the TripleExpresson of that Shape).
However, a Shape can extend another Shape, in which case it automatically has two TripleExpressions.
Above,
Meeting 9/Dec/2020
Adding a restricts keyword
restricts @l s
=@l AND s
+l' such that d(l') = extends @l s
or d(l') = restricts @l s
Possibility to avoid extends…
4 possibilities:
extend a closed shape with an open one
person closed { <n> . }
,user extends @person { <e> .}
extend a closed shape with a closed shape
person closed {}
,user extends @person closed {}
extend an open shape with a closed one
person {}
,user extends @person closed {}
extend an open shape with an open shape
person {}
,user extends @person {}
extend a closed shape with an open one
person closed extra <n> { <n> [ 1 2 ] }
user extends @person { <e> .}
extend a closed shape with a closed shape
person closed extra <n> { <n> [1 2 ]}
user extends @person closed { <n> }
extend an open shape with a closed one
person {}
,user extends @person closed {}
extend an open shape with an open shape
person {}
,user extends @person {}
Data:
try T1,T4 against
CLOSED @<Person>
,Translation of ShEx+extends to ShEx
turns into a schema:
Without adding extra-labels (full-embedding)
Possible optimization by embedding the shapes in triple expressions…
Meeting Iovka/Eric/Labra 8/Dec/2020
Conjunction descendants…
ericP screwin' around:
=>
Another case:
In the next funny example
<S1>
unsatisfiable but we can extend it to make it satisfiable when translating it and we don't want it to be satisfiable… (the translation must honor the operational semantics of testing a partition of the neighborhood)could be translated to:
( where '&' is a conjunction of REs)
data:
turns into a schema:
ericP trying to figure out AND/OR/NOT
=>
EXTENDS of RESTRICTS 14/Dec/2020
diamond schema:
G2 gets extends the set of what it restricts: (<G1>)
i.e.
<G2> EXTENDS @<G0> {} AND @<G1L> ; @<G1R>
=>Data:
with intermediates:
17/Dec/2020
Input example that will be converted:
=>
<G3¹> as TCs:
17/dec/2020
Output of conversionof conversion:
Data:
intermediates2
17/Dec/2020
Input example that will be converted:
=>
<G3¹> as TCs:
17/dec/2020
Output of conversion:
Data:
FHIR vitals Observations TODO
Example of children
Unsatisfiable1
No set of triples can satisfy
<Base>
. If we don't test that the partition allocated to<Base>
is consistent, we allow<s> :a 2
to satisfy the left conjunct and<s> :a 3
to satisfy the right conjunct. If we do enforce a consistent partition between the TripleConstraints in<Ext>
and those in<Base>
, the ShapeMap below should not be satisfiable.Satisfiable1
This one is satisfiable.
ExtIsOrthogonal1
The predicates in the extending shape's triple constraints are disjoint from those in the base. This should typify he common use case and should be efficient to process.
Here we got stuck figuring out that TC1.2 and TC2.1 could be mapped to the same triple. When looking for a general way to figure that out, the possible partitions seemed to explode. For instance, we could say that every TriplePattern in some conjunct which shared a predicate with a TriplePattern from another conjunct could have a 0 min cardinality. This appeared to be creating a sketch of a TripleExpression designed to acquire triples from the partition. Below we appear to have found a more efficient way to derive the sketch.
Sketch algorithm
Here we construct a sketch by calculating the min and max cardinalities for each predicate mentioned in
<Base>
. We believe this can be extended to include more complex TripleExpressions, e.g. EachOfs with arbitary cardinalities.Given the following declarations:
p
in<BaseDefn>
calculate the maximum of the min-cardinality and the minimum of the max-cardinalities ofp
.EXTRA
forces unlimted max cardinality. Disjunction forces that predicat's minimum cardinality toT 0.g
that matches this expression<Base>
with subgraphg
<ExtDefn>
For ExtIsOrthogonal1,
<Base>
's sketch is(:a .; :b .)
, resulting in an effective TripleExpression:Note that the sketch
(:a .; :b .)
doesn't validate the partition; instead it allocates the triples which are then tested as a neighborhood for the extended shape. While it may be helpful for visualizing/debugging the logic, it's not necessary to materialize the sketch, simply to keep a list of TripleConstraints appearing in the base shapes coupled with their min and max cardinality.We've not explored ShapeNot or ShapeOr. NodeConstraints (on the focus node) seem trivially taken care of. We don't understand concatenation well enough to know if this is an efficient implementation of it.
ExtIsOrthogonal2
This is like ExtIsOrthogonal1 but has the start of some experiments with XSD facets instead of value sets. In Progress, example not self-consistent.
Naïve Semantics by translation
It works in simple cases but passes Unsatisfiable1 (which we don't want).
By translation:
The translation for Unsatisfiable1 would be:
See Also