cql icon indicating copy to clipboard operation
cql copied to clipboard

Add 'pivot' functionality

Open epost opened this issue 5 years ago • 4 comments

  • [x] resolve merge conflicts in PR #128
  • [x] push as a new PR: ~~#145~~ #147
  • [x] fix build issues
    • [x] ~~Stack: Data.Rewriting is missing, seems to need http://hackage.haskell.org/package/term-rewriting~~
      • [x] ~~try term-rewriting >= 0.4.0.1 with lts-13.30~~
  • [ ] finish pivot feature
    • [ ] enable test for Petri.cql
      • [ ] executing this test (cql examples/Petri.cql) results in:
        $ stack exec cql examples/Petri.cql
        Eval Error in Net: Duplicate binding: "trans"
        
        On 7 December 2018, @marcosh said about this:

        It looks like the parses does not allow duplicate bindings.

    • [ ] address cyclic imports
      • [ ] https://github.com/statebox/cql/compare/ryan4-merge-attempt-2?expand=1#diff-7a32a3725395a0fbfa7183fffc3f95c1R150
      • [ ] https://github.com/statebox/cql/compare/ryan4-merge-attempt-2?expand=1#diff-40151bb66383c85c51daa6ea672784d5R212
      • [ ] Schema.hs would do a cyclic import of Instance.hs
        • SchemaExp needs to define SchemaPivot, which needs InstanceExp, see here
  • [ ] check test suite
    • [x] rename remaining aql occurrences to cql
    • [x] check test for KB.cql
    • [ ] ...
  • [x] address @marcosh's comments on https://github.com/statebox/cql/pull/128
  • [ ] have Ryan sign off on CLAHub (look for the string clahub on the conversation page

epost avatar Jul 31 '19 14:07 epost

problem

Stack build chokes on Could not find module ‘Data.Rewriting.CriticalPair’.

solution steps

  • [x] Add term-rewriting to packages.yaml. (Was already there, though without version bounds).
  • [ ] ...?...

reproduce

Type stack build and note the following to an appropriate level of dismay:

    /Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:44:1: error:
        Could not find module ‘Data.Rewriting.CriticalPair’
        There are files missing in the ‘term-rewriting-0.2.1.1’ package,
        try running 'ghc-pkg check'.
        Use -v to see a list of the files searched for.
       |
    44 | import           Data.Rewriting.CriticalPair as CP
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:45:1: error:
        Could not find module ‘Data.Rewriting.Rule’
        There are files missing in the ‘term-rewriting-0.2.1.1’ package,
        try running 'ghc-pkg check'.
        Use -v to see a list of the files searched for.
       |
    45 | import           Data.Rewriting.Rule         as R
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:46:1: error:
        Could not find module ‘Data.Rewriting.Rules’
        There are files missing in the ‘term-rewriting-0.2.1.1’ package,
        try running 'ghc-pkg check'.
        Use -v to see a list of the files searched for.
       |
    46 | import           Data.Rewriting.Rules        as Rs
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:47:1: error:
        Could not find module ‘Data.Rewriting.Term’
        There are files missing in the ‘term-rewriting-0.2.1.1’ package,
        try running 'ghc-pkg check'.
        Use -v to see a list of the files searched for.
       |
    47 | import           Data.Rewriting.Term         as T
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

epost avatar Jul 31 '19 15:07 epost

This may be file Data.Rewriting.CriticalPair.Type in rewriting-0.4.x.y. It looks like there are other API changes as well.

On Jul 31, 2019, at 11:13 AM, Erik Post [email protected] wrote:

problem

Stack build chokes on Could not find module ‘Data.Rewriting.CriticalPair’.

reproduce

Type stack build and note the following to an appropriate level of dismay:

/Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:44:1: error:
    Could not find module ‘Data.Rewriting.CriticalPair’
    There are files missing in the ‘term-rewriting-0.2.1.1’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
44 | import           Data.Rewriting.CriticalPair as CP
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:45:1: error:
    Could not find module ‘Data.Rewriting.Rule’
    There are files missing in the ‘term-rewriting-0.2.1.1’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
45 | import           Data.Rewriting.Rule         as R
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:46:1: error:
    Could not find module ‘Data.Rewriting.Rules’
    There are files missing in the ‘term-rewriting-0.2.1.1’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
46 | import           Data.Rewriting.Rules        as Rs
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/Users/erik/dev/statebox/cql-master/src/Language/Prover.hs:47:1: error:
    Could not find module ‘Data.Rewriting.Term’
    There are files missing in the ‘term-rewriting-0.2.1.1’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
47 | import           Data.Rewriting.Term         as T
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

wisnesky avatar Jul 31 '19 15:07 wisnesky

Oh hey @wisnesky! :) Thanks for the feedback, I was just trying to convince stack to try the latest 4.x, although I couldn't find any API changes at first sight. Anyway, let me press on with that then; Stack didn't seem cooperative in depending on a 4.x so far.

epost avatar Jul 31 '19 15:07 epost

I managed to fix this, will clean up and make a PR soon.

epost avatar Aug 03 '19 13:08 epost