Commit Graph

151 Commits

Author SHA1 Message Date
Fedor Isakov 466c015263 Handlers to have multiple primary constraints. RuleIndex to select handlers with matching primary symbol, if a handler has one. Only "accept-all" handlers process non-primary constraints. 2016-12-28 12:54:19 +01:00
Fedor Isakov 26f12f187d Refactor the evaluation controller to have handlers. RuleIndex to select handlers with matching primary symbol first, then the "accept-all" handlers. Tests. 2016-12-23 16:50:31 +01:00
Fedor Isakov 49a6ee0bd0 New naming convention for test helper classes (prefix Mock-). 2016-12-22 15:56:23 +01:00
Fedor Isakov e80818607c Introduce the Handler API. 2016-12-22 12:39:28 +01:00
Fedor Isakov e6c7ee74f5 Renaming implementation classes to clean up the namespace. 2016-12-22 12:27:34 +01:00
Fedor Isakov b891f0fa47 Optimizing the aux lookup of constraints by moving the constraint symbol to the top of the search term. 2016-12-14 17:07:58 +01:00
Fedor Isakov 3dd42efe32 Include information of the parent activations in the profiling data. 2016-12-14 12:34:18 +01:00
Fedor Isakov 90640f1d3d Bumped up the kotlin version in maven project file. Switch to the latest dexx collections. Drop google collections (unused). Re-imported all maven projects. 2016-12-13 10:31:16 +01:00
Fedor Isakov bdc4701b23 Uptimizing the profiler. Ensure only the top 98% of the durations get reported. 2016-12-12 15:42:06 +01:00
Fedor Isakov cb7dc76aa5 Simplify MatchTrie: no more additional nextSibling calculation, which had caused exponential search (yikes!); code cleanup. 2016-12-06 16:58:21 +01:00
Fedor Isakov 76fa878518 Report profiling results even on evaluation failure. 2016-12-06 16:58:21 +01:00
Fedor Isakov b02f3d727b Fix infinite loop on cyclic terms. Detect term cycles while walking on put/remove/retrieve. 2016-12-06 16:58:15 +01:00
Fedor Isakov 7fe7662873 Fix the failing match if case of the wrong constraints order. Test. 2016-11-23 15:55:45 +01:00
Fedor Isakov b4e9d45f7e Enforce the constraint transparency contract on bound logicals: treat the value as the constraint argument. Remove misbehaving test. 2016-10-13 11:07:27 +02:00
Fedor Isakov 030d474727 Itegrating the reactor API changes from the typechecker project. 2016-08-29 11:21:23 +02:00
Fedor Isakov f1238b4e30 Implement missing methods. 2016-08-29 10:53:44 +02:00
Fedor Isakov 5ed7b207ca Minor optimizations. Avoid calling toString() on symbols.
Avoid notifying on logical's value updated if the value is same.
Avoid calling unification on constraint/occurrence terms.
Some code cleanup.
2016-06-30 09:45:45 +02:00
Fedor Isakov 60cd075bf3 Specifying occurrence arguments to patternPredicates.
Correctly wrapping/unwrapping of arguments when matching rules.
Optimizing MatchTrie: process related occurrences first to avoid quadratic complexity.
2016-06-26 18:19:30 +02:00
Fedor Isakov 71810025e1 Itegrating the reactor API changes from the typechecker project. 2016-06-26 12:52:54 +02:00
Fedor Isakov 735c6b20e8 Switch to using JDK 1.8 for the project. 2016-06-24 14:22:22 +02:00
Fedor Isakov 34dc1208f3 Avoid runnig potentially unsafe code in finally{}, which can mask the original exception. 2016-06-24 14:21:36 +02:00
Fedor Isakov 2ae25c6756 Make use of LogicalOwner interface to avoid creating logicals that have other logical as value. 2016-06-24 14:20:42 +02:00
Fedor Isakov 64f332f5b0 Integrate the reactor API (imported from the typechecker project). 2016-06-24 14:17:54 +02:00
Fedor Isakov 61ef4ff4af Refactor the way logical's parent update are handled in the occurrence store, fix the broken update leading to corrupted store.
Ensure constraint occurrences are alive before reactivating.
2016-06-16 11:48:06 +02:00
Fedor Isakov 0699c7f6ad Move IdHashSet to util. 2016-06-16 11:46:39 +02:00
Fedor Isakov 8300fbb817 Optimization in occurrence store: avoid calling remove on TermTrie: very expensive. Some code cleanup and refactoring. 2016-06-08 11:17:38 +02:00
Fedor Isakov ed2ff61ec4 Reimplemented TermTrie using discrimination trees. 2016-06-06 16:18:49 +02:00
Fedor Isakov 57a76ad43c Fix memory leak 2016-06-02 12:20:00 +02:00
Fedor Isakov ab23988887 Profiling processing of occurrences. 2016-06-02 11:57:12 +02:00
Fedor Isakov 61b488aebd Cleaning up TermTrie code. 2016-06-02 11:56:14 +02:00
Fedor Isakov 8185605e99 Optimizing term trie and rules index. Using bitset to mark value tokens incidental with nodes in the "term superposition" of term trie. 2016-06-02 11:03:19 +02:00
Fedor Isakov 0f7ffd9141 Support for triggering arbitrary predicates on an occurrence match with a head's rule.
Properly handling constraint pattern/occurrence match with values/variables on either side using modal unificaiton.
2016-05-27 20:55:31 +02:00
Fedor Isakov d90c06f600 Unification feature: term wrapper to facilitate modal unification (such as b/w different meta levels). 2016-05-27 20:55:31 +02:00
Fedor Isakov 5c2b1539c9 TermTrie: introduce value tokens; ensure the value can be retrieved iff all the term's leaves match. 2016-05-27 20:55:31 +02:00
Fedor Isakov 1652eacfe3 Integrating TermTrie in the occurrence store. 2016-05-22 17:09:02 +02:00
Fedor Isakov e9969b08b7 Integrating TermTrie in the rules index, tests. 2016-05-22 15:44:35 +02:00
Fedor Isakov 82d5763039 TermTrie: maintaining the order of the values. 2016-05-19 20:31:05 +02:00
Fedor Isakov b42f005c7e TermTrie: supporting term variables. 2016-05-19 16:39:52 +02:00
Fedor Isakov a44366921b TermTrie: building an index of rules/occurrences from term values. Term variables not yet supported. 2016-05-18 15:44:56 +02:00
Fedor Isakov 0b689858b8 Restructure sources for reuse. 2016-05-17 11:51:40 +02:00
Fedor Isakov e1e642deca Optimizing logical observers manipulation: get rid of linear search. 2016-05-10 11:24:06 +02:00
Fedor Isakov 79e920c546 Refactoring utility classes to a separate package 2016-05-10 10:09:18 +02:00
Fedor Isakov b54673b5a8 Matcher optimizations: get rid of sequence and flatMap, re-implement iterating over MatchTrie using primitives, ensure no exponential search is necessary. 2016-05-10 10:04:32 +02:00
Fedor Isakov 261d414039 Fix unification for terms with references to external terms or vars, tests. 2016-04-28 12:13:01 +02:00
Fedor Isakov 22d208ee74 Two more optimizations in MatchTrie: early cutoff of deadend branches; ensure candidate occurrences match constraints. 2016-04-26 17:39:28 +02:00
Fedor Isakov b5f495d6f7 Another major optimization in the matcher: lazily initialize MatchTrie. Update OccurrenceStore on logical value updated. 2016-04-26 13:22:19 +02:00
Fedor Isakov 43e9b35e1e Some more minor optimizations in the match processing. Minor code refactorings. 2016-04-24 17:53:49 +02:00
Fedor Isakov 7095551b7f Minor optimization in the match processing. 2016-04-22 13:25:41 +02:00
Fedor Isakov 2d46cd9542 Rewritten Matcher to not rely on Sequence and flatMap, instead using MatchTrie. OccurrenceIndex interface made clear. Some minor code optimizations. 2016-04-21 20:49:06 +02:00
Fedor Isakov efc293b495 Switch to the latest version of Kotlin. 2016-04-17 15:47:41 +02:00