|
From: <fra...@us...> - 2009-08-11 00:24:54
|
Revision: 1818
http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=1818&view=rev
Author: frankrimlinger
Date: 2009-08-11 00:24:46 +0000 (Tue, 11 Aug 2009)
Log Message:
-----------
Reworked the requirements "types" to support expression argument matching. It is not enough to separate mutually exclusive requirements by arbitrary distinct types. Realized that the "type" of a requirement must in fact be a minimal formal type, and such types must belong to distinct minimal equivalence classes. The minimal type of the argument is then used for the match. Expressions with no minimal type are assumed to NOT match on any typed requirement, which seems to be reasonable. Fleshed out the set of minimal types to support this concept.
Tying the typing system in tightly with the filter tree is conceptually very nice. All this code is in place, but need to debug before any putative performance improvement can be measured.
It turns out there are some EZ ways to use the typing system to automate stabilization, composition, and commutator template-binding for most expressions.
Introduce types <stabilizer> , <composer> , and for given rulekey, add the implications rulekey-> < stabilizer > and rulekey-> < composer > as desired. Then composition collapses to the single rule (o x state), where x satisfies < stabilizer >. This works because a kons inherits the type of is rulekey, except in special cases that are handled separately anyway. All you need is an action to distribute composition across arguments. Since the new rule indexing system no longer requires a pattern to be a kons, introduce the pattern x, where x satisfies < stabilizer >, and use an agent to stabilize each argument of x. Finally, to automate commutator template-binding, proceed as follows: for each discovered rule pattern, if the lead rulekey satisfies <commutator>, if the pair (rulekey,numArgs) adds to the HashSet commutatorPairs, then generate the template binding rule (rulekey, commutator_numArgs), and instantiate the corresponding template rules.
This is definitely bfc, as it eliminates a lot of very tedious rule making and even more tedious debugging of subtle problems introduced by botched rules. Debugging now consists of a simple examination of the types of a rulekey, from which all the logic now flows.
Modified Paths:
--------------
branches/mango/Mango/Mango/src/mango/module/definition/sym/ParamSym.java
branches/mango/Mango/Mango/src/mango/module/instance/method/sym/MethodInstanceSym.java
branches/mango/Mango/Mango/src/mango/module/instance/sym/InstanceManagerProxySym.java
branches/mango/Mango/Mango/src/mango/module/sym/ModuleReadOnlySym.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/BaseStack.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/BinderFrame.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/BinderHeap.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/BinderStack.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/BinderStat.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/ConjunctionSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/EquationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/HeapItemSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/HeapObjectSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/InequationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/LocalVar.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/OpStack.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/OpVar.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/binder/StatItemSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/BaseInvariantAgentProxySym.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/InstanceManagerProxySymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/LoopInvocationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/MethodInvocationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/ModuleHypothesisSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/ModuleInvocationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/ParamSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/function/UserInvocationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/AlphaSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/CodeSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/FoundationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/GateSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/GenericMethodNameSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/InstructionNameReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/InstructionSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/InvocationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/LoopSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/MethodEntrySymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/MethodInstanceSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/MethodSymType.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/ModuleReadOnlySymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/PathSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/ResolvedInvocationNameSym.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/StringReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/TranslationSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/symbols/UconSymReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/ClassNameSymbolReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/FrameReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/FunctionReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/HeapReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/InvocationNameSymbolReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/LocalVarReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/OpVarReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/PredTransformerReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/PredicateReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/StackReq.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/StringValue.java
branches/mango/Mango/Mango/src/mango/ruleRequirement/typing/UconReq.java
branches/mango/Mango/Mango/src/mango/worker/engine/hash/symbolHash/SymbolHashTyping.java
branches/mango/Mango/Mango/src/mango/worker/engine/rule/Req.java
branches/mango/Mango/Mango/src/mango/worker/engine/rule/RuleFilterManager.java
branches/mango/Mango/Mango/src/mango/worker/engine/rule/RuleGenerator.java
branches/mango/Mango/Mango/src/mango/worker/engine/sym/GenericMethodNameSym.java
branches/mango/Mango/Mango/src/mango/worker/engine/sym/InstructionNameSym.java
branches/mango/Mango/Mango/src/mango/worker/mangoModel/sym/GateSym.java
branches/mango/Mango/Mango/src/mango/worker/mangoModel/sym/graphic/CodeSym.java
branches/mango/Mango/Mango/src/mango/worker/mangoModel/sym/graphic/LoopSym.java
branches/mango/Mango/Mango/src/mango/worker/mangoModel/sym/graphic/MethodSym.java
branches/mango/Mango/Mango/src/mango/worker/mangoModel/sym/graphic/PathSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/coreTechniques/sym/FoundationSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/form/sym/binder/executable/HeapSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/form/sym/binder/revealed/HeapItemSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/form/sym/binder/revealed/HeapObjectSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/form/sym/binder/revealed/OpSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/form/sym/binder/revealed/StatItemSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/functionSpace/sym/ModuleHypothesisSym.java
branches/mango/Mango/Mango/src/mango/worker/workFlow/translate/sym/TranslationSym.java
branches/mango/Mango/javapathfinder-mango-bridge/mango/FormalTypes.java
branches/mango/Mango/javapathfinder-mango-bridge/mango/scanner/sym/InstructionSym.java
branches/mango/Mango/javapathfinder-mango-bridge/mango/scanner/sym/InvocationSym.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|