Abstract:
Exemplary embodiments provide computer-implemented methods, computer-readable media, and systems for changing the identifier associated with an entity, such as a variable or function, in a portion of code. During editing, a reference may be maintained that identifies the location of each instance of the entity in the code. When the identifier associated with one instance of the entity is changed, the change in the identifier may be propagated throughout the code to change each instance of the identifier in the code. The identifier may be changed without interrupting the workflow of the user and without the need to change to a separate refactoring mode. In some embodiments, a syntactical analysis may be performed and some or all instances of the identifier may be changed based on one or more rules.
Abstract:
A device receives a state chart generated via a technical computing environment. The state chart includes a function block that includes a function that includes function input(s)/output(s). The state chart includes a state block that includes a function call to the function of the function block. The function call includes call input(s)/output(s). The device initiates execution of the state chart, parses the function into the function input(s)/output(s), and parses the function call into the call input(s)/output(s). The device processes, during the execution of the state chart, the function input(s)/output(s) with a graphical engine of the technical computing environment to generate function-related code. The device processes, during the execution of the state chart, the call input(s)/output(s) with a textual engine of the technical computing environment to generate function call-related code, and provides the function-related code and the function call-related code in generated code.
Abstract:
A method of receiving a state chart that includes two or more state blocks, and an implicit event command in a graphical portion of the state chart. One of the state blocks includes textual code understood by a textual engine of a technical computing environment (TCE). The implicit event command is not understood by a graphical engine of the TCE. The method further transforms the implicit event command into a form that is understood by the graphical engine, and initiates execution of the state chart. During execution of the state chart, the transformed implicit event command is parsed by a computing device to identify an event associated with a first state block, and a command. When the event occurs during execution of the state chart, the command initiates execution of another state block, the second state block being initiated without an explicit event command being provided therein.
Abstract:
A method may include causing a first model to be executed. The causing the first model to be executed may be performed by a device. The method may further include causing a second model to be executed to simulate a functionality of the first model. The causing the second model to be executed may be performed by the device. The method may further include interacting with a model element, of the second model, associated with implicitly accessing information regarding a state of the first model. The state may be a representation of the first model at a particular simulation time-step. The interacting with the model may be performed by the device. The method may further include accessing, by the model element, information associated with the state of the first model. The accessing the information may be performed by the device.
Abstract:
A system and method provides top-down programming in a graphical programming environment. A developer may utilize a component constructor to create a graphical skeleton component that represents a template for a procedure. The graphical skeleton component may include one or more hole elements that mark locations in the component at which functions may be specified. An instance of the component may be included in a graphical model, and one or more functions specified for the hole elements, thereby completing the component. The one or more functions may refer to model parameters, and bindings may be captured among the parameters. Upon execution or simulation of the model, the one or more functions specified for the component are executed, and the parameters evaluated. The functionality of the completed may depend on the one or more functions specified for the hole elements.
Abstract:
A device may receive function information that describes a caller element that calls a called element that is separate from the caller element. The function information may identify a name or reference of the called element, a passed input, and a passed output. The passed input may be provided by the caller element to the called element, and the passed output may be received by the caller element from the called element. The caller element may be associated with a caller model, and the called element may be associated with a called model. The device may identify the called element, and may execute the caller element in a simulation environment. Execution of the caller element may cause execution of the called element without causing execution of an entirety of the called model. The device may receive the passed output from the called element based on executing the called element.
Abstract:
A computer-readable memory device may include instructions to store data describing a state machine model including source states and destination states. The device may also include instructions to store, for each of the source states, a condition field identifying a condition upon which, when satisfied, the state machine model transitions from the source state to one of the destination states. The device may also include instructions to store, for each of source states, a destination field identifying the one of the destination states. Each of at least two of the source states may identify an identical destination state in the corresponding destination field. Each of at least two of the source states may identify an identical condition in the corresponding condition field.
Abstract:
A device may generate code for a caller element of a first graphical model and a called element of a second graphical model by generating a first function and a second function. The first function may represent an interface between the caller element and the called element. The first function may include a first input argument corresponding to an input variable and a first output argument corresponding to an output variable. The second function may represent an underlying function of the called element. The underlying function may include the input variable passed from the caller element and the output variable. The underlying function may further include an internal input variable and an internal output variable. The second function may include second input arguments corresponding to the input variable and the internal input variable, and may include second output arguments corresponding to the output variable and the internal output variables.
Abstract:
A device may receive information that identifies a model of a finite state machine. The model may include information that identifies a group of leaf states. The group of leaf states may include states of the model with no child states. The device may determine, based on the information that identifies the model, a set of variables required to store information that identifies an active state of the model. The device may determine a numbering scheme for encoding the group of leaf states. The numbering scheme may be based on the set of variables. The device may encode the group of leaf states based on the numbering scheme. Encoding the group of leaf states may include generating and storing information indicating an association between a leaf state and a value.
Abstract:
A system, computer-readable medium, and method includes providing a control flow graph including at least one condition. An update control flow graph is automatically generated based on the provided control flow graph, where execution of the update control flow graph includes an evaluation of the condition. The update control flow graph and a value corresponding to the evaluated condition is stored. An output control flow graph based on the provided control flow graph is automatically generated, where execution of the output control flow graph is based on the stored value corresponding to the evaluated condition. A mode transition control flow graph configured to identify mode transitions for the control flow graph at one or more time intervals is automatically generated and the update control flow graph is re-executed based on the generated mode transition control flow graph.