Package ptolemy.domains.fsm.kernel

Examples of ptolemy.domains.fsm.kernel.FSMActor.entityList()


        try {
            FSMActor controller = ((ModalModel) getContainer()).getController();

            if (_conservativeAnalysis) {
                // Conservative approximation
                Iterator states = controller.entityList(State.class).iterator();
                while (states.hasNext()) {
                    State state = (State) states.next();
                    Actor[] actors = state.getRefinement();
                    // If the modal model has no refinements, the modal model is
                    // basically an FSM actor. We use the function dependency of
View Full Code Here


            Local thisLocal = body.getThisLocal();

            // Set the initial state.
            String initialStateName = ((StringAttribute) entity
                    .getAttribute("initialStateName")).getExpression();
            int initialStateIndex = entity.entityList().indexOf(
                    entity.getEntity(initialStateName));
            units.add(Jimple.v().newAssignStmt(
                    Jimple.v().newInstanceFieldRef(thisLocal,
                            currentStateField.makeRef()),
                    IntConstant.v(initialStateIndex)));
View Full Code Here

                }
            }

            Map stateToStartStmt = new HashMap();
            List stateStmtList = new LinkedList();
            int numberOfStates = entity.entityList().size();

            // Figure out what state we are in.
            for (Iterator states = entity.entityList().iterator(); states
                    .hasNext();) {
                State state = (State) states.next();
View Full Code Here

            Map stateToStartStmt = new HashMap();
            List stateStmtList = new LinkedList();
            int numberOfStates = entity.entityList().size();

            // Figure out what state we are in.
            for (Iterator states = entity.entityList().iterator(); states
                    .hasNext();) {
                State state = (State) states.next();
                Stmt startStmt = Jimple.v().newNopStmt();

                stateToStartStmt.put(state, startStmt);
View Full Code Here

            // Get the current state.
            units.add(Jimple.v().newTableSwitchStmt(currentStateLocal, 0,
                    numberOfStates - 1, stateStmtList, errorStmt));

            // Generate code for each state.
            for (Iterator states = entity.entityList().iterator(); states
                    .hasNext();) {
                State state = (State) states.next();
                System.out.println("state " + state.getName());

                Stmt startStmt = (Stmt) stateToStartStmt.get(state);
View Full Code Here

                    units.add(Jimple.v().newAssignStmt(
                            nextTransitionLocal,
                            IntConstant.v(entity.relationList().indexOf(
                                    transition))));

                    int nextStateIndex = entity.entityList().indexOf(
                            transition.destinationState());
                    units.add(Jimple.v().newAssignStmt(nextStateLocal,
                            IntConstant.v(nextStateIndex)));

                    // Generate code for the outputExpression of the guard.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.