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

shex-cg-2 Moved to https://pad.okfn.org/p/shex-cg

abstract <A>           [<sA>~         ] and           { <p> [0 1 2 3 4 5 6 7 8 9] } # 0 1 2 3 4 5 6 7 8 9
abstract <B> -<A>      [<sAB>~        ] and           { <p> [  1 2 3 4 5 6 7 8  ] } #   1 2 3 4 5 6 7 8
         <C>           [<sABC>~       ] and           { <p> [      3 4 5 6 7 8 9] } #     2 3 4 5 6 7 8
abstract <D> -<B> -<C> [<sABCD>~      ] and           { <p> [0 1     4 5 6 7   9] } #       3 4 5 6 7
abstract <E>           [<sABCDE>~     ] and &<D>      { <p> [0                  ] } #       3 4 5 6 7    , p:0
         <F>           [<sABCDEF>~    ] and           { <p> [  1                ] } #                      p:1
abstract <G>           [<sABCDEFG>~   ] and &<E> &<F> { <p> [                  9] } #         4 5 6 7    , p:0, p:1,      p:9
abstract <H> -<G>      [<sABCDEFGH>~  ] and           { <p> [0 1 2 3   5 6 7   9] } #           5 6 7    , p:0, p:1,      p:9
         <I>           [<sABCDEFGHI>~ ] and           { <p> [                8  ] } #                 8
         <J> -<H>      [<sABCDEFGHIJ>~] and &<I>      { <p> [0 1 2 3     6 7   9] } #             6 7    , p:0, p:1, p:8, p:9

abstract <A>           [<sA>~         ] and           { <p> [0 1 2 3 4 5 6 7 8 9] } # p:0-9
abstract <B> -<A>      [<sAB>~        ] and           { <p> [  1 2 3 4 5 6 7 8  ] } # p:1-8
         <C>           [<sABC>~       ] and           { <p> [      3 4 5 6 7 8 9] } # p:2-8
abstract <D> -<B> -<C> [<sABCD>~      ] and           { <p> [0 1     4 5 6 7   9] } # p:3-7
abstract <E>           [<sABCDE>~     ] and &<D>      { <p> [0                  ] } # p:4-7, p:0
         <F>           [<sABCDEF>~    ] and           { <p> [  1                ] } #            p:1
abstract <G>           [<sABCDEFG>~   ] and &<E> &<F> { <p> [                  9] } # p:4-7, p:0, p:1,      p:9
abstract <H> -<G>      [<sABCDEFGH>~  ] and           { <p> [0 1 2 3   5 6 7   9] } # p:5-7, p:0, p:1,      p:9
         <I>           [<sABCDEFGHI>~ ] and           { <p> [                8  ] } #                  P:8
         <J> -<H>      [<sABCDEFGHIJ>~] and &<I>      { <p> [0 1 2 3     6 7   9] } # p:6-7, p:0, p:1, p:8, p:9

<J> [<sABCDEFGHIJ>~] and {
  <p> [6 7];
  <p> [0];
  <p> [1];
  <p> [8];
  <p> [9];
}

<sABCDEFGHIJK> <p> 6,0,1,8,9.

{ <sABCDEFGHIJK> <p> 0, 2, 3, 4, 5. }@<J>

abstract <A>           /sA.........$/ and           { <p> [0 1 2 3 4 5 6 7 8 9]+} # 0 1 2 3 4 5 6 7 8 9+
abstract <B> -<A>      /s.B........$/ and           { <p> [0 1   3 4 5 6 7 8 9]+} # 0 1   3 4 5 6 7 8 9+
         <C>           /s..C.......$/ and           { <p> [0 1 2   4 5 6 7 8 9]+} #       -            +
abstract <D> -<B> -<C> /s...D......$/ and           { <p> [0 1 2 3   5 6 7 8 9]+} # 0 1       5 6 7 8 9+
abstract <E>           /s....E.....$/ and &<D>      { <p> [    2              ] } # 0 1 +     5 6 7 8 9+, p:2
         <F>           /s.....F....$/ and           { <p> [      3            ] } #       +               p:3
