Commit Graph

22 Commits

Author SHA1 Message Date
Patrick Lühne 541cb3fb47
Add domain specifier to variable declarations
With this change, the domain of variable declarations can be specified.
Variables can have the integer domain, in which case additional integer-
specific simplification rules apply. Aside from that, the noninteger
domain represents precomputed values. An additional “unknown” domain is
introduced to flag variable domains prior to determining whether they
are integer or not.
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 e15a6b2e88
Remove Constant class
Constants are not a construct present in Clingo’s AST and were
unintentionally made part of anthem’s AST. This removes the unused
classes for clarity.
2018-04-27 17:08:41 +02:00
Patrick Lühne 8c250f5c59
Support modulus operation (absolute value)
This adds support for computing the absolute value of a term along with
an according unit test.
2018-04-12 00:38:48 +02:00
Patrick Lühne eaabeb0c55
Support exponentiation operator
Because of a bug in the Clingo API, the exponentation operator was not
properly exposed to anthem. This updates Clingo to a version with a
fixed API and adds proper support for exponentation within anthem along
with a matching unit test.
2018-04-10 22:29:55 +02:00
Patrick Lühne 14abc37116
Implemented #show statements for completed output. 2017-06-05 03:02:22 +02:00
Patrick Lühne 2bc60d3eea
Started implementing support for #show statements. 2017-06-01 04:05:11 +02:00
Patrick Lühne 957457939c
Minor formatting. 2017-06-01 00:15:48 +02:00
Patrick Lühne f78c0e4da5
Reordered constructor parameters of VariableDeclaration. 2017-05-30 16:27:45 +02:00
Patrick Lühne 9a3c85dc83
Dropping now unused body variable names. 2017-05-30 16:20:57 +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 108c51cf28
Fixed Variant move semantic issue with older compilers. 2017-04-11 16:59:58 +02:00
Patrick Lühne d999415c3d
Enforcing move semantics on all AST elements explicitly. 2017-04-11 15:55:31 +02:00
Patrick Lühne 811eb3054c
Partly implemented completion. 2017-04-06 17:46:16 +02:00
Patrick Lühne c3351206b9
Removed unused code. 2017-04-06 17:19:32 +02:00
Patrick Lühne 3c79625685
Constrained the element’s type in set element expressions to primitive terms. 2017-03-29 23:56:58 +02:00
Patrick Lühne 825cd4de39
Refactored formula simplification with Clingo’s variants. 2017-03-23 00:44:10 +01:00
Patrick Lühne fc538eb7fc
Started implementing output simplifications. 2017-03-16 15:45:55 +01:00
Patrick Lühne 73f67f5c17
Added back support for function symbols. 2017-03-15 17:01:09 +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 f139e375f1
Added initial abstract syntax tree for first-order logic formulas. 2017-03-08 01:21:03 +01:00