Demonstrator - Reasoning WebAPI issueshttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues2020-12-13T19:24:59Zhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/57Number headers only for documentation2020-12-13T19:24:59ZSiebers, MichaelNumber headers only for documentationRegarding the numbering of headers introduced in commit 1dd752e6cf9ca4831eb9c1144ed5c887440dacd1: These are applied to all headlines (in our documentation, auto-generated directory views and the manual). In some places this looks rather ...Regarding the numbering of headers introduced in commit 1dd752e6cf9ca4831eb9c1144ed5c887440dacd1: These are applied to all headlines (in our documentation, auto-generated directory views and the manual). In some places this looks rather ugly, e.g. http://localhost:4444/doc/pldoc/man?section=preddesc.
Could we restrict this formatting to our documentation (directly below `/doc`)?
Implementation note: our documentation is surrounded with a custom wrapper div (id `wiki-wrapper`?)Sebastian SeufertSebastian Seuferthttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/55Automatically generate standalone documentation2021-06-04T21:54:14ZSiebers, MichaelAutomatically generate standalone documentationGenerate standalone documentation in form of local html pages. Generation may be done in CI/CD.Generate standalone documentation in form of local html pages. Generation may be done in CI/CD.Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/54review readme.md2020-12-19T04:18:55ZSiebers, Michaelreview readme.mdRevise main [readme.md](readme.md):
- requirements (SWI-Prolog 8.2.2.)
- short intro how to start server (without arguments or only with `--port`)
- refer to documentation server by the software itselfRevise main [readme.md](readme.md):
- requirements (SWI-Prolog 8.2.2.)
- short intro how to start server (without arguments or only with `--port`)
- refer to documentation server by the software itselfVersion 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/52revise API endpoint documentation2021-06-12T09:00:31ZSiebers, Michaelrevise API endpoint documentationreview and amend [api_endpoints.md](doc/api_endpoints.md):
- review `/bg (GET)`, `/bg (POST)`, `/clear`
- add `/clear/all`
- handle todos in file
- write short section introductionsreview and amend [api_endpoints.md](doc/api_endpoints.md):
- review `/bg (GET)`, `/bg (POST)`, `/clear`
- add `/clear/all`
- handle todos in file
- write short section introductionsVersion 1.0https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/51document JSON schemas2021-06-12T09:00:31ZSiebers, Michaeldocument JSON schemas- revise JSON schemas below `doc/schema`
- link JSON schemas in [api_endpoints.md](doc/api_endpoints.md) where appropriate
- write [schema overview](doc/schema/index.html)- revise JSON schemas below `doc/schema`
- link JSON schemas in [api_endpoints.md](doc/api_endpoints.md) where appropriate
- write [schema overview](doc/schema/index.html)Version 1.0https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/50describe module web_api2020-12-19T04:18:55ZSiebers, Michaeldescribe module web_apiWrite developer documentation for module web_api in [module_web_api.md](doc/module_web_api.md).Write developer documentation for module web_api in [module_web_api.md](doc/module_web_api.md).Version 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/49describe module theory_bg2021-05-13T11:30:31ZSiebers, Michaeldescribe module theory_bgWrite developer documentation for module theory_bg in [module_theory_bg.md](doc/module_theory_bg.md).Write developer documentation for module theory_bg in [module_theory_bg.md](doc/module_theory_bg.md).Version 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/48describe module types2020-12-19T04:18:55ZSiebers, Michaeldescribe module typesWrite developer documentation for module types in [module_types.md](doc/module_types.md).Write developer documentation for module types in [module_types.md](doc/module_types.md).Version 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/46write documentation overview2021-05-13T11:30:31ZSiebers, Michaelwrite documentation overviewwrite / amend the documentation's [landing page](doc/overview.md)write / amend the documentation's [landing page](doc/overview.md)Version 1.0https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/43Write module description for web_api2021-05-13T11:30:31ZSiebers, MichaelWrite module description for web_apiReword structured PLDoc comment in `/src/web_api.pl`.Reword structured PLDoc comment in `/src/web_api.pl`.Version 1.0https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/33Validate JSON input and throw exceptions2020-12-04T17:58:19ZSiebers, MichaelValidate JSON input and throw exceptionsOnly for the `/irrelevant/file` and the `/explain` endpoint, the JSON input is validated. And only these two endpoints throw appropriate exceptions (c.f. !6). These practices should be rolled out to the other endpoints:
- [ ] ~~`/`~~
- ...Only for the `/irrelevant/file` and the `/explain` endpoint, the JSON input is validated. And only these two endpoints throw appropriate exceptions (c.f. !6). These practices should be rolled out to the other endpoints:
- [ ] ~~`/`~~
- [ ] ~~`/add`~~
- [ ] ~~`/remove`~~
- [ ] ~~`/query`~~
- [x] `/state`
- [x] `/bg`
- [x] POST requests (c.f. #21)
- [x] GET requests
- [x] `/clear`
- [x] `/clear/all`
Some of these tasks might be done more easy after #27 is solved.Version 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/26Startup parameters2020-11-26T13:39:06ZSiebers, MichaelStartup parametersStartup options for the server (like port to run on) seem to be managed in the predicate server_opts/1. However, I do not use how to use them. Regarding the port option, for instance, neither of the following works:
```
swipl -s run.pl ...Startup options for the server (like port to run on) seem to be managed in the predicate server_opts/1. However, I do not use how to use them. Regarding the port option, for instance, neither of the following works:
```
swipl -s run.pl --port 8976
```
```
swipl -s run.pl --port=8976
```
```
swipl -s run.pl port=8976
```
According to the swipl usage message, swi-options and programm arguments should (can?) be separated by `--`. This seems to kinda work. However, then our code complains that `--` is no valid argument.
Basically, I have the following questions:
1. How is it possible to start the server with arguments?
1. Which arguments are defined? Or rather, what do they do?
1. Can we print some usage message ourselves? For example with `-h` but without interfering with swipl's `-h` argument?Version 1.0Sebastian SeufertSebastian Seuferthttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/25Describe project2020-12-12T19:06:59ZSiebers, MichaelDescribe projectGive the GitLab project a telling name, maybe provide additional information / linksGive the GitLab project a telling name, maybe provide additional information / linksVersion 1.0Siebers, MichaelSiebers, Michaelhttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/24Document theory_common and theory_templates2020-12-04T19:40:05ZSiebers, MichaelDocument theory_common and theory_templatesDescribe ...
- [x] the idea behind predicates in `theory_common.pl`
- [x] where these predicates are (or might be) used
- [x] the format of explanation templates
- [x] how to load explanation templates
- [x] where explanation templates a...Describe ...
- [x] the idea behind predicates in `theory_common.pl`
- [x] where these predicates are (or might be) used
- [x] the format of explanation templates
- [x] how to load explanation templates
- [x] where explanation templates are usedVersion 1.0https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/20/explain: Is it supposed to be like this?2020-11-23T15:35:40ZSyed Mamoon Ahmed/explain: Is it supposed to be like this?Please tell me what am I doing wrong?
Here is my request:
> {
> "abs_path": "/A/B/Filename-2.exe"
> }
Here is the response:
> HTTP/1.1 400 Bad Request
> Date: Mon, 16 Nov 2020 21:43:23 GMT
> Connection: close
> Content-Le...Please tell me what am I doing wrong?
Here is my request:
> {
> "abs_path": "/A/B/Filename-2.exe"
> }
Here is the response:
> HTTP/1.1 400 Bad Request
> Date: Mon, 16 Nov 2020 21:43:23 GMT
> Connection: close
> Content-Length: 350
> Content-Type: text/html; charset=UTF-8
>
> <!DOCTYPE html>
> <html>
> <head>
> <title>400 Bad Request</title>
>
> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>
> </head>
> <body>
>
> <h1>Bad Request</h1>
>
> <p>
> Unknown message: not_irrelevant('/A/B/Filename-2.exe')</p>
>
> <address>
> <a href="http://www.swi-prolog.org">SWI-Prolog</a> httpd at transmatter-laptop
> </address>
>
> </body>
> </html>Sebastian SeufertSebastian Seuferthttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/15No count in /bg response2020-11-23T15:26:03ZSyed Mamoon AhmedNo count in /bg responseFollowing is the response from /bg endpoint:
> HTTP/1.1 201 Created
> Date: Mon, 16 Nov 2020 19:26:06 GMT
> Content-Type: text/plain; charset=UTF-8
> Connection: Keep-Alive
> Content-Length: 72
>
> Content-type: application/json; chars...Following is the response from /bg endpoint:
> HTTP/1.1 201 Created
> Date: Mon, 16 Nov 2020 19:26:06 GMT
> Content-Type: text/plain; charset=UTF-8
> Connection: Keep-Alive
> Content-Length: 72
>
> Content-type: application/json; charset=UTF-8
>
> "Action: add, Details: 1"
As you can see, there is no count there. (Also, what is count anyway?)Sebastian SeufertSebastian Seuferthttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/4Design server responses for "unexplainable" atoms.2020-12-10T18:35:59ZSiebers, MichaelDesign server responses for "unexplainable" atoms.Currently, explain/4 succeeds only if the atom to explain is true and an explanation can be constructed. For the first part this is intended: if the atom is false an "explanation why this is true" does not make sense. However, what is th...Currently, explain/4 succeeds only if the atom to explain is true and an explanation can be constructed. For the first part this is intended: if the atom is false an "explanation why this is true" does not make sense. However, what is the desired server response in that case? It probably should not be a 500, since there is no server-side error as such. Maybe a 200 with no payload?
What about the second part? When no explanation can be constructed for a true atom this is indeed an error. However, this probably should only happen if the domain designer made a mistake (e.g., forgot an explanation template). So this is probably also no 500.
Both errors should be distinguishable by the client.Version 1.0Sebastian SeufertSebastian Seuferthttps://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/2Define JSON scheme for API IO & Write Wiki2020-12-10T18:37:36ZSebastian SeufertDefine JSON scheme for API IO & Write WikiSebastian SeufertSebastian Seufert