abstract <G>           /s......G...$/ and &<E> &<F> { <p> [        4          ] } # 0 1     + 5 6 7 8 9+, p:2, p:3, p:4
abstract <H> -<G>      /s.......H..$/ and           { <p> [0 1 2 3 4 5     8 9]*} # 0 1       5     8 9+, p:2, p:3, p:4
         <I>           /s........I.$/ and           { <q> [          5        ] } #           +                          q:5
         <J> -<H>      /s.........J$/ and &<I>      { <q> [            6      ] } # 0 1             8 9*, p:2, p:3, p:4, q:5, q:6

{ <sABCDEFGHIJK> <p> 0, 2, 3, 4, 5. }@<A>

A: -B
  B: -D
    D: &E
      E: &G
        G: -H
          H: -&
            J:
-> [<sABCDEFGHIJK>@<J>]
r: A B C G H
e: D E F I

p:0-1 8-9*, p:2, p:3, p:4, p:5

H { <p> [0-35-9] 
    Dt           
   |___A________|
   |___B________|
   |___C________|
   |___D-Dt_____|
                 ; <p> [2] ; <p> [3] ; <p> [4]
                   Et        Ft        Gt     
   |___E-Et_______________| |__F-Ft_|         
   |___G-Gt___________________________________|
   |___H______________________________________|
                                               ; <q> [5] ; <q> [6] }
                                                 It        Jt
                                                |__I-It_|
   |___J-Jt_______________________________________________________|

{
  A:ShapeDecl (
    AND(/sA.........$/,
        { <p> 0123456789 + }) ),
  B:ShapeDecl -A (
    AND(sAB>~ /s.B........$/,
        { <p> 013456789 + }) ),
  C:AND(/s..C.......$/,
        { <p> 012456789 + }),
  D:ShapeDecl -B -C (
    AND(/s...D......$/,
        { <p> 012356789 + }) ),
  E:ShapeDecl (
    AND(/s....E.....$/,
        { &D ; <p> 2  }) ),
  F:AND(/s.....F....$/,
        { <p> 3  }),
  G:ShapeDecl (
    AND(/s......G...$/,
        { &E ; &F ; <p> 4  }) ),
  H:ShapeDecl -G (
    AND(/s.......H..$/,
        { <p> 01234589 * }) ),
  I:AND(/s........I.$/,
        { <q> 5  }),
  J:ShapeDecl -H (
    AND(/s.........J$/,
        { &I ; <q> 6 }) )
}

{
  Gt:X(
    Shape(
      Each(
        (&E) ;
        (&F) ;
        <p> 4
      )
    ),
    {}
  ),
  Gt:X(
    Shape(Each(
      Each(
        (&D) ;
        <p> 2
      !sE) ; // &E
      (&F) ;
      <p> 4)),
    {
      sE: /s....E.....$/
    }
  ),
  Gt:X(
    Shape(Each(
      Each(
        Each(
          <p> 012356789 +
        !sD) ; // &D
        <p> 2
      !sE) ; // &E
      (&F) ;
      <p> 4)),
    {
      sD: AND(-B, -C /s...D......$/)
      sE: /s....E.....$/
    }
  ),
  Gt:X(
    Shape(
      Each(
        Each(
          Each(
            <p> 012356789 +
          !sD) ; // &D
          <p> 2
        !sE) ; // &E
        Each(
          <p> 3 
        !sF) ; // &F
        <p> 4)
        ),
    {
      sD: AND(-B, -C, /s...D......$/),
      sE: /s....E.....$/,
      sF: /s.....F....$/
    }
  ),
  J:ShapeDecl(
    AND(
      AND(
          AND(
              /s......G...$/,
              { &E ;
                &F ;
                <p> 4  }
          ),
          /s.......J..$/,
          { <p> 01234589 * }
         ),
        /s.........J$/,
      { &I ;
        <q> 6 }
    )
  )
}

