-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ATL transformation optimization #1
Open
saahilh
wants to merge
426
commits into
master
Choose a base branch
from
atlTransformationOptimization
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Removed it as I feel readability is better without it.
This update adds in some code from a more recent version of Turn2Urn. There are a few changes in how beliefs are handled here.
Reworked tUCMmap logic to use a global variable rather than passing in tUCMmap as an argument to almost every rule. Fixed a typo where tUCMmap was passed as an argument to createTimer twice.
Removed processNode as it was only being called in one location and no longer encapsulated very much logic.
handleNode: removed some variables to increase readability. handleConnectNode - replaced some tUCMmap.get calls with retrieveNode calls
Removed the processNode rule as it had little logic and was only being used once after the most recent reduction so I moved that logic directly into place. Removed some conditions after testing to see if the branches impacted the code in any manner as I suspected that there may have been equivalencies in calls to -> select vs. calls to -> any. Modified a conditional in UCMmap2UCMmap to make a pathnodes existence check explicit
Removed a lot of logic that seemed to be doing nothing (unnecessary arguments, unneeded conditionals). Cleaned up processFirstNode so that the argument "path" only contains Turn!PathBodyNodes as arguments rather than at times containing a Turn!Path as in the previous implementation.
Removed processTimer logic from retrieveNode as a getter method should not be modifying the state of the system. Made more calls to retrieveNode and discovered a bug caused by attempting to get items with null names from the tUCMmap by name. This is now resolved in some cases by adding those calls to retrieveNode. Added comment explaining the else case of retrieveNode,
Made calls to retrieveNode wherever it did not change the output of the system to streamline getting nodes. Calls are now made in place of tUCMmap.getNode in all places where it does not imapct the output. Some resolveTemps have also been replaced with such calls. Commeneted out some code that didn't seem to be changing the output of the system in any tests.
Cleaned up some formatting in Turn2Urn, made a few more calls to retrieveNode, wrote the processBinding method to modularize some code in InBinding2InBinding and OutBinding2OutBinding, though at present I'm not sure this section of code actually impacts the system.
Cleaned up some formatting. Remove createOrForkNodeConnection rule as it is clearer to just use createNodeConnection and assign the condition afterwards - the rule was a special case with an argument, but this argument was only being used in two of four cases anyhow. Updated processOrFork accordingly.
Attempting to find repeated sections of code to remove conditionals where not required. Some of these have appeared after my adding retrieveNode calls. Also commeneted out some code that didn't seem to be doing anything.
Moved around a rule, commented out more lines that didn't seem to affect the final output produced. Removed some lines. Refactored two more cases to use retrieveNode. Changed an ORFORK/TIMER conditional to remove the AndFork case as this casued incorrect handling of some adding of predecessors.
Rework so that predecessors are no longer passed in as an argument. Having to declare them explicitly elsewhere will make reading the code more easy. Also replaced another resolveTemp for a retrieveNode and commented out more code that didn't seem to modify the state of the system in any test.
Fixes to logic in processAndFork, processOrFork, and processStub by rearranging some statements. Reworked a little logic in processStub for readability.
Moved some logic in handleFirstNode to centralize a case in one conditional. Commented out some logic in both handleNode and handleRegularEnds as it wasn't changing the outputs produced.
Reworked by creating getNodeTarget rule. This was necessary because retrieveNode was slowing build times due to the large number of conditions it had. Spreading this logic out was necessary.
OrForks and Stubs are now added to their UCMmap at the start of their process methods rather than at the end. This corrects some logical errors that were occurring when producing their outputs. Wrote connectNodesAfterFork to encapsulate some functionality in processAndFork and processOrFork.
Uncommented an addPred line to fix some logic. Modularized retrieval of elements used for conditions to increase readability.
…hese lines weren't doing anything
…Points to reduce ambiguity
…me items, removed others
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworked version of the code where all test cases except RemainingTestCases should produce the correct outputs.