From 1fdc002ed5a5ed1f31fd1fd9133c3271e9281d70 Mon Sep 17 00:00:00 2001 From: grammarware Date: Fri, 31 Oct 2008 01:09:39 +0000 Subject: [PATCH] convergence progress; bug fixed in the xbgf overview git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@399 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- topics/java/lci/Makefile | 2 +- topics/java/lci/java.lcf | 4 +- topics/java/lci/xbgf/correct-app3.xbgf | 106 +++++ topics/java/lci/xbgf/edit-doc3.xbgf | 20 - topics/java/lci/xbgf/inlineStatements.xbgf | 4 +- .../lci/xbgf/refactorExpressions-doc3.xbgf | 211 ++++++++- .../lci/xbgf/refactorInterfaces-doc3.xbgf | 119 ++++- .../lci/xbgf/refactorStatements-doc3.xbgf | 436 ++++++++++++++++++ ...ents.xbgf => refactorStatements-jls1.xbgf} | 0 topics/presentation/metrics/xbgf_overview.py | 4 +- 10 files changed, 876 insertions(+), 30 deletions(-) create mode 100644 topics/java/lci/xbgf/refactorStatements-doc3.xbgf rename topics/java/lci/xbgf/{refactorStatements.xbgf => refactorStatements-jls1.xbgf} (100%) diff --git a/topics/java/lci/Makefile b/topics/java/lci/Makefile index b131c7b1..3bf9c97c 100644 --- a/topics/java/lci/Makefile +++ b/topics/java/lci/Makefile @@ -4,7 +4,7 @@ build: diff: python ../../convergence/lci/lci.py java3.lcf architecture - gdts bgf/app3.fixErrors3.prepare3.allowMultipleLabels.bgf bgf/doc3.fixErrors3doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes3.unlayerExpressions3.inlineStatements2doc.inlineExpressions3doc.refactorClassDeclarations3.refactorInterfaceDeclarations3.refactorMiscDeclarations3.breakSemantics3doc.bgf + gdts bgf/app3.correct.refactor.generalizeLabels.generalizeBlock.generalize.bgf bgf/doc3.correct.generalizeModifiers.generalizeNames.deyaccify.refactorTypes.refactorExpressions.inlineStatements.generalizeStatements.refactorStatements.editExpressions.refactorClasses.refactorInterfaces.refactorEnums.refactorDeclarations.edit.bgf test: python ../../convergence/lci/lci.py java.lcf architecture diff --git a/topics/java/lci/java.lcf b/topics/java/lci/java.lcf index 69ae49c2..204f3a7a 100644 --- a/topics/java/lci/java.lcf +++ b/topics/java/lci/java.lcf @@ -150,6 +150,8 @@ refactorTypes-doc3 refactorExpressions-doc3 inlineStatements + generalizeStatements + refactorStatements-doc3 editExpressions refactorClasses-doc3 refactorInterfaces-doc3 @@ -163,7 +165,7 @@ jls12 jls1 - refactorStatements + refactorStatements-jls1 generalizeStatements refactorTypes-jls1 editDeclarations diff --git a/topics/java/lci/xbgf/correct-app3.xbgf b/topics/java/lci/xbgf/correct-app3.xbgf index de1ab590..d400b19b 100644 --- a/topics/java/lci/xbgf/correct-app3.xbgf +++ b/topics/java/lci/xbgf/correct-app3.xbgf @@ -133,4 +133,110 @@ Annotation: + + + + + + + break + + + + + Identifier + + + + + + + + + break + + + + + Identifier + + + + + ; + + + + + + + + + + + continue + + + + + Identifier + + + + + + + + + continue + + + + + Identifier + + + + + ; + + + + + + + + + + ElementValues + + + + + , + + + ElementValues + + + + + ElementValues + + \ No newline at end of file diff --git a/topics/java/lci/xbgf/edit-doc3.xbgf b/topics/java/lci/xbgf/edit-doc3.xbgf index be2354dd..b1a7f4c2 100644 --- a/topics/java/lci/xbgf/edit-doc3.xbgf +++ b/topics/java/lci/xbgf/edit-doc3.xbgf @@ -2,26 +2,6 @@ xmlns:bgf="http://planet-sl.org/bgf" xmlns:xbgf="http://planet-sl.org/xbgf"> - - - MethodBody - - - - MethodBody - - ; - - - - + --> @@ -295,5 +295,5 @@ LocalVariableDeclaration Statement - + \ No newline at end of file diff --git a/topics/java/lci/xbgf/refactorExpressions-doc3.xbgf b/topics/java/lci/xbgf/refactorExpressions-doc3.xbgf index 18b60f09..939d4506 100644 --- a/topics/java/lci/xbgf/refactorExpressions-doc3.xbgf +++ b/topics/java/lci/xbgf/refactorExpressions-doc3.xbgf @@ -249,7 +249,7 @@ Expression3 - + Expression2 @@ -1156,9 +1156,9 @@ Expression3 - + CastExpression - + CastExpression @@ -1300,4 +1300,209 @@ + + AssignmentExpression + + Assignment + + + + Assignment + + + + Assignment + + + + + + + + LeftHandSide + + + AssignmentOperator + + + + + + + Expression1 + + + + + + Assignment + + + + LeftHandSide + + + Expression1 + + + LeftHandSide + + + + + Expression1 + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + Expression1 + + + + + + + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + + + + + + Expression1 + + + + + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + + + Expression1 + + + AssignmentOperator + + + + + + + + + AssignmentOperator + + + Expression1 + + + + + + + + + AssignmentOperator + + + Expression1 + + + + + + + Expression + + \ No newline at end of file diff --git a/topics/java/lci/xbgf/refactorInterfaces-doc3.xbgf b/topics/java/lci/xbgf/refactorInterfaces-doc3.xbgf index 254365fe..ae6a45de 100644 --- a/topics/java/lci/xbgf/refactorInterfaces-doc3.xbgf +++ b/topics/java/lci/xbgf/refactorInterfaces-doc3.xbgf @@ -226,7 +226,7 @@ InterfaceDeclaration - + @@ -624,7 +624,124 @@ Throws + ElementValues + + + ElementValues + + + + ElementValues + + + + ElementValue + + + + + ElementValue + + + , + + + ElementValues + + + + + + + + + + + + + ElementValue + + + + + ElementValue + + + , + + + ElementValues + + + + + + + + + ElementValue + + + + + + + , + + + ElementValues + + + + + + + + + + + + + + + + + + , + + + ElementValues + + + + + + + + + + + + + + , + + + ElementValues + + + + + + BracketsOpt diff --git a/topics/java/lci/xbgf/refactorStatements-doc3.xbgf b/topics/java/lci/xbgf/refactorStatements-doc3.xbgf new file mode 100644 index 00000000..d2e2fb3f --- /dev/null +++ b/topics/java/lci/xbgf/refactorStatements-doc3.xbgf @@ -0,0 +1,436 @@ + + + AssertStatement + BasicForStatement + EnhancedForStatement + ExpressionStatement + + + + + + + + + assert + + + Expression + + + ; + + + + + + + assert + + + Expression + + + : + + + Expression + + + ; + + + + + + + + + assert + + + Expression + + + + + + + : + + + Expression + + + + + + + + + + ; + + + + + + + + + + + : + + + Expression + + + + + + + + + + + + + + : + + + Expression + + + + + + + + + + + + + + + try + + + Block + + + Catches + + + + + + + try + + + Block + + + + + Catches + + + + + finally + + + Block + + + + + + + + + try + + + Block + + + + + Catches + + + + + + + Catches + + + + + finally + + + Block + + + + + + + + + + + + + + + + + for + + + ( + + + + + ForInit + + + + + ; + + + + + Expression + + + + + ; + + + + + ForUpdate + + + + + ) + + + Statement + + + + + + + for + + + ( + + + + + VariableModifiers + + + + + Type + + + Identifier + + + : + + + Expression + + + ) + + + Statement + + + + + + + + + for + + + ( + + + + + + + + + ForInit + + + + + ; + + + + + Expression + + + + + ; + + + + + ForUpdate + + + + + + + + + + + VariableModifiers + + + + + Type + + + Identifier + + + : + + + Expression + + + + + + + ) + + + Statement + + + + + + + ForControl + + + + + + + + ForInit + + + + + ; + + + + + Expression + + + + + ; + + + + + ForUpdate + + + + + + + + + + + VariableModifiers + + + + + Type + + + Identifier + + + : + + + Expression + + + + + + + + + \ No newline at end of file diff --git a/topics/java/lci/xbgf/refactorStatements.xbgf b/topics/java/lci/xbgf/refactorStatements-jls1.xbgf similarity index 100% rename from topics/java/lci/xbgf/refactorStatements.xbgf rename to topics/java/lci/xbgf/refactorStatements-jls1.xbgf diff --git a/topics/presentation/metrics/xbgf_overview.py b/topics/presentation/metrics/xbgf_overview.py index baddbc76..7460ce54 100755 --- a/topics/presentation/metrics/xbgf_overview.py +++ b/topics/presentation/metrics/xbgf_overview.py @@ -3,8 +3,8 @@ import sys import elementtree.ElementTree as ET -safexbgf = ('eliminate','introduce','chain','designate','deyaccify','distribute','extract','factor','fold','horizontal','inline','massage','rename','reroot','strip','unfold','vertical','yaccify') -incdecxbgf = ('add','narrow','remove','unite','widen') +safexbgf = ('eliminate','introduce','chain','designate','deyaccify','distribute','extract','factor','fold','horizontal','inline','massage','rename','reroot','strip','unfold','vertical','yaccify','unchain') +incdecxbgf = ('add','narrow','remove','unite','widen','rassoc','lassoc') rkeys = ('LOC','NOI','NOX','NI~','NI+','NI!','SGO','COR','NI^','SID','SRE') names = []