pibizza opened a new pull request, #6483:
URL: https://github.com/apache/incubator-kie-drools/pull/6483
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
This PR is an initial attempt to cleanup the code in the Phreak evaluation
engine.
The PR is minimalistic because the code is quite complex and there are lots
of issues, so we need to move slowly and address it one by one.
This is a prerequisite for the work for query caching, because the code that
we have to modify for query caching is too complex at the moment to be modified
with some proper criteria.
The modifications are mostly here in the RuleNetworkEvaluator class, namely:
- the cycle to evaluate the stack has been simplified and clarified
- some variable had their scope reduced, so that they are closer to where
they are used
- parameters in all the functions have been reordered, following the scheme
of [Global Objects, Path/Segment Memories, Node Memories, Node, TupleSets,
Tuples]. Possibly there are more sensible schemes, but this is what I have
found so far
- the parameters reordering has been extended to a number of methods of
other objects called from the code, to make the code more coherent. We have not
finished, but we cannot have a giant PR.
- code has been reformatted to be a bit more uniform - expecially spaces
near parentheses have been removed and parameters in method declarations have
been modified.
As said, there is a lot more to do here, but I hope this is a good step in
the right direction
-
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]