org.jmodelica.modelica.compiler.FSubscript Class Reference

Base class for array subscripts. More...

Inheritance diagram for org.jmodelica.modelica.compiler.FSubscript:

org.jmodelica.modelica.compiler.BaseNode org.jmodelica.modelica.compiler.FColonSubscript org.jmodelica.modelica.compiler.FExpSubscript

List of all members.

Public Member Functions

void flushCache ()
 low-level
void flushCollectionCache ()
 internal
FSubscript clone () throws CloneNotSupportedException
 internal
FSubscript expandedSubscript ()
 Create a copy of this FSubscript, expanding it to a vector if it is a colon.
abstract void addDeclarationSize (MutableSize s)
 Add the size of the dimension denoted by this subscript when used in a declaration to the given Size.
FSubscript createSpecified (Index i, int[] dim)
 Creates a new FSubscript that specifies this array subscript to a single index.
FSubscript resolveSubscripts ()
 Create a copy with all array subscripts replaced by literals.
abstract FSubscript flatten (FQName prefix)
 method FlatExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:1007
FSubscript flattenAndResolveIndices (FQName prefix)
 Specialized flattening method for resolving loop indices during flattening.
FSubscript scalarize (Map< String, FExp > indexMap)
 method Scalarization /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Scalarization.jrag:1474
void prefixInternalUses (FQName prefix, FRecordDecl decl)
 method TransformCanonical /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/TransformCanonical.jrag:2600
void prettyPrint_XML (Printer p, PrintStream str, String indent)
 method XMLCodeGen /tmp/JModelica/Compiler/ModelicaXMLBackEnd/src/jastadd/XMLCodeGen.jrag:483
void prettyPrint_CAD (Printer p, PrintStream str, String indent)
 method CADCodeGen /tmp/JModelica/Compiler/ModelicaCBackEnd/src/jastadd/CADCodeGen.jrag:164
 FSubscript ()
 method FlatModelica.ast:1
boolean mayHaveRewrite ()
 internal method FlatModelica.ast:16
abstract int ndims ()
 Get array dimensions.
abstract Size size ()
 Get the array sizes.
abstract int[] myIndices ()
 Get the set of all indices this array subscript spans.
abstract FType type ()
 syn FlatTypeAnalysis /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatTypeAnalysis.jrag:481
abstract FSubscript specify (int index)
 syn Flattening /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:678
Indices indices ()
 Get the set of all array indices of an array access.
CValue ceval ()
 syn ConstantEvaluation /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:1349
int[] arrayIndices ()
 Returns the set of array indices spanned by a component declared with this subscript.
int numIndices ()
 Get the number of array indices spanned by a component declared with this subscript.
boolean isCircular ()
 syn CircularExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:2508
boolean isConstant ()
 syn FlatVariability /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatVariability.jrag:242
FTypePrefixVariability variability ()
 syn FlatVariability /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatVariability.jrag:317
boolean isUnknownIndex ()
 syn FlatExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:1098
boolean inAlgorithmOrFunction ()
 Check is this node is in an algorithm or a function.
int myDim ()
 The dimension this subscript is used for.
Size mySize ()
 inh Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:557
boolean inFunction ()
 inh FlatFunctionUtils /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Util.jrag:1498
boolean inAlgorithm ()
 Check is this node is in a non-function algorithm.
ASTNode rewriteTo ()
 internal

Protected Member Functions

int numChildren ()
 low-level method FlatModelica.ast:10

Protected Attributes

boolean indices_computed = false
 internal
Indices indices_value
 internal


Detailed Description

Base class for array subscripts.

node FlatModelica.ast:382


Constructor & Destructor Documentation

org.jmodelica.modelica.compiler.FSubscript.FSubscript (  ) 

method FlatModelica.ast:1


Member Function Documentation

abstract void org.jmodelica.modelica.compiler.FSubscript.addDeclarationSize ( MutableSize  s  )  [pure virtual]

Add the size of the dimension denoted by this subscript when used in a declaration to the given Size.

method Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:504

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

int [] org.jmodelica.modelica.compiler.FSubscript.arrayIndices (  ) 

Returns the set of array indices spanned by a component declared with this subscript.

syn ArrayConstantEvaluation /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:2425

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

CValue org.jmodelica.modelica.compiler.FSubscript.ceval (  ) 

syn ConstantEvaluation /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:1349

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

FSubscript org.jmodelica.modelica.compiler.FSubscript.clone (  )  throws CloneNotSupportedException

FSubscript org.jmodelica.modelica.compiler.FSubscript.createSpecified ( Index  i,
int[]  dim 
)

Creates a new FSubscript that specifies this array subscript to a single index.

  • For scalar subscripts, a copy is returned.
  • For colon subscripts, the given index is used as the new subscript.
  • For other vector subscripts, the given index is used as the index of a cell in the vector, and that cell is used as the new subscript. In this case, dim will be incremented.

Parameters:
i the Index specifying what array subscripts to use
dim the dimension in i to use, wrapped in an array so that it can be changed by the method method Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:1507

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

FSubscript org.jmodelica.modelica.compiler.FSubscript.expandedSubscript (  ) 

Create a copy of this FSubscript, expanding it to a vector if it is a colon.

method Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:388

Reimplemented in org.jmodelica.modelica.compiler.FColonSubscript.

abstract FSubscript org.jmodelica.modelica.compiler.FSubscript.flatten ( FQName  prefix  )  [pure virtual]

method FlatExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:1007

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

FSubscript org.jmodelica.modelica.compiler.FSubscript.flattenAndResolveIndices ( FQName  prefix  ) 

Specialized flattening method for resolving loop indices during flattening.

Intended for use when building connection sets. Do not use for accesses in functions or size expressions.

Parameters:
prefix prefix to add to name
indexMap map from names of index variables to expressions to replace them with method FlatExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:1174

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

void org.jmodelica.modelica.compiler.FSubscript.flushCache (  ) 

void org.jmodelica.modelica.compiler.FSubscript.flushCollectionCache (  ) 

boolean org.jmodelica.modelica.compiler.FSubscript.inAlgorithm (  ) 

Check is this node is in a non-function algorithm.

inh FlatFunctionUtils /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Util.jrag:1507

boolean org.jmodelica.modelica.compiler.FSubscript.inAlgorithmOrFunction (  ) 

Check is this node is in an algorithm or a function.

syn FlatFunctionUtils /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Util.jrag:1516

Indices org.jmodelica.modelica.compiler.FSubscript.indices (  ) 

Get the set of all array indices of an array access.

Returns:
An Indices object containing all indices in each array dimension. syn Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:1629

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

boolean org.jmodelica.modelica.compiler.FSubscript.inFunction (  ) 

inh FlatFunctionUtils /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Util.jrag:1498

boolean org.jmodelica.modelica.compiler.FSubscript.isCircular (  ) 

syn CircularExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:2508

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

boolean org.jmodelica.modelica.compiler.FSubscript.isConstant (  ) 

syn FlatVariability /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatVariability.jrag:242

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

boolean org.jmodelica.modelica.compiler.FSubscript.isUnknownIndex (  ) 

syn FlatExpressions /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:1098

Reimplemented in org.jmodelica.modelica.compiler.FColonSubscript.

boolean org.jmodelica.modelica.compiler.FSubscript.mayHaveRewrite (  ) 

int org.jmodelica.modelica.compiler.FSubscript.myDim (  ) 

The dimension this subscript is used for.

inh Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:526

abstract int [] org.jmodelica.modelica.compiler.FSubscript.myIndices (  )  [pure virtual]

Get the set of all indices this array subscript spans.

Returns:
an int array containing the indices spanned syn Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:1716

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

Size org.jmodelica.modelica.compiler.FSubscript.mySize (  ) 

inh Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:557

abstract int org.jmodelica.modelica.compiler.FSubscript.ndims (  )  [pure virtual]

Get array dimensions.

A value > 0 indicates an array, 0 indicates a scalar and -1 indicates an error in computation of the array dimensions.

Returns:
Array dimension. syn Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:169

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

int org.jmodelica.modelica.compiler.FSubscript.numChildren (  )  [protected]

int org.jmodelica.modelica.compiler.FSubscript.numIndices (  ) 

Get the number of array indices spanned by a component declared with this subscript.

syn ArrayConstantEvaluation /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:2440

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

void org.jmodelica.modelica.compiler.FSubscript.prefixInternalUses ( FQName  prefix,
FRecordDecl  decl 
)

method TransformCanonical /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/TransformCanonical.jrag:2600

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

void org.jmodelica.modelica.compiler.FSubscript.prettyPrint_CAD ( Printer  p,
PrintStream  str,
String  indent 
)

method CADCodeGen /tmp/JModelica/Compiler/ModelicaCBackEnd/src/jastadd/CADCodeGen.jrag:164

void org.jmodelica.modelica.compiler.FSubscript.prettyPrint_XML ( Printer  p,
PrintStream  str,
String  indent 
)

method XMLCodeGen /tmp/JModelica/Compiler/ModelicaXMLBackEnd/src/jastadd/XMLCodeGen.jrag:483

Reimplemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

FSubscript org.jmodelica.modelica.compiler.FSubscript.resolveSubscripts (  ) 

Create a copy with all array subscripts replaced by literals.

method ConstantEvaluation /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/ConstantEvaluation.jrag:1253

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

ASTNode org.jmodelica.modelica.compiler.FSubscript.rewriteTo (  ) 

FSubscript org.jmodelica.modelica.compiler.FSubscript.scalarize ( Map< String, FExp indexMap  ) 

method Scalarization /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Scalarization.jrag:1474

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.

abstract Size org.jmodelica.modelica.compiler.FSubscript.size (  )  [pure virtual]

Get the array sizes.

syn Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:547

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

abstract FSubscript org.jmodelica.modelica.compiler.FSubscript.specify ( int  index  )  [pure virtual]

syn Flattening /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Flattening.jrag:678

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

abstract FType org.jmodelica.modelica.compiler.FSubscript.type (  )  [pure virtual]

syn FlatTypeAnalysis /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatTypeAnalysis.jrag:481

Implemented in org.jmodelica.modelica.compiler.FColonSubscript, and org.jmodelica.modelica.compiler.FExpSubscript.

FTypePrefixVariability org.jmodelica.modelica.compiler.FSubscript.variability (  ) 

syn FlatVariability /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/FlatVariability.jrag:317

Reimplemented in org.jmodelica.modelica.compiler.FExpSubscript.


Member Data Documentation

internal

internal


The documentation for this class was generated from the following file:

Generated on Fri Oct 7 14:50:21 2011 for JModelica.org by  doxygen 1.5.8