Patrick Lühne
09ef64a0e1
Support declaring functions as integer
...
This adds a new syntax for declaring functions integer:
#external integer(<function name>(<arity)).
If a function is declared integer, it may enable some variables to be
detected as integer as well.
2018-04-28 01:48:39 +02:00
Patrick Lühne
618189368c
Split functions from their declarations
...
This splits occurrences of functions from their declaration. This is
necessary to flag integer functions consistently and not just single
occurrences.
2018-04-27 17:59:10 +02:00
Patrick Lühne
d0debc6ad1
Split predicates from their declarations
...
This refactoring separates predicates from their declarations. The
purpose of this is to avoid duplicating properties specific to the
predicate declaration and not its occurrences in the program.
2018-04-27 17:55:59 +02:00
Patrick Lühne
d66d3557c1
Minor refactoring
2018-04-27 17:25:43 +02:00
Patrick Lühne
c294a29cb2
Support placeholders with #external declarations
...
This adds support for declaring predicates as placeholders through the
“#external” directive in the input language of clingo.
Placeholders are not subject to completion. This prevents predicates
that represent instance-specific facts from being assumed as universally
false by default negation when translating an encoding.
This stretches clingo’s usual syntax a bit to make the implementation
lightweight. In order to declare a predicate with a specific arity as a
placeholder, the following statement needs to be added to the program:
#external <predicate name>(<arity>).
Multiple unit tests cover cases where placeholders are used or not as
well as a more complex graph coloring example.
2018-04-08 20:28:57 +02:00
Patrick Lühne
64bd1c17e3
Improved debug output.
2017-06-02 14:59:13 +02:00
Patrick Lühne
2bc60d3eea
Started implementing support for #show statements.
2017-06-01 04:05:11 +02:00
Patrick Lühne
85614296e2
Improved debug message.
2017-06-01 03:32:19 +02:00
Patrick Lühne
0d8b1e94da
Refactored error handling.
2017-05-31 18:03:19 +02:00
Patrick Lühne
7aad8380d1
Refactored logging interface.
2017-05-30 17:19:26 +02:00
Patrick Lühne
59fbc473df
Dropping now unused head variable names.
2017-05-30 16:40:56 +02:00
Patrick Lühne
f78c0e4da5
Reordered constructor parameters of VariableDeclaration.
2017-05-30 16:27:45 +02:00
Patrick Lühne
1c925d661b
Major refactoring to uniquely link variables to their declarations (breaks simplification and completion).
2017-05-30 03:56:35 +02:00
Patrick Lühne
838a68e230
Refactoring to prepare for implementing completion.
2017-04-05 18:15:42 +02:00
Patrick Lühne
5940fc4a3b
Removed workarounds thanks to a fix in clingo.
2017-04-01 03:13:52 +02:00
Patrick Lühne
d0cbdb13e5
Fixed misleading error message concerning negated, unsupported body literals.
2017-03-29 23:09:40 +02:00
Patrick Lühne
0e5ee59ea7
Simplified handling of unsupported clingo statements.
2017-03-29 21:32:11 +02:00
Patrick Lühne
09c2674148
Fixed incorrectly translated choice rules with multiple elements in the aggregate.
2017-03-23 02:06:19 +01:00
Patrick Lühne
283cdd2abf
Preparations for returning multiple formulas per input rule (as necessary with head aggregates).
2017-03-23 01:23:17 +01:00
Patrick Lühne
825cd4de39
Refactored formula simplification with Clingo’s variants.
2017-03-23 00:44:10 +01:00
Patrick Lühne
9e6d135781
Implemented explicit syntax tree representation for first-order formulas.
2017-03-15 16:00:43 +01:00
Patrick Lühne
71e6e4107a
Minor restructuring.
2017-03-06 15:42:38 +01:00
Patrick Lühne
70cb79b233
Implemented choice rules.
2017-03-06 15:40:23 +01:00
Patrick Lühne
6167a83a99
Fixed issue with empty integrity constraints and extended unit test.
2016-11-24 17:38:44 +01:00
Patrick Lühne
442fa8791a
Fixed continuous numbering of auxiliary variables.
2016-11-24 16:50:35 +01:00
Patrick Lühne
cdfdd8f4ca
Added unit test to check whether escaped user variable names are correctly escaped.
2016-11-24 15:38:55 +01:00
Patrick Lühne
223d380a03
Indexing variables from 1 on and not 0.
2016-11-24 15:25:34 +01:00
Patrick Lühne
c92de5e461
Removed unwanted newline.
2016-11-24 14:47:02 +01:00
Patrick Lühne
c760edb141
Fixed missing usages of new output format.
2016-11-24 03:36:14 +01:00
Patrick Lühne
47d7058f5a
Consistently printing operators and Booleans.
2016-11-24 03:20:22 +01:00
Patrick Lühne
e65ec9b6c1
Fixed incorrect auxiliary variable naming.
2016-11-24 03:11:36 +01:00
Patrick Lühne
3fbe8ac407
Fixed missing reset on collected head term vector.
2016-11-24 03:08:36 +01:00
Patrick Lühne
018559b8cf
Started implementing color output (currently for head only).
2016-11-24 02:42:32 +01:00
Patrick Lühne
6af3b7b875
Made all visitors consistent in taking an Context object as an argument.
2016-11-24 00:52:28 +01:00
Patrick Lühne
225816538b
Implemented translation of negated body literals.
2016-11-23 05:00:34 +01:00
Patrick Lühne
29d1c15137
Implemented translation of positive body literals.
2016-11-23 05:00:33 +01:00
Patrick Lühne
9ccbda49b7
Implemented head translation.
2016-11-23 05:00:33 +01:00
Patrick Lühne
870be1680e
Made output of Boolean variables consistent with clingo’s input language.
2016-11-23 05:00:29 +01:00
Patrick Lühne
920f3ab210
Started implementing translation of head literals.
2016-11-22 17:58:18 +01:00
Patrick Lühne
7e7baa1aab
Wrote simple dummy parser.
2016-11-22 03:15:52 +01:00