[
  A:ShapeDecl abstract (
      AND(<sA>~,
          { <p> 0123456789 + }) )
  B:ShapeDecl abstract -A (
      AND(<sAB>~,
          { <p> 013456789 + }) )
  C:AND(<sABC>~,
        { <p> 012456789 + })
  D:ShapeDecl abstract -B -C (
      AND(<sABCD>~,
          { <p> 012356789 + }) )
  E:ShapeDecl abstract (
      AND(<sABCDE>~,
          { &D ; <p> 2  }) )
  F:AND(<sABCDEF>~,
        { <p> 3  })
  G:ShapeDecl abstract (
      AND(<sABCDEFG>~,
          { &E ; &F ; <p> 4  }) )
  H:ShapeDecl abstract -G (
      AND(<sABCDEFGH>~,
          { <p> 01234589 * }) )
  I:AND(<sABCDEFGHI>~,
        { <q> 5  })
  J:ShapeDecl -H (
      AND(<sABCDEFGHIJ>~,
          { &I ; <q> 6 }) )
]


  J:ShapeDecl -H (
      AND(<sABCDEFGHIJ>~,
          { &I ; <q> 6 }) )

  J:AND(<sABCDEFG>~,
        { <<AND(<sABCDE>~,
                { <<AND(<sA>~,
                        { <p> 0123456789 + },
                        <sAB>~,
                        { <p> 013456789 + },
                        <sABC>~,
                        { <p> 012456789 + },
                        <sABCD>~,
                        { <p> 012356789 + })>> ;  s1
                  <p> 2  })>> ;                   s2
          <<AND(<sABCDEF>~,
                { <p> 3  })>> ;                   s3
          <p> 4  },                               s4
        <sABCDEFGH>~,
        { <p> 01234589 * },
        <sABCDEFGHIJ>~,
        { <<AND(<sABCDEFGHI>~,
                { <q> 5  })>> }                   s5
        { <q> 6 })                                s6

  J:AND(<sABCDEFG>~,
        { <<AND(<sABCDE>~,
                { <<{ <p> 012356789 + }  e1>> ;   s1
                  <p> 2  })>> ;                   s2
          <<AND(<sABCDEF>~,
                { <p> 3  })>> ;                   s3
          <p> 4  },                               s4
        <sABCDEFGH>~,
        { <p> 01234589 * },
        <sABCDEFGHIJ>~,
        { <<AND(<sABCDEFGHI>~,
                { <q> 5  })>> }                   s5
        { <q> 6 })                                s6


e1: AND(<sA>~,
        { <p> 0123456789 + },
        <sAB>~,
        { <p> 013456789 + },
        <sABC>~,
        { <p> 012456789 + },
        <sABCD>~)
                        

s1 (e1) -> s2
s2 -> s3
s3 -> s4
s4 -> s5
s5 -> accept


G[1] TE:
  {          &E           ; &F      ; <p> [4]}
  {          &D ; <p> [2] ; <p> [3] ; <p> [4]}
             E[0]           F[0]
  {<p> [0-35-9] ; <p> [2] ; <p> [3] ; <p> [4]}
             E[0]           F[0]


D = A -B -C -4
E = D &2
G =   &E &F &4
H = G -1.4,8.9
J = H &I
J = (G -1.4,8.9) &I
J = ((&E &F &4) -1.4,8.9) &I
J = ((&(D &2) &3 &4) -1.4,8.9) &I
J = ((&((A -B -C -4) &2) &3 &4) -1.4,8.9) &I
J = ((&((0.1,5.9) &2) &3 &4) -1.4,8.9) &5

J = H &I
J = (-G AND {:p [0 1 2 3 4 8 9]+}) &{:p [5]}
J = ((&E &F &{:p [4]}) AND {:p [0 1 2 3 4 8 9]+}) &{:p [5]}
J = (((&D &{:p [2]}) &{:p [3]}  &{:p [4]}) AND {:p [0 1 2 3 4 8 9]+}) &{:p [5]}
J = ((((B AND C) &{:p [2]}) &{:p [3]}  &{:p [4]}) AND {:p [0 1 2 3 4 8 9]+}) &{:p [5]}
J = (((({:p [0 1 3 4 5 6 7 8 9]} AND {:p [0 1 2 3 5 6 7 8 9]}) &{:p [2]}) &{:p [3]}  &{:p [4]}) AND {:p [0 1 2 3 4 8 9]+}) &{:p [5]}
J = ((((
        {:p [0 1 3 4 5 6 7 8 9]}
    AND {:p [0 1 2 3 5 6 7 8 9]})
       &{:p [2]})
      &{:p [3]}
      &{:p [4]}) AND {:p [0 1 2 3 4 8 9]+})
    &{:p [5]}

PREFIX : <>
<J1> { $<J1-TE> :p [0 1 3 4 5 6 7 8 9] AND [0 1 2 3 5 6 7 8 9] AND [0 1 2 3 4 8 9] }
<J2> { &<J1-TE> ; :p [2]; :p [3]; :p [4]; :p [5] }