data_generator
generate_single_data_asp_definition(data_input, with_comments=False)
Given a data input, generate the corresponding ASP definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_input |
DataInput
|
DataInput object with the containing data |
required |
with_comments |
bool
|
if true, generate the definition including ASP comments |
False
|
Returns:
| Type | Description |
|---|---|
str
|
data encoded in ASP definition |
Source code in json_logic_asp/translator/data_generator.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |