User Tools

Site Tools


tutorial_subsystem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial_subsystem [2014/07/14 11:51]
guillaume [Extension domain]
tutorial_subsystem [2017/04/19 13:31] (current)
Line 7: Line 7:
  
 Let us assume that we want to compute the mean of the values of a vector. It is feasible through the following Alpha system: Let us assume that we want to compute the mean of the values of a vector. It is feasible through the following Alpha system:
-<sxh alphabets; gutter:false>+<sxh alphabets; gutter:true>
 affine mean {N | N>0} affine mean {N | N>0}
 input input
Line 22: Line 22:
  
 However, let us assume that you already have another Alpha system which computes the sum of the elements of a vector. It is possible to use this affine system (instead of rewriting its equation in the main system), by calling it through a **use equation**: However, let us assume that you already have another Alpha system which computes the sum of the elements of a vector. It is possible to use this affine system (instead of rewriting its equation in the main system), by calling it through a **use equation**:
-<sxh alphabets; gutter:false>+<sxh alphabets; gutter:true>
 affine sum {P| P>0} // Computes the sum of the elements of a vector of size P affine sum {P| P>0} // Computes the sum of the elements of a vector of size P
 input input
Line 49: Line 49:
  
 In general, the syntax of a use equation is the following: In general, the syntax of a use equation is the following:
-<sxh alphabets; gutter:false>+<sxh alphabets; gutter:true>
 use subsystem_name[list of parameters] (list of input expressions) returns (list of output variables); use subsystem_name[list of parameters] (list of input expressions) returns (list of output variables);
 </sxh> </sxh>
Line 61: Line 61:
  
 Let us assume that you have a system which computes a dot product of two vectors: Let us assume that you have a system which computes a dot product of two vectors:
-<sxh alphabets; gutter:false>+<sxh alphabets; gutter:true>
 affine dotProduct {N | N>0} affine dotProduct {N | N>0}
 input input
Line 76: Line 76:
  
 It is possible to do it by using an extension domain: It is possible to do it by using an extension domain:
-<sxh alphabets; gutter:false>+<sxh alphabets; gutter:true>
 affine dotProduct {N | N>0} affine dotProduct {N | N>0}
 input input
Line 110: Line 110:
  
 **InlineSubSystem:** Inline the equations of a subsystem inside the affine system calling it. The use equation of the main system is replaced by the equations of the subsystem (which are adapted), and new local variables are added. **InlineSubSystem:** Inline the equations of a subsystem inside the affine system calling it. The use equation of the main system is replaced by the equations of the subsystem (which are adapted), and new local variables are added.
 +
 +The command is: ''void InlineSubSystem(Program program, String systemName, String label)'' where ''label'' is the label of the inlined use equation.
 +
  
 **OutlineSubSystem:** Given a list of equations of an affine systemm, outline them inside a new system and replace these equation by a use equation. The current version (July 2014) do not allow to specify an extension domain, however this is a work in progress. **OutlineSubSystem:** Given a list of equations of an affine systemm, outline them inside a new system and replace these equation by a use equation. The current version (July 2014) do not allow to specify an extension domain, however this is a work in progress.
 +
 +The command is ''void OutlineSubSystem(Program program, String system, String listEquations)'' where ''listEquations'' is the list of label of the equations to be outlined.
tutorial_subsystem.txt ยท Last modified: 2017/04/19 13:31 (external edit)