Skip to content

Instantly share code, notes, and snippets.

@dvdsgl
Last active February 28, 2018 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvdsgl/2c9dce4022d3e4987a6e8b48752850cc to your computer and use it in GitHub Desktop.
Save dvdsgl/2c9dce4022d3e4987a6e8b48752850cc to your computer and use it in GitHub Desktop.
A languge-independent logic representation (see https://stackoverflow.com/a/49021991/372047)
{
"id": "http://json-schema.org/geo",
"$schema": "http://json-schema.org/draft-06/schema#",
"description": "A languge-independent logic representation",
"$ref": "#/definitions/Term",
"definitions": {
"Term": {
"type": "object",
"additionalProperties": false,
"description": "A logical value",
"properties": {
"kind": {
"$ref": "#/definitions/Kind"
},
"x": {
"$ref": "#/definitions/Term"
},
"y": {
"$ref": "#/definitions/Term"
},
"value": {
"$ref": "#/definitions/Value"
}
},
"required": [
"kind"
],
"title": "Term"
},
"Value": {
"type": "object",
"additionalProperties": false,
"description": "A key-value term",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
],
"title": "Term"
},
"Kind": {
"description": "The kind of term",
"type": "string",
"enum": [
"and",
"or",
"not",
"value"
],
"title": "Kind"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment