-
Notifications
You must be signed in to change notification settings - Fork 5
API
Stefano Germano edited this page Jul 22, 2020
·
6 revisions
Execute the program in "program" with the option in "name" and the specific solver in "language" and "engine"
{
"language": "asp",
"engine": "dlv",
"option": [
{
"name": "-silent"
}
],
"program": [
"test(1)."
]
}
{
"definitions": "API's schema",
"type": "object",
"properties": {
"engine": {
"default": "dlv",
"description": "The engine to run the program",
"type": "string"
},
"language": {
"default": "asp",
"description": "The language to run the program",
"type": "string"
},
"option": {
"name": {
"default": "",
"description": "The options of the solver",
"type": "string"
},
"type": "array"
},
"program": {
"default": "",
"description": "The program to be executed",
"type": "string"
}
},
"required": ["engine", "language", "program"]
}
application/json
- Content:
{
"language": "asp",
"engine": "dlv",
"option": [
{
"name": "-silent"
}
],
"program": [
"test(1)."
]
}
- Content:
{
"model": "{test(1)}\n",
"error": ""
}
Please note the missing dot in the logic program
- Content:
{
"language": "asp",
"engine": "dlv",
"option": [
{
"name": "-silent"
}
],
"program": [
"test(1)"
]
}
- Content:
{
"model": "",
"error": "syntax error"
}