run
get_matching_rules_for_asp_rules_and_data(asp_data_definition, asp_rules_definition, mapping=None)
Given some data definition and rule definition, evaluate it with Clingo and return the matching rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asp_data_definition |
str
|
encoded data in ASP language |
required |
asp_rules_definition |
str
|
encoded rules in ASP language |
required |
mapping |
Optional[Dict[str, str]]
|
optional mapping for the ASP rule ids |
None
|
Returns:
| Type | Description |
|---|---|
List[str]
|
list of matching rules, mapped if provided |
Source code in json_logic_asp/invoker/run.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
get_matching_rules_from_asp_problem(problem, mapping=None)
Given an ASP problem, return the matching rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
problem |
str
|
ASP problem with data, rules and show statement. |
required |
mapping |
Optional[Dict[str, str]]
|
optional mapping for the ASP rule ids |
None
|
Returns:
| Type | Description |
|---|---|
List[str]
|
list of matching rules, mapped if provided |
Source code in json_logic_asp/invoker/run.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |