Commit Graph

26 Commits

Author SHA1 Message Date
Fedor Isakov 60c39f2811 Add a test for a peculiar use case. Only triggered in production. 2019-09-30 16:31:59 +02:00
Fedor Isakov 487df639e5 Drop unused methods from EvaluationSession.
Having unused methods is confusing.
2019-09-10 13:17:34 +02:00
Fedor Isakov af212ca92e Refactoring EvaluationSession(Ex): drop controller accessor.
The inverse reference to controller from Evaluation session considered harmful.
Drop controller from EvaluationSession, drop ask/tell from EvaluationSession, extend InvocationContext with controller and supervisor accessors.
2019-09-10 13:08:53 +02:00
Grigorii Kirgizov 8ed7eb3c02 Change signature of Supervisor to handle RuleMatch instead of Rule 2019-07-26 17:00:31 +02:00
Fedor Isakov 0e02bab768 Replace tag() method in rule with uniqueTag() returning Object. This
allows for further memory optimization.
2019-05-17 17:10:52 +02:00
Fedor Isakov 658963903d Refactor controller: extract component for managing dispatching front,
drop Store, introduce ProcessingState and StateFrame.

ProcessingState class to represent current state, including the
dispatching front and all the logical observers.
StateFrame is a persistent class that reacts to activated constraint
and launches processing via Controller.
Breaking change: the frames correspond to an activated constraint occurrence,
and not to a triggered rule match as it has been the case before.
2019-05-16 12:35:52 +02:00
Fedor Isakov bfc4b641bb Refactor constraint occurrence to depend on controller directly.
Drop creating of a frame stack from a store view.
2019-05-13 10:48:10 +02:00
Fedor Isakov eb5b38384f Rename Handler class in reactor API to RulesList. 2019-05-09 17:30:14 +02:00
Fedor Isakov cc2774d66d Refactorings in conreactor: better separation of concerns, cleaner interfaces.
Introduce Supervisor, extract evaluation-related stuff from Program, merge with EvaluationFeedbackHandler.
Move implementation of EvaluationFeedback to internal API, reduce number of public interfaces.
Cleaner interface for reporting feedback.
2019-05-05 13:52:26 +02:00
Fedor Isakov 7dcd683ba5 Enable EvaluationSession to have arbitrary parameters available at exec time.
Drop two obsolete interfaces.
2019-04-26 00:22:02 +02:00
Fedor Isakov a9a7f66a3a Refactorings and code cleanup in reactor lib. Documenting the code.
Breaking change: ReactorLifecycle to be used to initialize session
backend.

Remove deprecated stuff, deprecate some more.
Consolidate useless interfaces into bigger ones.
Extract interfaces for core classes, move implementation into "internal"
subpackage.
2019-04-24 21:21:03 +02:00
Fedor Isakov 3f930ba530 Introduce solver() method to PredicateSymbol.
Drop requirement to provide evaluation session with list of solvers; remove unnecessary configuration step.
Minor refactorings in tests.
2019-02-17 11:39:56 +01:00
Fedor Isakov c8d7e52b6f Introduce feedback handling API to facilitate processing of messages during program evaluation.
Minor refactorings in conreactor. Drop deprecated stuff. Default implementations for deprecated methods.
2019-02-15 17:15:09 +01:00
Fedor Isakov b523467c5f Test a weird case of rule not triggered for a particular combination of constraints. 2019-01-24 16:01:55 +01:00
Fedor Isakov 181ccedd95 Establish the contract of OccurrenceMatcher to fail appropriately on unassigned logicals.
Fix processing of reactivated constraints in RuleMatcher, fix propagation history.
Minor code refactorings. Tests.
2019-01-24 12:03:04 +01:00
Fedor Isakov 1b584d2825 Reactor API changes: EvaluationResult and FailureHandler.
Failures are no longer propagated as exceptions, instead evaluation
returns optional failure.
2018-11-04 12:54:32 +01:00
Fedor Isakov 74402a8a1c New rule matching algorithm 2018-08-03 11:48:23 +02:00
Fedor Isakov bfd6010b7d Fix a bug in rule matching preventing good matches to be reported. Tests. 2017-10-06 12:09:57 +02:00
Fedor Isakov c5c198cf8b Refactoring in the reactor API: move invocation/occurrence factory methods to evaluation session, enable access to logical context from an invocation. 2017-03-27 19:01:07 +02:00
Fedor Isakov cae150819f Introduce StoreView as a parameter to launching evaluation session. Minor code refactoring/extracting. 2017-01-10 20:19:59 +01:00
Fedor Isakov c68d9a0bd7 Refactoring the reactor API. Extract StoreView. Get rid of obsolete calls to SessionSolver, cleanup the interface. Introduce AbstractSolver. Move instantiation arguments to solver/program. Cleaning up the code. 2017-01-05 17:34:53 +01:00
Fedor Isakov ebfe680aae Refactoring the reactor API. Extract StoreView, get rid of obsolete calls to SessionSolver. Cleaning up the code. 2017-01-04 10:47:23 +01:00
Fedor Isakov 0771504044 Refactoring the reactor API, cleaning up the code. 2017-01-03 12:11:31 +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 e6c7ee74f5 Renaming implementation classes to clean up the namespace. 2016-12-22 12:27:34 +01:00