Mail Archive Home | fractal-commits List | July 2006 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Tuesday, July 18, 2006 @ 19:54:13
Author: pcdavid
Path: /cvsroot/fractal/fscript
Added: console.sh etc/execute.properties etc/julia.cfg
lib/antlr-2.7.5.jar lib/asm.jar lib/comanche.jar
lib/dtdparser.jar lib/fractal-2.0.1.jar
lib/fractal-adl-2.1.3.jar lib/helloworld.jar
lib/julia-asm-2.1.3.jar lib/julia-mixins-2.1.3.jar
lib/julia-runtime-2.1.3.jar lib/naming-2.0.1.jar
lib/ow_deployment_scheduling.jar lib/ow_monolog.jar
lib/ow_util_log_api.jar
src/org/objectweb/fractal/fscript/AbstractProcedure.java
src/org/objectweb/fractal/fscript/CodeGenerator.java
src/org/objectweb/fractal/fscript/Console.java
src/org/objectweb/fractal/fscript/DefaultModel.java
src/org/objectweb/fractal/fscript/Environment.java
src/org/objectweb/fractal/fscript/FBean.java
src/org/objectweb/fractal/fscript/FSciptClassLoader.java
src/org/objectweb/fractal/fscript/FScriptException.java
src/org/objectweb/fractal/fscript/FScriptInterpreter.java
src/org/objectweb/fractal/fscript/LoggedProcedure.java
src/org/objectweb/fractal/fscript/Model.java
src/org/objectweb/fractal/fscript/NodeFactory.java
src/org/objectweb/fractal/fscript/Procedure.java
src/org/objectweb/fractal/fscript/Signature.java
src/org/objectweb/fractal/fscript/SignatureCheckedProcedure.java
src/org/objectweb/fractal/fscript/Util.java
src/org/objectweb/fractal/fscript/Values.java
src/org/objectweb/fractal/fscript/actions/AbstractAction.java
src/org/objectweb/fractal/fscript/actions/AddAction.java
src/org/objectweb/fractal/fscript/actions/BindAction.java
src/org/objectweb/fractal/fscript/actions/EchoAction.java
src/org/objectweb/fractal/fscript/actions/InstanciateAction.java
src/org/objectweb/fractal/fscript/actions/RemoveAction.java
src/org/objectweb/fractal/fscript/actions/SetNameAction.java
src/org/objectweb/fractal/fscript/actions/SetValueAction.java
src/org/objectweb/fractal/fscript/actions/StartAction.java
src/org/objectweb/fractal/fscript/actions/StopAction.java
src/org/objectweb/fractal/fscript/actions/UnbindAction.java
src/org/objectweb/fractal/fscript/axes/AbstractAxis.java
src/org/objectweb/fractal/fscript/axes/AttributesAxis.java
src/org/objectweb/fractal/fscript/axes/Axis.java
src/org/objectweb/fractal/fscript/axes/BindingAxis.java
src/org/objectweb/fractal/fscript/axes/ChildAxis.java
src/org/objectweb/fractal/fscript/axes/ComponentAxis.java
src/org/objectweb/fractal/fscript/axes/InterfacesAxis.java
src/org/objectweb/fractal/fscript/axes/InternalInterfacesAxis.java
src/org/objectweb/fractal/fscript/axes/MethodAxis.java
src/org/objectweb/fractal/fscript/axes/ParentAxis.java
src/org/objectweb/fractal/fscript/axes/SiblingAxis.java
src/org/objectweb/fractal/fscript/expressions/AbstractExpression.java
src/org/objectweb/fractal/fscript/expressions/AndExpression.java
src/org/objectweb/fractal/fscript/expressions/CallExpression.java
src/org/objectweb/fractal/fscript/expressions/ConstantExpression.java
src/org/objectweb/fractal/fscript/expressions/Expression.java
src/org/objectweb/fractal/fscript/expressions/FPathExpression.java
src/org/objectweb/fractal/fscript/expressions/NodePredicate.java
src/org/objectweb/fractal/fscript/expressions/OrExpression.java
src/org/objectweb/fractal/fscript/expressions/Step.java
src/org/objectweb/fractal/fscript/expressions/VariableExpression.java
src/org/objectweb/fractal/fscript/functions/AbstractFunction.java
src/org/objectweb/fractal/fscript/functions/AdditionFunction.java
src/org/objectweb/fractal/fscript/functions/BoundFunction.java
src/org/objectweb/fractal/fscript/functions/ClientFunction.java
src/org/objectweb/fractal/fscript/functions/CollectionItfFunction.java
src/org/objectweb/fractal/fscript/functions/CompatibleFunction.java
src/org/objectweb/fractal/fscript/functions/ConcatFunction.java
src/org/objectweb/fractal/fscript/functions/CurrentFunction.java
src/org/objectweb/fractal/fscript/functions/DifferentFunction.java
src/org/objectweb/fractal/fscript/functions/DivisionFunction.java
src/org/objectweb/fractal/fscript/functions/EndsWithFunction.java
src/org/objectweb/fractal/fscript/functions/EqualsFunction.java
src/org/objectweb/fractal/fscript/functions/ExternalItfFunction.java
src/org/objectweb/fractal/fscript/functions/FalseFunction.java
src/org/objectweb/fractal/fscript/functions/GreaterThanFunction.java
src/org/objectweb/fractal/fscript/functions/GreaterThanOrEqualFunction.java
src/org/objectweb/fractal/fscript/functions/InternalItfFunction.java
src/org/objectweb/fractal/fscript/functions/LessThanFunction.java
src/org/objectweb/fractal/fscript/functions/LessThanOrEqualFunction.java
src/org/objectweb/fractal/fscript/functions/MandatoryFunction.java
src/org/objectweb/fractal/fscript/functions/MinusFunction.java
src/org/objectweb/fractal/fscript/functions/MultiplicationFunction.java
src/org/objectweb/fractal/fscript/functions/NameFunction.java
src/org/objectweb/fractal/fscript/functions/NotFunction.java
src/org/objectweb/fractal/fscript/functions/OptionalFunction.java
src/org/objectweb/fractal/fscript/functions/ServerFunction.java
src/org/objectweb/fractal/fscript/functions/SignatureFunction.java
src/org/objectweb/fractal/fscript/functions/SingleItfFunction.java
src/org/objectweb/fractal/fscript/functions/SizeFunction.java
src/org/objectweb/fractal/fscript/functions/StartedFunction.java
src/org/objectweb/fractal/fscript/functions/StartsWithFunction.java
src/org/objectweb/fractal/fscript/functions/StateFunction.java
src/org/objectweb/fractal/fscript/functions/StoppedFunction.java
src/org/objectweb/fractal/fscript/functions/SubstractionFunction.java
src/org/objectweb/fractal/fscript/functions/TrueFunction.java
src/org/objectweb/fractal/fscript/functions/ValueFunction.java
src/org/objectweb/fractal/fscript/nodes/AttributeNode.java
src/org/objectweb/fractal/fscript/nodes/ComponentNode.java
src/org/objectweb/fractal/fscript/nodes/DefaultNodeFactory.java
src/org/objectweb/fractal/fscript/nodes/FractalNode.java
src/org/objectweb/fractal/fscript/nodes/InterfaceNode.java
src/org/objectweb/fractal/fscript/nodes/MethodNode.java
src/org/objectweb/fractal/fscript/parser/FScriptLexer.java
src/org/objectweb/fractal/fscript/parser/FScriptLexer.smap
src/org/objectweb/fractal/fscript/parser/FScriptLexerTokenTypes.java
src/org/objectweb/fractal/fscript/parser/FScriptLexerTokenTypes.txt
src/org/objectweb/fractal/fscript/parser/FScriptParser.java
src/org/objectweb/fractal/fscript/parser/FScriptParser.smap
src/org/objectweb/fractal/fscript/parser/FScriptParserTokenTypes.java
src/org/objectweb/fractal/fscript/parser/FScriptParserTokenTypes.txt
src/org/objectweb/fractal/fscript/parser/fscript.g
src/org/objectweb/fractal/fscript/parser/lexer.g
src/org/objectweb/fractal/fscript/reconfiguration/AbstractReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/AddReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/BindReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/EchoReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/InstanciateReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/LifeCycleReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/Reconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationFailedException.java
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationHelper.java
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationManager.java
src/org/objectweb/fractal/fscript/reconfiguration/RemoveReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/SetNameReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/SetValueReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/StartReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/StopReconfiguration.java
src/org/objectweb/fractal/fscript/reconfiguration/Transaction.java
src/org/objectweb/fractal/fscript/reconfiguration/UnbindReconfiguration.java
src/org/objectweb/fractal/fscript/statements/AssignmentStatement.java
src/org/objectweb/fractal/fscript/statements/BlockStatement.java
src/org/objectweb/fractal/fscript/statements/ExpressionStatement.java
src/org/objectweb/fractal/fscript/statements/ForeachStatement.java
src/org/objectweb/fractal/fscript/statements/IfStatement.java
src/org/objectweb/fractal/fscript/statements/ReturnStatement.java
src/org/objectweb/fractal/fscript/statements/Statement.java
src/org/objectweb/fractal/fscript/statements/UserDefinedProcedure.java
tests/org/objectweb/fractal/fscript/AllTests.java
tests/org/objectweb/fractal/fscript/AxesTests.java
tests/org/objectweb/fractal/fscript/BasicFunctionsTests.java
tests/org/objectweb/fractal/fscript/EnvironmentTests.java
tests/org/objectweb/fractal/fscript/ExpressionsTests.java
tests/org/objectweb/fractal/fscript/FPathTests.java
tests/org/objectweb/fractal/fscript/FScriptTestCase.java
tests/org/objectweb/fractal/fscript/FractalTestCase.java
tests/org/objectweb/fractal/fscript/NodesTests.java
Modified: .antlr-eclipse .classpath .project AUTHORS LGPL-2.1 LICENSE
README build.properties build.xml lib/junit-3.8.1.jar
Added current version files.
---------------------------------------------------------------------------------------+
.antlr-eclipse
| 38
.classpath
| 23
.project
| 17
AUTHORS
| 2
LGPL-2.1
| 510 +++
LICENSE
| 17
README
| 1
build.properties
| 8
build.xml
| 65
console.sh
| 1
etc/execute.properties
| 5
etc/julia.cfg
| 613 ++++
lib/antlr-2.7.5.jar
| <<Binary file>>
lib/asm.jar
| <<Binary file>>
lib/comanche.jar
| <<Binary file>>
lib/dtdparser.jar
| <<Binary file>>
lib/fractal-2.0.1.jar
| <<Binary file>>
lib/fractal-adl-2.1.3.jar
| <<Binary file>>
lib/helloworld.jar
| <<Binary file>>
lib/julia-asm-2.1.3.jar
| <<Binary file>>
lib/julia-mixins-2.1.3.jar
| <<Binary file>>
lib/julia-runtime-2.1.3.jar
| <<Binary file>>
lib/junit-3.8.1.jar
| <<Binary file>>
lib/naming-2.0.1.jar
| <<Binary file>>
lib/ow_deployment_scheduling.jar
| <<Binary file>>
lib/ow_monolog.jar
| <<Binary file>>
lib/ow_util_log_api.jar
| <<Binary file>>
src/org/objectweb/fractal/fscript/AbstractProcedure.java
| 27
src/org/objectweb/fractal/fscript/CodeGenerator.java
| 148 +
src/org/objectweb/fractal/fscript/Console.java
| 220 +
src/org/objectweb/fractal/fscript/DefaultModel.java
| 104
src/org/objectweb/fractal/fscript/Environment.java
| 119
src/org/objectweb/fractal/fscript/FBean.java
| 280 ++
src/org/objectweb/fractal/fscript/FSciptClassLoader.java
| 64
src/org/objectweb/fractal/fscript/FScriptException.java
| 45
src/org/objectweb/fractal/fscript/FScriptInterpreter.java
| 333 ++
src/org/objectweb/fractal/fscript/LoggedProcedure.java
| 94
src/org/objectweb/fractal/fscript/Model.java
| 29
src/org/objectweb/fractal/fscript/NodeFactory.java
| 33
src/org/objectweb/fractal/fscript/Procedure.java
| 61
src/org/objectweb/fractal/fscript/Signature.java
| 51
src/org/objectweb/fractal/fscript/SignatureCheckedProcedure.java
| 95
src/org/objectweb/fractal/fscript/Util.java
| 54
src/org/objectweb/fractal/fscript/Values.java
| 122
src/org/objectweb/fractal/fscript/actions/AbstractAction.java
| 28
src/org/objectweb/fractal/fscript/actions/AddAction.java
| 69
src/org/objectweb/fractal/fscript/actions/BindAction.java
| 70
src/org/objectweb/fractal/fscript/actions/EchoAction.java
| 62
src/org/objectweb/fractal/fscript/actions/InstanciateAction.java
| 67
src/org/objectweb/fractal/fscript/actions/RemoveAction.java
| 69
src/org/objectweb/fractal/fscript/actions/SetNameAction.java
| 67
src/org/objectweb/fractal/fscript/actions/SetValueAction.java
| 73
src/org/objectweb/fractal/fscript/actions/StartAction.java
| 66
src/org/objectweb/fractal/fscript/actions/StopAction.java
| 66
src/org/objectweb/fractal/fscript/actions/UnbindAction.java
| 66
src/org/objectweb/fractal/fscript/axes/AbstractAxis.java
| 56
src/org/objectweb/fractal/fscript/axes/AttributesAxis.java
| 66
src/org/objectweb/fractal/fscript/axes/Axis.java
| 50
src/org/objectweb/fractal/fscript/axes/BindingAxis.java
| 84
src/org/objectweb/fractal/fscript/axes/ChildAxis.java
| 100
src/org/objectweb/fractal/fscript/axes/ComponentAxis.java
| 58
src/org/objectweb/fractal/fscript/axes/InterfacesAxis.java
| 58
src/org/objectweb/fractal/fscript/axes/InternalInterfacesAxis.java
| 69
src/org/objectweb/fractal/fscript/axes/MethodAxis.java
| 70
src/org/objectweb/fractal/fscript/axes/ParentAxis.java
| 98
src/org/objectweb/fractal/fscript/axes/SiblingAxis.java
| 80
src/org/objectweb/fractal/fscript/expressions/AbstractExpression.java
| 36
src/org/objectweb/fractal/fscript/expressions/AndExpression.java
| 81
src/org/objectweb/fractal/fscript/expressions/CallExpression.java
| 108
src/org/objectweb/fractal/fscript/expressions/ConstantExpression.java
| 69
src/org/objectweb/fractal/fscript/expressions/Expression.java
| 61
src/org/objectweb/fractal/fscript/expressions/FPathExpression.java
| 90
src/org/objectweb/fractal/fscript/expressions/NodePredicate.java
| 26
src/org/objectweb/fractal/fscript/expressions/OrExpression.java
| 73
src/org/objectweb/fractal/fscript/expressions/Step.java
| 121
src/org/objectweb/fractal/fscript/expressions/VariableExpression.java
| 58
src/org/objectweb/fractal/fscript/functions/AbstractFunction.java
| 34
src/org/objectweb/fractal/fscript/functions/AdditionFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/BoundFunction.java
| 70
src/org/objectweb/fractal/fscript/functions/ClientFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/CollectionItfFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/CompatibleFunction.java
| 73
src/org/objectweb/fractal/fscript/functions/ConcatFunction.java
| 65
src/org/objectweb/fractal/fscript/functions/CurrentFunction.java
| 59
src/org/objectweb/fractal/fscript/functions/DifferentFunction.java
| 59
src/org/objectweb/fractal/fscript/functions/DivisionFunction.java
| 76
src/org/objectweb/fractal/fscript/functions/EndsWithFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/EqualsFunction.java
| 59
src/org/objectweb/fractal/fscript/functions/ExternalItfFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/FalseFunction.java
| 60
src/org/objectweb/fractal/fscript/functions/GreaterThanFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/GreaterThanOrEqualFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/InternalItfFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/LessThanFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/LessThanOrEqualFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/MandatoryFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/MinusFunction.java
| 60
src/org/objectweb/fractal/fscript/functions/MultiplicationFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/NameFunction.java
| 65
src/org/objectweb/fractal/fscript/functions/NotFunction.java
| 60
src/org/objectweb/fractal/fscript/functions/OptionalFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/ServerFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/SignatureFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/SingleItfFunction.java
| 64
src/org/objectweb/fractal/fscript/functions/SizeFunction.java
| 71
src/org/objectweb/fractal/fscript/functions/StartedFunction.java
| 69
src/org/objectweb/fractal/fscript/functions/StartsWithFunction.java
| 62
src/org/objectweb/fractal/fscript/functions/StateFunction.java
| 68
src/org/objectweb/fractal/fscript/functions/StoppedFunction.java
| 69
src/org/objectweb/fractal/fscript/functions/SubstractionFunction.java
| 71
src/org/objectweb/fractal/fscript/functions/TrueFunction.java
| 60
src/org/objectweb/fractal/fscript/functions/ValueFunction.java
| 62
src/org/objectweb/fractal/fscript/nodes/AttributeNode.java
| 186 +
src/org/objectweb/fractal/fscript/nodes/ComponentNode.java
| 137
src/org/objectweb/fractal/fscript/nodes/DefaultNodeFactory.java
| 49
src/org/objectweb/fractal/fscript/nodes/FractalNode.java
| 66
src/org/objectweb/fractal/fscript/nodes/InterfaceNode.java
| 130
src/org/objectweb/fractal/fscript/nodes/MethodNode.java
| 112
src/org/objectweb/fractal/fscript/parser/FScriptLexer.java
| 1378 ++++++++++
src/org/objectweb/fractal/fscript/parser/FScriptLexer.smap
| 718 +++++
src/org/objectweb/fractal/fscript/parser/FScriptLexerTokenTypes.java
| 75
src/org/objectweb/fractal/fscript/parser/FScriptLexerTokenTypes.txt
| 50
src/org/objectweb/fractal/fscript/parser/FScriptParser.java
| 881 ++++++
src/org/objectweb/fractal/fscript/parser/FScriptParser.smap
| 685 ++++
src/org/objectweb/fractal/fscript/parser/FScriptParserTokenTypes.java
| 76
src/org/objectweb/fractal/fscript/parser/FScriptParserTokenTypes.txt
| 50
src/org/objectweb/fractal/fscript/parser/fscript.g
| 329 ++
src/org/objectweb/fractal/fscript/parser/lexer.g
| 102
src/org/objectweb/fractal/fscript/reconfiguration/AbstractReconfiguration.java
| 36
src/org/objectweb/fractal/fscript/reconfiguration/AddReconfiguration.java
| 56
src/org/objectweb/fractal/fscript/reconfiguration/BindReconfiguration.java
| 64
src/org/objectweb/fractal/fscript/reconfiguration/EchoReconfiguration.java
| 38
src/org/objectweb/fractal/fscript/reconfiguration/InstanciateReconfiguration.java
| 50
src/org/objectweb/fractal/fscript/reconfiguration/LifeCycleReconfiguration.java
| 55
src/org/objectweb/fractal/fscript/reconfiguration/Reconfiguration.java
| 43
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationFailedException.java
| 44
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationHelper.java
| 80
src/org/objectweb/fractal/fscript/reconfiguration/ReconfigurationManager.java
| 92
src/org/objectweb/fractal/fscript/reconfiguration/RemoveReconfiguration.java
| 54
src/org/objectweb/fractal/fscript/reconfiguration/SetNameReconfiguration.java
| 48
src/org/objectweb/fractal/fscript/reconfiguration/SetValueReconfiguration.java
| 54
src/org/objectweb/fractal/fscript/reconfiguration/StartReconfiguration.java
| 31
src/org/objectweb/fractal/fscript/reconfiguration/StopReconfiguration.java
| 31
src/org/objectweb/fractal/fscript/reconfiguration/Transaction.java
| 148 +
src/org/objectweb/fractal/fscript/reconfiguration/UnbindReconfiguration.java
| 54
src/org/objectweb/fractal/fscript/statements/AssignmentStatement.java
| 69
src/org/objectweb/fractal/fscript/statements/BlockStatement.java
| 73
src/org/objectweb/fractal/fscript/statements/ExpressionStatement.java
| 64
src/org/objectweb/fractal/fscript/statements/ForeachStatement.java
| 87
src/org/objectweb/fractal/fscript/statements/IfStatement.java
| 84
src/org/objectweb/fractal/fscript/statements/ReturnStatement.java
| 64
src/org/objectweb/fractal/fscript/statements/Statement.java
| 39
src/org/objectweb/fractal/fscript/statements/UserDefinedProcedure.java
| 113
tests/org/objectweb/fractal/fscript/AllTests.java
| 44
tests/org/objectweb/fractal/fscript/AxesTests.java
| 44
tests/org/objectweb/fractal/fscript/BasicFunctionsTests.java
| 135
tests/org/objectweb/fractal/fscript/EnvironmentTests.java
| 73
tests/org/objectweb/fractal/fscript/ExpressionsTests.java
| 132
tests/org/objectweb/fractal/fscript/FPathTests.java
| 89
tests/org/objectweb/fractal/fscript/FScriptTestCase.java
| 51
tests/org/objectweb/fractal/fscript/FractalTestCase.java
| 101
tests/org/objectweb/fractal/fscript/NodesTests.java
| 72
162 files changed, 15025 insertions(+)
Index: fscript/.antlr-eclipse
diff -u /dev/null fscript/.antlr-eclipse:1.3
--- /dev/null Tue Jul 18 19:54:13 2006
+++ fscript/.antlr-eclipse Tue Jul 18 19:54:11 2006
@@ -0,0 +1,38 @@
+<?xml version='1.0' ?>
+<settings>
+ <resource name='src/org/obasco/fractal/fscript/parser/lexer.g'>
+ <property name='traceTreeParser' value='false' />
+ <property name='noTrace' value='true' />
+ <property name='output' value='' />
+ <property name='diagnosticOutput' value='false' />
+ <property name='superGrammars' value='' />
+ <property name='installSmap' value='true' />
+ <property name='docbookOutput' value='false' />
+ <property name='traceLexer' value='false' />
+ <property name='debug' value='false' />
+ <property name='traceParser' value='false' />
+ <property name='normalOuput' value='true' />
+ <property name='trace' value='false' />
+ <property name='htmlOutput' value='false' />
+ <property name='cleanWarnings' value='true' />
+ </resource>
+ <resource name='**ANTLR-ECLIPSE-PLUGIN**'>
+ <property name='pluginVersion' value='2.7.6' />
+ </resource>
+ <resource name='src/org/obasco/fractal/fscript/parser/fscript.g'>
+ <property name='traceTreeParser' value='false' />
+ <property name='noTrace' value='true' />
+ <property name='output' value='' />
+ <property name='diagnosticOutput' value='false' />
+ <property name='superGrammars' value='' />
+ <property name='installSmap' value='true' />
+ <property name='docbookOutput' value='false' />
+ <property name='traceLexer' value='false' />
+ <property name='debug' value='false' />
+ <property name='traceParser' value='false' />
+ <property name='normalOuput' value='true' />
+ <property name='trace' value='false' />
+ <property name='htmlOutput' value='false' />
+ <property name='cleanWarnings' value='true' />
+ </resource>
+</settings>
Index: fscript/.classpath
diff -u /dev/null fscript/.classpath:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/.classpath Tue Jul 18 19:54:11 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="tests"/>
+ <classpathentry kind="src" path="etc"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/antlr-2.7.5.jar"/>
+ <classpathentry kind="lib" path="lib/asm.jar"/>
+ <classpathentry
sourcepath="C:/workspace/fractal-all-2.3.1/fractal/src" kind="lib"
path="lib/fractal-2.0.1.jar"/>
+ <classpathentry sourcepath="C:/workspace/fractal-all-2.3.1/adl/src"
kind="lib" path="lib/fractal-adl-2.1.3.jar"/>
+ <classpathentry kind="lib" path="lib/dtdparser.jar"/>
+ <classpathentry kind="lib" path="lib/julia-asm-2.1.3.jar"/>
+ <classpathentry kind="lib" path="lib/julia-mixins-2.1.3.jar"/>
+ <classpathentry kind="lib" path="lib/julia-runtime-2.1.3.jar"/>
+ <classpathentry kind="lib" path="lib/naming-2.0.1.jar"/>
+ <classpathentry kind="lib" path="lib/ow_deployment_scheduling.jar"/>
+ <classpathentry kind="lib" path="lib/ow_monolog.jar"/>
+ <classpathentry kind="lib" path="lib/ow_util_log_api.jar"/>
+ <classpathentry kind="lib" path="lib/junit-3.8.1.jar"/>
+ <classpathentry kind="lib" path="lib/helloworld.jar"/>
+ <classpathentry kind="lib" path="lib/comanche.jar"/>
+ <classpathentry kind="output" path="build"/>
+</classpath>
Index: fscript/.project
diff -u /dev/null fscript/.project:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/.project Tue Jul 18 19:54:11 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>fscript</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Index: fscript/AUTHORS
diff -u /dev/null fscript/AUTHORS:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/AUTHORS Tue Jul 18 19:54:11 2006
@@ -0,0 +1,2 @@
+Main and currently only author:
+- Pierre-Charles David (PierreCharles.David@xxxxxxxxxxxxxxxxx)
Index: fscript/LGPL-2.1
diff -u /dev/null fscript/LGPL-2.1:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/LGPL-2.1 Tue Jul 18 19:54:11 2006
@@ -0,0 +1,510 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
Index: fscript/LICENSE
diff -u /dev/null fscript/LICENSE:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/LICENSE Tue Jul 18 19:54:11 2006
@@ -0,0 +1,17 @@
+Copyright (c) 2004-2005 Université de Nantes (LINA)
+Copyright (c) 2005-2006 France Télécom
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License version 2.1 as published by the Free Software Foundation.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
Index: fscript/README
diff -u /dev/null fscript/README:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/README Tue Jul 18 19:54:11 2006
@@ -0,0 +1 @@
+FScript is a language to program safe reconfigurations of Fractal
architectures.
Index: fscript/build.properties
diff -u /dev/null fscript/build.properties:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/build.properties Tue Jul 18 19:54:11 2006
@@ -0,0 +1,8 @@
+antlr.jar=lib/antlr-2.7.5.jar
+junit.jar=lib/junit-3.8.1.jar
+fractal.jar=lib/fractal-2.0.1.jar
+fractal-adl.jar=lib/fractal-adl-2.1.3.jar
+futilities.jar=lib/futilities-0.5.1.jar
+julia-asm.jar=lib/julia-asm-2.1.3.jar
+julia-mixins.jar=lib/julia-mixins-2.1.3.jar
+julia-runtime.jar=lib/julia-runtime-2.1.3.jar
Index: fscript/build.xml
diff -u /dev/null fscript/build.xml:1.3
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/build.xml Tue Jul 18 19:54:11 2006
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<project name="FScript" default="jar" basedir=".">
+ <description>A small language for safe dynamic reconfigurations of Fractal
+ architectures.</description>
+
+ <property name="project.name" value="fscript" />
+ <property name="project.version" value="0.6-SNAPSHOT" />
+
+ <property name="src.dir" value="src" />
+ <property name="examples.dir" value="${basedir}/examples" />
+ <property name="build.dir" value="build" />
+ <property name="javadoc.dir" value="javadoc" />
+ <property name="jar.name" value="${project.name}-${project.version}.jar" />
+ <property name="dist.file" value="${project.name}-${project.version}.zip"
/>
+ <property file="build.properties" />
+
+ <path id="compile.classpath">
+ <pathelement location="${antlr.jar}" />
+ <pathelement location="${junit.jar}" />
+ <pathelement location="${fractal.jar}" />
+ <pathelement location="${fractal-adl.jar}" />
+ </path>
+
+ <target name="compile" description="Compiles code, class files go to the
build directory.">
+ <mkdir dir="${build.dir}" />
+ <antlr target="${src.dir}/org/objectweb/fractal/fscript/parser/lexer.g"
/>
+ <antlr
target="${src.dir}/org/objectweb/fractal/fscript/parser/fscript.g" />
+ <javac srcdir="${src.dir}" destdir="${build.dir}" source="1.5"
classpathref="compile.classpath" />
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}" excludes="**/*.java" />
+ </copy>
+ </target>
+
+ <target name="jar" depends="compile" description="Builds a JAR file with
compiled classes and related resources.">
+ <jar destfile="${jar.name}" basedir="${build.dir}" />
+ </target>
+
+ <target name="javadoc" description="Creates the API documentation.">
+ <javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}"
packagenames="org.objectweb.fractal.fscript,org.objectweb.fractal.fscript.actions,org.objectweb.fractal.fscript.axes,org.objectweb.fractal.fscript.expressions,org.objectweb.fractal.fscript.functions,org.objectweb.fractal.fscript.parser,org.objectweb.fractal.fscript.primitives,org.objectweb.fractal.fscript.statements,org.objectweb.fractal.fscript.values"
classpathref="compile.classpath" doctitle="FScript - safe dynamic
reconfigurations of Fractal architectures" />
+ </target>
+
+ <target name="dist" depends="jar,javadoc" description="Creates a binary
distribution file.">
+ <zip destfile="src.zip" basedir="${src.dir}" />
+ <zip destfile="${dist.file}">
+ <zipfileset dir="." prefix="${project.name}-${project.version}">
+ <include name="${jar.name}" />
+ <include name="src.zip" />
+ <include name="${javadoc.dir}/**" />
+ </zipfileset>
+ </zip>
+ <delete file="src.zip" />
+ </target>
+
+ <target name="clean" description="Removes all generated files and
directories.">
+ <delete>
+ <fileset dir="${src.dir}/org/objectweb/fractal/fscript/parser/"
includes="*.java" />
+ <fileset dir="${src.dir}/org/objectweb/fractal/fscript/parser/"
includes="*.txt" />
+ </delete>
+ <delete file="${dist.file}" />
+ <delete file="${jar.name}" />
+ <delete dir="${javadoc.dir}" />
+ <delete dir="${build.dir}" />
+ </target>
+</project>
+
Index: fscript/console.sh
diff -u /dev/null fscript/console.sh:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/console.sh Tue Jul 18 19:54:11 2006
@@ -0,0 +1 @@
+java -cp
build:etc:lib/antlr-2.7.5.jar:lib/asm.jar:lib/comanche.jar:lib/dtdparser.jar:lib/fractal-2.0.1.jar:lib/fractal-adl-2.1.3.jar:lib/fscript-0.6-SNAPSHOT.jar:lib/futilities-0.5.1.jar:lib/julia-asm-2.1.3.jar:lib/julia-mixins-2.1.3.jar:lib/julia-runtime-2.1.3.jar:lib/naming-2.0.1.jar:lib/ow_deployment_scheduling.jar:lib/ow_monolog.jar:lib/ow_perseus_cache.jar:lib/ow_util_log_api.jar
org.objectweb.fractal.fscript.Console
Index: fscript/etc/execute.properties
diff -u /dev/null fscript/etc/execute.properties:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/etc/execute.properties Tue Jul 18 19:54:12 2006
@@ -0,0 +1,5 @@
+fractal.provider org.objectweb.fractal.julia.Julia
+julia.loader org.objectweb.fractal.julia.loader.DynamicLoader
+julia.config etc/julia.cfg
+
+run.classname org.objectweb.fractal.fscript.Console
Index: fscript/etc/julia.cfg
diff -u /dev/null fscript/etc/julia.cfg:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/etc/julia.cfg Tue Jul 18 19:54:12 2006
@@ -0,0 +1,613 @@
+###############################################################################
+# STANDARD JULIA CONFIGURATION FILE - DO NOT EDIT
+#
+# PUT NEW OR OVERRIDEN DEFINITIONS AT THE END OF THE FILE, OR IN OTHER FILES
+###############################################################################
+
+#
-----------------------------------------------------------------------------
+# INTERFACE CLASS GENERATORS
+#
-----------------------------------------------------------------------------
+
+# default class generator, generates sub classes of BasicComponentInterface
+
+(interface-class-generator
+ (org.objectweb.fractal.julia.asm.InterfaceClassGenerator
+ org.objectweb.fractal.julia.BasicComponentInterface
+ )
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER INTERFACES
+#
+# each definition must be of the form (interface-name interface-signature)
+#
-----------------------------------------------------------------------------
+
+# Component interface
+
+(component-itf
+ (component org.objectweb.fractal.api.Component)
+)
+
+# TypeFactory interface
+
+(type-factory-itf
+ (type-factory org.objectweb.fractal.api.type.TypeFactory)
+)
+
+# GenericFactory interface
+
+(generic-factory-itf
+ (generic-factory org.objectweb.fractal.api.factory.GenericFactory)
+)
+
+# Factory interface
+
+(factory-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal Factory interface
+ # the second one provides a Julia extension of the Factory interface
+ # (factory org.objectweb.fractal.api.factory.Factory)
+ (factory org.objectweb.fractal.julia.factory.Template)
+)
+
+(julia-factory-itf
+ (/template org.objectweb.fractal.julia.factory.Template)
+)
+
+# AttributeController interface
+
+(attribute-controller-itf
+ (attribute org.objectweb.fractal.api.control.AttributeController)
+)
+
+(julia-attribute-controller-itf
+ (/cloneable-attribute-controller
org.objectweb.fractal.julia.control.attribute.CloneableAttributeController)
+)
+
+# BindingController interface
+
+(binding-controller-itf
+ (binding-controller org.objectweb.fractal.api.control.BindingController)
+)
+
+# ContentController interface
+
+(content-controller-itf
+ (content-controller org.objectweb.fractal.api.control.ContentController)
+)
+
+# SuperController interface
+
+(super-controller-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal SuperController interface
+ # the second one provides a Julia extension of the SuperController
interface
+ # (super-controller org.objectweb.fractal.api.control.SuperController)
+ (super-controller
org.objectweb.fractal.julia.control.content.SuperControllerNotifier)
+)
+
+(julia-super-controller-itf
+ (/super-controller-notifier
org.objectweb.fractal.julia.control.content.SuperControllerNotifier)
+)
+
+# LifeCycleController interface
+
+(lifecycle-controller-itf
+ # choose one of the following definitions:
+ # the first one provides only the Fractal LifeCycleController interface
+ # the second one provides a Julia extension of the LifeCycleController
interface
+ # (lifecycle-controller
org.objectweb.fractal.api.control.LifeCycleController)
+ (lifecycle-controller
org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator)
+)
+
+(julia-lifecycle-controller-itf
+ (/lifecycle-coordinator
org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator)
+)
+
+# NameController interface
+
+(name-controller-itf
+ (name-controller org.objectweb.fractal.api.control.NameController)
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER OBJECTS
+#
+# each definition must be an object descriptor
+#
-----------------------------------------------------------------------------
+
+# Component implementation
+
+(component-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ComponentImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.BasicComponentMixin
+ # to check type related constraints, and for collection interfaces
support:
+ org.objectweb.fractal.julia.TypeComponentMixin
+ ))
+)
+
+# TypeFactory implementation
+
+(type-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ TypeFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.type.BasicTypeFactoryMixin
+ ))
+)
+
+# GenericFactory implementation
+
+(generic-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ GenericFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.BasicInitializableMixin
+ org.objectweb.fractal.julia.loader.UseLoaderMixin
+ org.objectweb.fractal.julia.type.UseTypeFactoryMixin
+ org.objectweb.fractal.julia.factory.BasicGenericFactoryMixin
+ # to check the component content descriptor with the Java Reflection API:
+ org.objectweb.fractal.julia.factory.CheckGenericFactoryMixin
+ ))
+)
+
+# Factory implementation (for template components)
+
+(factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ FactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.factory.BasicTemplateMixin
+ # to copy the template's attributes to the components it creates:
+
org.objectweb.fractal.julia.control.attribute.UseCloneableAttributeControllerMixin
+ org.objectweb.fractal.julia.factory.AttributeTemplateMixin
+ # to copy the template's name to the components it creates:
+ org.objectweb.fractal.julia.control.name.UseNameControllerMixin
+ org.objectweb.fractal.julia.factory.NameTemplateMixin
+ ))
+)
+
+# Factory implementation (for singleton template components)
+
+(singleton-factory-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ SingletonFactoryImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.factory.BasicTemplateMixin
+ # to copy the template's attributes to the components it creates:
+
org.objectweb.fractal.julia.control.attribute.UseCloneableAttributeControllerMixin
+ org.objectweb.fractal.julia.factory.AttributeTemplateMixin
+ # to copy the template's name to the components it creates:
+ org.objectweb.fractal.julia.control.name.UseNameControllerMixin
+ org.objectweb.fractal.julia.factory.NameTemplateMixin
+ # to provide the singleton semantics to the template:
+ org.objectweb.fractal.julia.factory.SingletonTemplateMixin
+ ))
+)
+
+# BindingController implementation (for primitive components without content)
+
+(primitive-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ PrimitiveBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin
+ # to initialize the BasicBindingControllerMixin from the component's
type:
+ org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ ))
+)
+
+# BindingController implementation (for primitive components with content)
+
+(container-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ContainerBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+
org.objectweb.fractal.julia.control.binding.ContainerBindingControllerMixin
+ # to skip Interface objects before delegating to the encapsulated
component:
+ #
org.objectweb.fractal.julia.control.binding.OptimizedContainerBindingMixin
+ # to manage output interceptors:
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.InterceptorBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ ))
+)
+
+# BindingController implementation (for composite components)
+
+(composite-binding-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ CompositeBindingControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin
+ # to initialize the BasicBindingControllerMixin from the component's
type:
+ org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin
+ # to check some basic pre conditions (interface not already bound, ...)
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.binding.CheckBindingMixin
+ # to check type related constraints for bindings:
+ org.objectweb.fractal.julia.control.binding.TypeBindingMixin
+ # to check content related constraints for bindings:
+ org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
+ org.objectweb.fractal.julia.control.binding.ContentBindingMixin
+ # to check lifecycle related constraints for bindings:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
+ # to manage the getFcItfImpl links of the Interface objects:
+ # choose one of ComponentBindingMixin and OptimizedCompositeBindingMixin
+ # (the last one creates and updates shortcuts links when possible)
+ org.objectweb.fractal.julia.control.content.UseContentControllerMixin
+ # org.objectweb.fractal.julia.control.binding.CompositeBindingMixin
+
org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin
+ ))
+)
+
+# ContentController implementation
+
+(content-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ ContentControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+ org.objectweb.fractal.julia.control.content.BasicContentControllerMixin
+ # to check some basic pre conditions, and to prevent hierarchy cycles:
+ org.objectweb.fractal.julia.control.content.CheckContentMixin
+ # to check type related constraints in getFcInternalInterface:
+ org.objectweb.fractal.julia.control.content.TypeContentMixin
+ # to check binding locality related constraints in removeFcSubComponent:
+ org.objectweb.fractal.julia.control.content.BindingContentMixin
+ # to check lifecycle related constraints:
+ org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
+ org.objectweb.fractal.julia.control.content.LifeCycleContentMixin
+ # to notify sub components when they are added or removed from this
component:
+ org.objectweb.fractal.julia.control.content.SuperContentMixin
+ ))
+)
+
+# SuperController implementation
+
+(super-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ SuperControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.content.BasicSuperControllerMixin
+ ))
+)
+
+# LifeCycleController implementation (for primitive or composite components)
+
+(lifecycle-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ LifeCycleControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin
+ # to check that mandatory client interfaces are bound in startFc:
+ org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ # to notify the encapsulated component (if present) when its state
changes:
+ org.objectweb.fractal.julia.control.lifecycle.ContainerLifeCycleMixin
+ ))
+)
+
+# LifeCycleController implementation (for composite components only)
+
+(composite-lifecycle-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ CompositeLifeCycleControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.UseComponentMixin
+
org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleCoordinatorMixin
+
org.objectweb.fractal.julia.control.lifecycle.OptimizedLifeCycleControllerMixin
+ # to check that mandatory client interfaces are bound in startFc:
+ org.objectweb.fractal.julia.control.lifecycle.TypeLifeCycleMixin
+ ))
+)
+
+# NameController implementation
+
+(name-controller-impl
+ ((org.objectweb.fractal.julia.asm.MixinClassGenerator
+ NameControllerImpl
+ org.objectweb.fractal.julia.BasicControllerMixin
+ org.objectweb.fractal.julia.control.name.BasicNameControllerMixin
+ ))
+)
+
+#
-----------------------------------------------------------------------------
+# CONTROLLER DESCRIPTORS
+#
-----------------------------------------------------------------------------
+
+(optimizationLevel
+ # choose one of the following optimization options:
+ none
+ # mergeControllers
+ # mergeControllersAndInterceptors
+ # mergeControllersAndContent
+ # mergeControllersInterceptorsAndContent
+)
+
+(bootstrap
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'type-factory-itf
+ 'generic-factory-itf
+ (loader org.objectweb.fractal.julia.loader.Loader)
+ )
+ (
+ 'component-impl
+ 'type-factory-impl
+ 'generic-factory-impl
+ # choose one of the following classes:
+ # the first one loads all classes from the classpath
+ # the second one can generate missing classes on the fly, dynamically
+ # org.objectweb.fractal.julia.loader.BasicLoader
+ org.objectweb.fractal.julia.loader.DynamicLoader
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ none
+ )
+)
+
+(primitive
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ 'container-binding-controller-impl
+ 'super-controller-impl
+ 'lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ (org.objectweb.fractal.julia.asm.InterceptorClassGenerator
+ org.objectweb.fractal.julia.asm.LifeCycleCodeGenerator
+ )
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricPrimitive
+ 'primitive
+)
+
+(composite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricComposite
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'lifecycle-controller-itf
+ # only if lifecycle-controller-itf does not designate the Julia
interface:
+ # 'julia-lifecycle-controller-itf
+ 'name-controller-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'composite-lifecycle-controller-impl
+ 'name-controller-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(primitiveTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ 'primitive-binding-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricPrimitiveTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'julia-attribute-controller-itf
+ 'binding-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'primitive-binding-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(compositeTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+(parametricCompositeTemplate
+ (
+ 'interface-class-generator
+ (
+ 'component-itf
+ 'julia-attribute-controller-itf
+ 'binding-controller-itf
+ 'content-controller-itf
+ 'super-controller-itf
+ # only if super-controller-itf does not designate the Julia interface:
+ # 'julia-super-controller-itf
+ 'name-controller-itf
+ 'factory-itf
+ # only if factory-itf does not designate the Julia interface:
+ # 'julia-factory-itf
+ )
+ (
+ 'component-impl
+ ((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator
+ ('attributeControllerInterface)
+ ))
+ 'composite-binding-controller-impl
+ 'content-controller-impl
+ 'super-controller-impl
+ 'name-controller-impl
+ 'factory-impl
+ )
+ (
+ # no interceptors
+ )
+ org.objectweb.fractal.julia.asm.MergeClassGenerator
+ 'optimizationLevel
+ )
+)
+
+###############################################################################
+# CUSTOM CONFIGURATION INFORMATION
+###############################################################################
+
+# no custom definitions
Index: fscript/lib/antlr-2.7.5.jar
<<Binary file>>
Index: fscript/lib/asm.jar
<<Binary file>>
Index: fscript/lib/comanche.jar
<<Binary file>>
Index: fscript/lib/dtdparser.jar
<<Binary file>>
Index: fscript/lib/fractal-2.0.1.jar
<<Binary file>>
Index: fscript/lib/fractal-adl-2.1.3.jar
<<Binary file>>
Index: fscript/lib/helloworld.jar
<<Binary file>>
Index: fscript/lib/julia-asm-2.1.3.jar
<<Binary file>>
Index: fscript/lib/julia-mixins-2.1.3.jar
<<Binary file>>
Index: fscript/lib/julia-runtime-2.1.3.jar
<<Binary file>>
Index: fscript/lib/junit-3.8.1.jar
<<Binary file>>
Index: fscript/lib/naming-2.0.1.jar
<<Binary file>>
Index: fscript/lib/ow_deployment_scheduling.jar
<<Binary file>>
Index: fscript/lib/ow_monolog.jar
<<Binary file>>
Index: fscript/lib/ow_util_log_api.jar
<<Binary file>>
Index: fscript/src/org/objectweb/fractal/fscript/AbstractProcedure.java
diff -u /dev/null
fscript/src/org/objectweb/fractal/fscript/AbstractProcedure.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/AbstractProcedure.java Tue
Jul 18 19:54:12 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+public abstract class AbstractProcedure implements Procedure {
+ @Override
+ public String toString() {
+ return getName() + "(" + (getSignature() != null ? getSignature() :
"...") + ")";
+ }
+}
Index: fscript/src/org/objectweb/fractal/fscript/CodeGenerator.java
diff -u /dev/null
fscript/src/org/objectweb/fractal/fscript/CodeGenerator.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/CodeGenerator.java Tue
Jul 18 19:54:12 2006
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.util.Fractal;
+
+public class CodeGenerator {
+ private List<Object[]> log;
+ private PrintStream out;
+ private int dynamicComponents;
+ private Map<Component, String> identifiers;
+
+ public CodeGenerator(List<Object[]> log, PrintStream out) {
+ assert (log != null);
+ this.log = log;
+ this.out = out;
+ this.identifiers = new HashMap<Component, String>();
+ this.dynamicComponents = 0;
+ collectIdentifiers();
+ }
+
+ public void generate() {
+ out.println("#include <fractal/api/ComponentIdentity.idl.h>");
+ out.println("#include <fscript.h>");
+ out.println("#include \"addresses.h\"");
+ out.println();
+ out.println("#ifdef DUMMY_NAMES");
+ for (String id : identifiers.values()) {
+ out.println("#define " + id + " 0x0000");
+ }
+ out.println("#endif");
+ out.println();
+ out.println("int main(int argc, char *argv[])");
+ out.println("{");
+ for (Object[] entry : log) {
+ String action = (String) entry[0];
+ Component retVal = (Component) entry[entry.length - 1];
+ Object[] args = new Object[entry.length - 2];
+ System.arraycopy(entry, 1, args, 0, args.length);
+ dumpEntry(action, args, retVal);
+ }
+ out.println(" return 0;");
+ out.println("}");
+ }
+
+ private void collectIdentifiers() {
+ for (Object[] entry : log) {
+ for (int i = 1; i < entry.length - 1; i++) {
+ Component c = null;
+ if (entry[i] instanceof Component) {
+ c = (Component) entry[i];
+ } else if (entry[i] instanceof Interface) {
+ c = ((Interface) entry[i]).getFcItfOwner();
+ }
+ if (c != null && !identifiers.containsKey(c)) {
+ identifiers.put(c, getFullName(c));
+ }
+ }
+ }
+ }
+
+ private String getFullName(Component c) {
+ Component[] parents = null;
+ try {
+ parents = Fractal.getSuperController(c).getFcSuperComponents();
+ } catch (NoSuchInterfaceException nsie) {
+ // No parents
+ }
+ if (parents == null || parents.length == 0) {
+ // Top-level: full name is local name
+ return getLocalName(c);
+ } else {
+ Component father = parents[0];
+ return getFullName(father) + "__" + getLocalName(c);
+ }
+ }
+
+ private String getLocalName(Component c) {
+ try {
+ return Fractal.getNameController(c).getFcName();
+ } catch (NoSuchInterfaceException e) {
+ throw new RuntimeException("Can not generat identifier for " + c
+ + ": no name-controller interface available.");
+ }
+ }
+
+ private void dumpEntry(String action, Object[] args, Component retVal) {
+ out.print(" ");
+ if (retVal != null) {
+ // Dynamic component created: override the name found by
+ // collectIdentifiers.
+ String var = "comp_" + dynamicComponents++;
+ identifiers.put(retVal, var);
+ out.print("Rfractal_api_ComponentIdentity *" + var + " = ");
+ }
+ out.print("fscript_" + action.replace('-', '_'));
+ out.print("(");
+ for (int i = 0; i < args.length; i++) {
+ out.print(repr(args[i]));
+ if (i < args.length - 1) {
+ out.print(", ");
+ }
+ }
+ out.println(");");
+ }
+
+ private String repr(Object v) {
+ if (v instanceof String) {
+ String s = (String) v;
+ return "\"" + s.replace("\"", "\\\"") + "\"";
+ } else if (v instanceof Component) {
+ return identifiers.get(v);
+ } else if (v instanceof Interface) {
+ Interface itf = (Interface) v;
+ Component c = itf.getFcItfOwner();
+ return identifiers.get(c) + ", \"" + itf.getFcItfName() + "\"";
+ } else if (v != null) {
+ return v.toString();
+ } else {
+ return "NULL";
+ }
+ }
+}
Index: fscript/src/org/objectweb/fractal/fscript/Console.java
diff -u /dev/null fscript/src/org/objectweb/fractal/fscript/Console.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/Console.java Tue Jul 18
19:54:12 2006
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.io.*;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.fscript.expressions.Expression;
+import org.objectweb.fractal.fscript.statements.Statement;
+
+/**
+ * @author Pierre-Charles David <pierrecharles.david@xxxxxxxxxxxxxxxxx>
+ *
+ */
+public class Console implements Runnable {
+ private FScriptInterpreter fscript;
+ private LineNumberReader input;
+ private PrintStream output;
+ private PrintStream error;
+ private String prompt;
+ private boolean finished;
+
+ public Console(FScriptInterpreter fscript) {
+ this(fscript, System.in, System.out, System.err);
+ }
+
+ public Console(FScriptInterpreter fscript, InputStream in, PrintStream
out, PrintStream err) {
+ this.fscript = fscript;
+ this.input = new LineNumberReader(new InputStreamReader(in));
+ this.output = out;
+ this.error = err;
+ this.prompt = "FScript";
+ }
+
+ public String getPrompt() {
+ return prompt;
+ }
+
+ public void setPrompt(String prompt) {
+ this.prompt = prompt;
+ }
+
+ public void run() {
+ finished = false;
+ output.println("FScript console");
+ while (!finished) {
+ showPrompt();
+ String line = null;
+ try {
+ line = input.readLine();
+ } catch (IOException e) {
+ printError(e.getMessage());
+ continue;
+ }
+ if (isInternalCommand(line)) {
+ executeInternalCommand(line.substring(1));
+ } else if (isStatement(line)) {
+ execStatement(line);
+ } else {
+ evalExpression(line);
+ }
+ }
+ }
+
+ private boolean isStatement(String line) {
+ return line.endsWith(";") || line.contains("{");
+ }
+
+ private boolean isInternalCommand(String line) {
+ return line.startsWith("!");
+ }
+
+ private void executeInternalCommand(String cmd) {
+ if ("quit".equals(cmd)) {
+ finished = true;
+ } else if (cmd.startsWith("loadJar")) {
+ loadJar(cmd.substring("loadJar ".length()), "file", "localhost");
+ } else if (cmd.startsWith("load")) {
+ loadDefinitions(cmd.substring("load ".length()));
+ } else if (cmd.startsWith("run")) {
+ launch(cmd.substring("run ".length()));
+ } else if (cmd.startsWith("dump")) {
+ fscript.dumpLog(output);
+ }
+ }
+
+ private void launch(String args) {
+ int sep = args.indexOf(' ');
+ final String itf = args.substring(0, sep);
+ String comp = args.substring(sep + 1);
+ Object root = evalExpression(comp);
+ final Component rootC = Values.getSingleNode(root).getComponent();
+ new Thread(new Runnable() {
+ public void run() {
+ Runnable run;
+ try {
+ run = (Runnable) rootC.getFcInterface(itf);
+ run.run();
+ } catch (NoSuchInterfaceException e) {
+ printError(e.getMessage());
+ }
+ }
+ }).start();
+ }
+
+ private void loadDefinitions(String file) {
+ try {
+ fscript.loadDefinitions(new FileReader(file));
+ } catch (FileNotFoundException e) {
+ printError(e.getMessage());
+ } catch (FScriptException e) {
+ printError(e.getMessage());
+ }
+ }
+
+ public void loadJar(String path, String protocol, String host) {
+ try {
+ ((FSciptClassLoader) fscript.getLoader()).loadJar(path,
protocol, host);
+ } catch (IOException e) {
+ printError(e.getMessage());
+ }
+ }
+
+ private void execStatement(String line) {
+ try {
+ Statement stat = fscript.parseStatement(line);
+ fscript.execute(stat, null);
+ } catch (FScriptException e) {
+ printError(e.getMessage());
+ }
+ }
+
+ private String formattedValue(Object result) {
+ if (result instanceof Object[]) {
+ StringBuilder buf = new StringBuilder("{");
+ Util.join((Object[]) result, ", ", buf);
+ return buf.append("}").toString();
+ } else if (result != null) {
+ return result.toString();
+ } else {
+ return null;
+ }
+ }
+
+ private Object evalExpression(String line) {
+ try {
+ Expression expr = fscript.parseExpression(line);
+ Object result = fscript.evaluate(expr, null);
+ printResult(formattedValue(result));
+ return result;
+ } catch (FScriptException e) {
+ printError(e.getMessage());
+ return null;
+ }
+ }
+
+ private void showPrompt() {
+ output.print(prompt + "> ");
+ output.flush();
+ }
+
+ private void printError(String message) {
+ error.println("Error: " + message);
+ }
+
+ private void printResult(String string) {
+ output.println("=> " + string);
+ }
+
+ public static void main(String[] args) {
+ // Setup default configuration
+ Properties config = new Properties();
+ config.setProperty("fractal.provider",
"org.objectweb.fractal.julia.Julia");
+ config.setProperty("julia.loader",
"org.objectweb.fractal.julia.loader.DynamicLoader");
+ config.setProperty("julia.config", "etc/julia.cfg");
+ // Enable external file to override them
+ if (args.length > 0) {
+ try {
+ config.load(new FileInputStream(args[0]));
+ } catch (FileNotFoundException e) {
+ System.err.println("Configuration file " + args[0] + " not
found.");
+ System.err.println("Reverting to default configuration.");
+ } catch (IOException e) {
+ System.err.println("Error while reading configuration file "
+ args[0] + ".");
+ System.err.println("Reverting to default configuration.");
+ }
+ }
+ // Apply the configuration parameters
+ for (Iterator iter = config.keySet().iterator(); iter.hasNext();) {
+ String propName = (String) iter.next();
+ // Only apply parameters which are not overridden on the JVM
command line
+ if (System.getProperty(propName) == null) {
+ System.setProperty(propName, config.getProperty(propName));
+ }
+ }
+ // Start the console
+ new Console(new FScriptInterpreter()).run();
+ }
+
+}
Index: fscript/src/org/objectweb/fractal/fscript/DefaultModel.java
diff -u /dev/null
fscript/src/org/objectweb/fractal/fscript/DefaultModel.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/DefaultModel.java Tue Jul 18
19:54:12 2006
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.objectweb.fractal.adl.ADLException;
+import org.objectweb.fractal.adl.Factory;
+import org.objectweb.fractal.adl.FactoryFactory;
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.fscript.axes.*;
+import org.objectweb.fractal.fscript.nodes.*;
+
+public class DefaultModel implements Model {
+ private NodeFactory factory;
+ private Map<String, Axis> axes;
+
+ public DefaultModel() {
+ this.factory = new DefaultNodeFactory();
+ axes = new HashMap<String, Axis>();
+ defineAxes();
+ }
+
+ public Factory getComponentFactory() {
+ try {
+ return FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND);
+ } catch (ADLException e) {
+ return null;
+ }
+ }
+
+ private void defineAxes() {
+ defineAxis(new ComponentAxis(factory));
+ defineAxis(new AttributesAxis(factory));
+ defineAxis(new InterfacesAxis(this));
+ defineAxis(new InternalInterfacesAxis(this));
+ defineAxis(new BindingAxis(factory));
+ //
+ defineAxis(new ChildAxis(this, false, false));
+ defineAxis(new ChildAxis(this, true, false));
+ defineAxis(new ChildAxis(this, false, true));
+ defineAxis(new ChildAxis(this, true, true));
+ //
+ defineAxis(new ParentAxis(this, false, false));
+ defineAxis(new ParentAxis(this, true, false));
+ defineAxis(new ParentAxis(this, false, true));
+ defineAxis(new ParentAxis(this, true, true));
+ //
+ defineAxis(new SiblingAxis(this, false));
+ defineAxis(new SiblingAxis(this, true));
+ //
+ defineAxis(new MethodAxis(this));
+ }
+
+ private void defineAxis(Axis axis) {
+ axes.put(axis.getName(), axis);
+ }
+
+ public String[] getAxisNames() {
+ Set<String> keys = axes.keySet();
+ return keys.toArray(new String[keys.size()]);
+ }
+
+ public Axis getAxis(String name) {
+ return axes.get(name);
+ }
+
+ public FractalNode createAttributeNode(Component c, String
attributeName) {
+ return factory.createAttributeNode(c, attributeName);
+ }
+
+ public FractalNode createComponentNode(Component c) {
+ return factory.createComponentNode(c);
+ }
+
+ public FractalNode createInterfaceNode(Interface itf) {
+ return factory.createInterfaceNode(itf);
+ }
+
+ public FractalNode createMethodNode(Interface itf, Method meth) {
+ return factory.createMethodNode(itf, meth);
+ }
+}
Index: fscript/src/org/objectweb/fractal/fscript/Environment.java
diff -u /dev/null
fscript/src/org/objectweb/fractal/fscript/Environment.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/Environment.java Tue Jul 18
19:54:12 2006
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.objectweb.fractal.adl.ADLException;
+import org.objectweb.fractal.adl.Factory;
+import org.objectweb.fractal.adl.FactoryFactory;
+import org.objectweb.fractal.fscript.axes.Axis;
+import org.objectweb.fractal.fscript.nodes.FractalNode;
+
+/**
+ * Represents the dynamic environment in which an FScript program is
executed.
+ *
+ * @author Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ *
+ */
+public class Environment {
+ private FScriptInterpreter fscript;
+ private Environment parent;
+ private Map<String, Object> variables;
+ private Object returnValue;
+
+ /**
+ * Creates a new top-level environment for the specified interpreter.
+ */
+ public Environment(FScriptInterpreter fscript) {
+ this.fscript = fscript;
+ this.parent = null;
+ this.variables = new HashMap<String, Object>();
+ }
+
+ /**
+ * Creates a new derived environment.
+ *
+ * @param parent the parent environment.
+ * @param locals local variables in the new environment (name => value).
+ */
+ public Environment(Environment parent, Map locals) {
+ this.fscript = parent.fscript;
+ this.parent = parent;
+ this.variables = new HashMap<String, Object>();
+ if (locals != null) {
+ for (Iterator iter = locals.keySet().iterator();
iter.hasNext();) {
+ String name = (String) iter.next();
+ this.setVariable(name, locals.get(name));
+ }
+ }
+ }
+
+
+ public Factory getFactory() {
+ try {
+ return FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND);
+ } catch (ADLException e) {
+ return null;
+ }
+ }
+
+ public Procedure getProcedure(String procName) {
+ return fscript.getProcedure(procName);
+ }
+
+ public Axis getAxis(String axisName) {
+ return fscript.getAxis(axisName);
+ }
+
+ public void setVariable(String variableName, Object object) {
+ variables.put(variableName, object);
+ }
+
+ public Object getVariable(String variableName) {
+ Object value = variables.get(variableName);
+ if (value == null && parent != null) {
+ value = parent.getVariable(variableName);
+ }
+ return value;
+ }
+
+ public void setCurrentNode(FractalNode node) {
+ setVariable("*current*", node);
+ }
+
+ public FractalNode getCurrentNode() {
+ return (FractalNode) getVariable("*current*");
+ }
+
+ public Object getReturnValue() {
+ return returnValue;
+ }
+
+ public void setReturnValue(Object returnValue) {
+ this.returnValue = returnValue;
+ }
+
+ public Map getContext() {
+ return fscript.getContext();
+ }
+}
Index: fscript/src/org/objectweb/fractal/fscript/FBean.java
diff -u /dev/null fscript/src/org/objectweb/fractal/fscript/FBean.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/FBean.java Tue Jul 18
19:54:12 2006
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.AttributeController;
+import org.objectweb.fractal.util.Fractal;
+
+/**
+ * This class provides utility methods to discover and manipulate Fractal
+ * components attributes in a generic way.
+ *
+ * @author Pierre-Charles David <pierrecharles.david@xxxxxxxxxxxxxxxxx>
+ */
+public class FBean {
+ private static String capitalize(String str) {
+ if (str.length() == 0) {
+ return str;
+ } else {
+ char chars[] = str.toCharArray();
+ chars[0] = Character.toUpperCase(chars[0]);
+ return new String(chars);
+ }
+ }
+
+ private static Method findGetter(Class[] itfs, String propName) {
+ for (int i = 0; i < itfs.length; i++) {
+ Method getter = findGetter(itfs[i], propName);
+ if (getter != null) {
+ return getter;
+ }
+ }
+ return null;
+ }
+
+ private static Method findGetter(Class klass, String propName) {
+ Method getter = null;
+ try {
+ getter = klass.getMethod("get" + capitalize(propName));
+ } catch (NoSuchMethodException e) {
+ try {
+ getter = klass.getMethod("is" + capitalize(propName));
+ } catch (NoSuchMethodException e1) {
+ }
+ }
+ if (getter == null || getter.getReturnType().equals(Void.TYPE)) {
+ return null;
+ } else {
+ return getter;
+ }
+ }
+
+ private static Method findSetter(Class[] itfs, String propName, Object
value) {
+ for (int i = 0; i < itfs.length; i++) {
+ Method setter = findSetter(itfs[i], propName, value);
+ if (setter != null) {
+ return setter;
+ }
+ }
+ return null;
+ }
+
+ private static Method findSetter(Class klass, String propName, Object
value) {
+ Method[] allMethods = klass.getMethods();
+ List<Method> candidates = new ArrayList<Method>();
+ for (int i = 0; i < allMethods.length; i++) {
+ if (isValidSetter(allMethods[i], propName, value)) {
+ candidates.add(allMethods[i]);
+ }
+ }
+ if (candidates.size() == 0) {
+ return null;
+ } else if (candidates.size() == 1) {
+ return candidates.get(0);
+ } else {
+ // FIXME: if this can happen according to the Java Bean spec,
find
+ // the best match
+ return candidates.get(0);
+ }
+ }
+
+ private static Class[] getAttributeControllerInterfaces(Component
component) {
+ try {
+ Object ac = Fractal.getAttributeController(component);
+ Class[] itfs = ac.getClass().getInterfaces();
+ List<Class> attrItfs = new ArrayList<Class>();
+ for (int i = 0; i < itfs.length; i++) {
+ if (AttributeController.class.isAssignableFrom(itfs[i])) {
+ attrItfs.add(itfs[i]);
+ }
+ }
+ return attrItfs.toArray(new Class[attrItfs.size()]);
+ } catch (NoSuchInterfaceException nsie) {
+ return new Class[0];
+ }
+ }
+
+ public static Map getAttributes(Component component) {
+ String[] names = getAttributesNames(component);
+ Map<String, Object> props = new HashMap<String, Object>();
+ for (int i = 0; i < names.length; i++) {
+ props.put(names[i], getAttribute(component, names[i]));
+ }
+ return props;
+ }
+
+ public static String[] getAttributesNames(Component component) {
+ // FIXME: also find properties with only setters
+ Class[] itfs = getAttributeControllerInterfaces(component);
+ Set<String> names = new HashSet<String>();
+ if (itfs != null) {
+ for (int i = 0; i < itfs.length; i++) {
+ Method[] allMethods = itfs[i].getMethods();
+ for (int j = 0; j < allMethods.length; j++) {
+ Method m = allMethods[j];
+ if (m.getName().matches("^(get|is)[A-Z].*")
+ && m.getParameterTypes().length == 0
+ && (!m.getReturnType().equals(Void.TYPE))) {
+ char[] chars =
m.getName().substring(3).toCharArray();
+ chars[0] = Character.toLowerCase(chars[0]);
+ names.add(new String(chars));
+ }
+ }
+
+ }
+ }
+ return names.toArray(new String[names.size()]);
+ }
+
+ public static Object getAttribute(Component component, String name) {
+ Class[] itfs = getAttributeControllerInterfaces(component);
+ if (itfs == null || itfs.length == 0) {
+ return null;
+ } else {
+ Method getter = findGetter(itfs, name);
+ if (getter != null) {
+ try {
+ return getter.invoke(Fractal
+ .getAttributeController(component));
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ return null;
+ }
+ }
+ }
+
+ public static Class getAttributeType(Component component, String name) {
+ Class[] itfs = getAttributeControllerInterfaces(component);
+ if (itfs == null || itfs.length > 0) {
+ return null;
+ } else {
+ Method getter = findGetter(itfs, name);
+ if (getter != null) {
+ return getter.getReturnType();
+ } else {
+ return null;
+ }
+ }
+ }
+
+ public static boolean hasAttribute(Component component, String name) {
+ Class[] itfs = getAttributeControllerInterfaces(component);
+ if (itfs == null || itfs.length == 0) {
+ return false;
+ } else {
+ return (findGetter(itfs, name) != null);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static boolean isValidSetter(Method m, String prop, Object
value) {
+ if (!m.getName().equals("set" + capitalize(prop))) {
+ return false;
+ }
+ Class[] pTypes = m.getParameterTypes();
+ if (pTypes.length != 1) {
+ return false;
+ } else if (value == null) {
+ return true;
+ } else if (value instanceof Number && isNumericType(pTypes[0])) {
+ return true;
+ } else {
+ return pTypes[0].isAssignableFrom(value.getClass());
+ }
+ }
+
+ private static boolean isNumericType(Class klass) {
+ if (klass.isPrimitive()) {
+ return (klass.equals(Byte.TYPE) || klass.equals(Short.TYPE)
+ || klass.equals(Integer.TYPE) || klass.equals(Long.TYPE)
+ || klass.equals(Float.TYPE) ||
klass.equals(Double.TYPE));
+ } else {
+ return Number.class.isAssignableFrom(klass);
+ }
+ }
+
+ public static void setAttribute(Component component, String name,
+ Object value) throws IllegalArgumentException,
+ NoSuchInterfaceException {
+ if (!hasAttribute(component, name)) {
+ throw new IllegalArgumentException("No such attribute.");
+ }
+ Class[] itfs = getAttributeControllerInterfaces(component);
+ if (itfs != null) {
+ Method setter = findSetter(itfs, name, value);
+ // TODO check that a setter was found
+ Class expected = setter.getParameterTypes()[0];
+ if (setter != null) {
+ try {
+ value = coerceValue(value, expected);
+ setter.invoke(Fractal.getAttributeController(component),
+ new Object[] { value });
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Object coerceValue(Object value, Class expected) {
+ if (value == null)
+ return value;
+ Class given = value.getClass();
+ if (expected.isAssignableFrom(given)) {
+ return value;
+ } else if (isNumericType(given) && isNumericType(expected)) {
+ Number n = (Number) value;
+ if (expected.equals(Byte.TYPE) || expected.equals(Byte.class)) {
+ return new Byte(n.byteValue());
+ } else if (expected.equals(Short.TYPE) ||
expected.equals(Short.class)) {
+ return new Short(n.shortValue());
+ } else if (expected.equals(Integer.TYPE) ||
expected.equals(Integer.class)) {
+ return new Integer(n.intValue());
+ } else if (expected.equals(Long.TYPE) ||
expected.equals(Long.class)) {
+ return new Long(n.longValue());
+ } else if (expected.equals(Float.TYPE) ||
expected.equals(Float.class)) {
+ return new Float(n.floatValue());
+ } else if (expected.equals(Double.TYPE) ||
expected.equals(Double.class)) {
+ return new Double(n.doubleValue());
+ } else {
+ throw new RuntimeException("Should not happen.");
+ }
+ } else {
+ return null;
+ }
+ // TODO: handle string conversion with toString()
+ }
+}
\ No newline at end of file
Index: fscript/src/org/objectweb/fractal/fscript/FSciptClassLoader.java
diff -u /dev/null
fscript/src/org/objectweb/fractal/fscript/FSciptClassLoader.java:1.1
--- /dev/null Tue Jul 18 19:54:14 2006
+++ fscript/src/org/objectweb/fractal/fscript/FSciptClassLoader.java Tue
Jul 18 19:54:12 2006
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2004-2005 Université de Nantes (LINA)
+ * Copyright (c) 2005-2006 France Télécom
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Contact: Pierre-Charles David <PierreCharles.David@xxxxxxxxxxxxxxxxx>
+ */
+package org.objectweb.fractal.fscript;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class FSciptClassLoader extends URLClassLoader {
+
+ public final static String FILE_PROTOCOL = "file";
+
+ public FSciptClassLoader(URL[] urls, ClassLoader parent) {
+ super(urls, parent);
+ }
+
+ public FSciptClassLoader(URL[] urls) {
+ super(urls);
+ }
+
+ protected void addURL(URL url) {
+ super.addURL(url);
+ }
+
+public void loadJar(String path, String protocol, String host) throws
IOException {
+ try {
+ URL url;
+ if (protocol.equals(FILE_PROTOCOL)) {
+ File jarFile = new File(path);
+