Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Lühne 8110195d62
Prefix integer variables with “N”
Instead of suffixing integer variables with “i”, this prefixes them with
“N” instead to make it consistent with common mathematical notations.
2018-04-22 21:23:26 +02:00
Patrick Lühne ea885f5fdb
Fix integer detection
Clingo treats operations that were assumed to be “invalid” not as
processing errors but as operations returning an empty set.

This changes how formulas have to be evaluated. This commit implements
an explicit function for retrieving the return type of an expression,
that is, both the domain of the result as well as whether it’s an empty,
unit, or general set with multiple values.
2018-04-22 17:04:15 +02:00
Patrick Lühne 92cd114cf8
Rename “general” domain to “noninteger”
The “general” domain wasn’t really about general variables, but meant as
a distinction from integer variables. For this reason, this commit
renames the “general” domain to “noninteger.”
2018-04-22 14:57:16 +02:00
Patrick Lühne 2b62c6227d
Move Domain class to Utils header 2018-04-22 14:56:58 +02:00
Patrick Lühne b1ca027de5
Consolidate commonly used enum classes
This moves the commonly enum classes EvaluationResult, OperationResult,
and Tristate to the Utils header file to avoid code duplication.

Additionally, the SimplificationResult class is replaced by the
semantically similar OperationResult.
2018-04-21 17:34:52 +02:00
Patrick Lühne 663c59c470
Removed unused function. 2017-06-01 03:43:18 +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 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 ce159c7bf0
Added missing assertion. 2017-05-23 15:25:55 +02:00
Patrick Lühne 838a68e230
Refactoring to prepare for implementing completion. 2017-04-05 18:15:42 +02:00
Patrick Lühne f28873617d
Implemented translation of anonymous variables. 2017-03-29 21:28:46 +02:00
Patrick Lühne c24147cb2c
Renamed auxiliary variables according to paper draft. 2016-11-24 15:25:34 +01:00
Patrick Lühne 66acbb8965
Changed output format of auxiliary variables and treated potential name collisions. 2016-11-24 13:42:36 +01:00
Patrick Lühne cf786e05b2
Added missing inline directive in header-only function. 2016-11-24 13:27:22 +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 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 7e7baa1aab
Wrote simple dummy parser. 2016-11-22 03:15:52 +01:00