[comp.lsi] Chapter 07 - 1076 DoD translated VHDL test suite

grout@sunspot.stars.flab.Fujitsu.JUNET (Steve Grout) (07/13/88)

This is Chapter 07 of a 1076-1987 VHDL test suite which was
translated from an 7.2 VHDL version test suite developed by
Intermetrics under funding by the DoD.  These tests have been
verified todate mainly against a VHDL 'recognizer' so they may
yet have problems with VHDL semantics.  They consist of two
classes of tests,

  ERROR Tests: - names which start with 'e' should result in VHDL errors
   at the spot where there is a comment about error being expected.

  SIMPLE Tests: - names which start with 's' should analyze or compile cleanly.

These tests are being shared back to industry in hopes of getting together
a joint set of tests, checked out and verified, which we can all use to 
make sure our various VHDL CAD tools work correctly.

Your comments and especially constructive criticism is urgently requested
via any way we can get it.  All replies and resulting changes/updates will
be posted back to the same places these tests were originally posted.

Thanks for your support!

--Steve Grout, MCC CAD Program. (512)338-3516, grout@mcc.com


---- Cut Here and unpack ----
#!/bin/sh
#
# This is a 'shar' archive.  Cut out everything above the line
# and unpack them with /bin/sh, i.e., using a command like:
#     % sh < {the contents of this message after cutting}
#
#
echo "--------------------------------------------------"
echo "Starting to extract Chapter 07 of a 1076-1987 VHDL"
echo "    translated DoD/Intermetrics test suite...."
echo "--------------------------------------------------"
echo x - TEST-SYNOPSIS.text
sed 's/^X//' >TEST-SYNOPSIS.text <<'*-*-END-of-TEST-SYNOPSIS.text-*-*'
X------------------------------------------------------------------------
XChapter: 07-Expressions
X------------------------------------------------------------------------
X
X
X------------------------------------------------------------------------
X  Paragraph:  Expressions - 7.1
X------------------------------------------------------------------------
XTest:       e-07-1-0-0001a.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for types and entities.
X-- types can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- 5) function declarative part
X-- 6) function statement part
X-- 7) package
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 5) attribute specification in a function declaration
X-- 6) return statement in a function
X-- 7) default value in formal parameter list of function declaration in package
XTest:       e-07-1-0-0001b.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for entities only.
X-- entities can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
XTest:       e-07-1-0-0001c.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for bodies only.
X-- bodies can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of architecture body statement)
X-- 3) body declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
XTest:       e-07-1-0-0001d.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for component labels only.
X-- component labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
XTest:       e-07-1-0-0001e.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for generate labels only.
X-- generate labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
XTest:       e-07-1-0-0001f.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for loop labels only.
X-- loop labels can be visible in the following scopes:
X-- 1) loop statement (as particular example of beh. body statement)
X-- specific contexts:
X-- 1) exit statement in loop statement
XTest:       s-07-1-0-0001a.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of simple name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architectural body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001b.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of selected name
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001c.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of indexed name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001d.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of slice name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in archit. body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can a slice name be used in these contexts?
XTest:       s-07-1-0-0001e.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of qualified expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001f.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of attribute name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001g.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of literal.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in behavioral body;
X-- 3) return statement in function in package;oop in arch. body;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001h.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of aggregate.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can an aggregate be used as a primary in these contexts?
XTest:       s-07-1-0-0001i.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of function call.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001j.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of parenthesized expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X
X------------------------------------------------------------------------
X  Paragraph:  Operators - 7.2 
X------------------------------------------------------------------------
XTest:       e-07-2-0-0001a.vhdl
X-- Check that operators have the correct precedence. This is an indirect check
X-- using semantic error processing. The idea is that 'integer + real * real'
X-- should produce an error message stating that the operands of '+' are
X-- incompatible, while 'integer + real * real' should produce an error message
X-- stating that the operands of '*' are incompatible. Check for logical vs.
X-- relational, relational vs. adding, adding vs. multiplying, multiplying vs.
X-- miscellaneous. 
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence. 
X-- cases:
X-- 1) logical and relational operators with boolean literals;
X-- 2) relational and adding operators with boolean and integer literals;
X-- 3) adding and multiplying operators with integer and real literals;
X-- 4) multiplying and miscellaneous operators with integer and real literals.
XTest:       e-07-2-0-0002a.vhdl
X-- Check that operators of the same precedence associate left to right. This is
X-- an indirect check using semantic error processing. The idea is that 'integer
X-- + integer - real' should produce an error message stating that the operands
X-- of '-' are incompatible, while 'integer + real - integer' should produce an
X-- error message stating that the operands of '+' are incompatible (and 
X-- possibly another message about incompatible operands of '-'). Check for 
X-- logical, relational, adding, multiplying. Check when operands are 
X-- function calls.
X-- Questions:  
X-- 1) I don't know how to check when operands are function calls.
X-- 2) It seems that a series of relational expressions is not legal.
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence.  NOTE:  this does NOT allow the check for
X-- function calls.
X-- cases:
X-- 1) logical operators with boolean literals;
X-- 2) relational operators with boolean literals;
X-- 3) adding operators with integer literals;
X-- 4) multiplying with integer literals.
X
X------------------------------------------------------------------------
X  Paragraph:  Logical Operators - 7.2.1
X------------------------------------------------------------------------
XTest:       e-07-2-1-0001a.vhdl
X-- Check that the logical operators (and, or, xor, nor, nand, not) 
X-- are not defined for scalar types other than BOOLEAN or BIT.
X-- cases:  literals and objects of all predefined scalar types
X--	and an enumeration type..
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0002a.vhdl
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for record types. Check for record types with single BOOLEAN or
X-- BIT element.
X-- cases:  aggregate and objects of:
X-- 1) simple record with single boolean element;
X-- 2) simple record with single bit element.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0003a.vhdl
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for multi-dimensional arrays of BOOLEAN or BIT. Check for (1x1)
X-- arrays.
X-- cases:
X-- 1) 1x1 array of bit;
X-- 2) 1x1 array of boolean.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0004a.vhdl
X-- Check that the binary logical operators (and, or, xor)
X-- are not defined for arrays of different lengths. Check where one or both 
X-- operands are aggregates or concatenated sequences. 
X-- cases:  objects, aggregates, and concatenated sequences.
X-- contexts:  variable assignment.
XTest:       s-07-2-1-0001a.vhdl
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for any BOOLEAN or BIT type.
X-- cases:  objects, literals, and function calls of types boolean and bit.
X-- contexts:
X-- 1) condition in generation scheme of an if- generation statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
XTest:       s-07-2-1-0002a.vhdl
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for one-dimensional arrays of any BOOLEAN or BIT type (if the arrays
X-- are of the same length), and that the result is an array of the same type.
X-- Check where one or both operands are aggregates or concatenated sequences.
X-- cases:
X-- 1) aggregate and concatenated sequence of BIT
X-- 2) concatenated sequence and array function result of BOOLEAN
X-- 3) two objects of the same length but different index ranges.
X-- contexts:
X-- 1) condition in iteration scheme of an loop_statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
XTest:       s-07-2-1-0003a.vhdl
X-- Check that static expressions formed with the logical operators have the
X-- correct static value.
X-- cases:
X-- 1) bit literal expression
X-- 2) boolean literal expression
X-- contexts:
X-- 1) choice in case statement in a generate loop
X
X------------------------------------------------------------------------
X  Paragraph:  Relational Operators - 7.2.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-0001a.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of record types only.  Others in ...B & ...C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) record with single discrete element;
X-- 2) homogeneous record.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
XTest:       e-07-2-2-0001b.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of multi-dimensional array types only.  Others in  to .A &  to .
X-- cases:  objects, aggregates, and function calls of
X-- multi-dimensional array of discrete type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) if statement (objects);
X-- 3) variable declaration (aggregates);
X-- 4) signal assignment (function calls);
XTest:       e-07-2-2-0001c.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of one dimensional arrays only.  Others in  to .A &  to .C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) array of arrays;
X-- 2) array of records;
X-- 3) array of floating point.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
XTest:       s-07-2-2-0001a.vhdl
X-- Check that the relational operators = and /= are defined for all types. 
X-- Check for objects, function calls, literals, aggregates and concatenated
X-- sequences.
X-- cases:  (19)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
X-- record -- objects, function calls, aggregates
XTest:       s-07-2-2-0002a.vhdl
X-- Check that the relational operators <, <=, >, >= are defined for all scalar
X-- types and for all one-dimensional arrays whose elements are of a discrete
X-- type. Check for objects, function calls, literals, aggregates and
X-- concatenated sequences.
X-- cases:  (16)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
XTest:       s-07-2-2-0003a.vhdl
X-- Check that an expression formed with a relational operator is of type
X-- BOOLEAN.
XTest:       s-07-2-2-0004a.vhdl
X-- Check that a static expression formed with a relation operator has the
X-- correct static value.
X-- cases:
X-- All relational operators ( =, /=, <, <=, >, >=) with literals/aggregates 
X-- of all types used in S6212001A ( enumeration type, integer, physical, 
X-- floating point, array, and record type )
X-- contexts in which subtype checking is performed at analysis time:
X-- 1) range constraint in a subtype declaration -- this cannot be used here
X--	since the user cannot define a new boolean type 
X--	(e.g. to be always TRUE).
X-- 2) choices in a case statement
X
X------------------------------------------------------------------------
X  Paragraph:  Adding Operators - 7.2.3
X------------------------------------------------------------------------
XTest:       e-07-2-3-0001a.vhdl
X-- Check that the binary arithmetic operators + and - are not defined for any
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0002a.vhdl
X-- Check that the two operands of the binary arithmetic operators + and - must
X-- be of the same base type. Check for objects, literals, function calls.
X-- cases:
X-- 1) re-defined integer types;
X-- 2) re-defined real types;
X-- 3) re-defined time types.
X-- contexts:
X-- 1) function return statements (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0003a.vhdl
X-- Check that if one operand of the concatenation operator & is an array,
X-- then the other operand must be an array of the same type or an object or
X-- value of the type of the array element. Check that in this case, the result
X-- is the same type as the array operand. Check for objects, literals,
X-- aggregates, function calls.
X-- cases:
X-- 1) array of boolean & array of boolean of different array type;
X-- 2) array of boolean & bit literal;
X-- 3) array of boolean & bit object;
X-- 4) array of integer & object of different integer type;
X-- 5) array of record & aggregate of similiar record type;
X-- 6) array of integer & function call of different integer type.
X-- contexts:  actual parameter association in variable declaration.
XTest:       e-07-2-3-0004a.vhdl
X-- Check that if neither operand of the concatenation operator & is an array,
X-- then they must be objects or values of the same type. Check that in this
X-- case, the result is an array whose element type is the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:
X-- 1) bit & boolean where result should be array of boolean;
X-- 2) integer & re-defined integer where result should be array of integer;
X-- 3) simple record & similiar record where result should be array of simple;
X-- 4) bit & bit where result should be array of boolean.
X-- contexts:  actual parameter association in variable declaration.
XTest:       e-07-2-3-0005a.vhdl
X-- Check that the unary arithmetic operators +, and - are not defined for
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0006a.vhdl
X-- Check that a signed operator cannot follow an adding operator or a
X-- multiplying operator or a miscellaneous operator (**, abs) or
X-- the logical operator not.
X-- cases:  expressions involving real and integer objects.
X-- contexts:  variable assignment.
XTest:       s-07-2-3-0001a.vhdl
X-- Check that the binary arithmetic operators + and - are defined for all
X-- numeric types and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a formal generic list;
X-- 2) assertion definition in an interface description;
X-- 3) default value in a parameter specification;
X-- 4) default value in a variable declaration;
X-- 5) range constraint in a integer type definition;
X-- 6) choice in an aggregate;
X-- 7) expression in an aggregate;
X-- 8) index constraint in a constrained array definition;
X-- 9) generate parameter specification in a for generate statement;
X-- 10) return statement in function.
XTest:       s-07-2-3-0002a.vhdl
X-- Check that the concatenation operator & is defined for two 
X-- one_dimensional array operands that have the same type, or for two 
X-- nonarray operands that have the same type, or for one one_dimensional array
X-- operand and one nonarray operand where the nonarray operand is of the same 
X-- type as the array element. Check for objects, literals, aggregates, 
X-- function calls. 
X-- cases:  Three operand cases; for array objects, aggregates, and function
X--	results; for element objects, literals, and function results.
X-- contexts:
X-- 1) function return statement;
X-- 2) variable declaration;
X-- 3) signal assignment.
XTest:       s-07-2-3-0003a.vhdl
X-- Check that the unary arithmetic operators +, -, and abs are defined for any
X-- numeric type and that the type of the result is the same as the type of the
X-- single operand. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a port declaration;
X-- 2) assertion definition in a body;
X-- 3) default value in a signal declaration;
X-- 4) range constraint in a physical type definition;
X-- 5) range constraint in a floating point subtype declaration;
X-- 6) choice in a case statement;
X-- 7) expression in a case statement;
X-- 8) time expression in a signal assignment statement;
X-- 9) return statement in a function.
XTest:       s-07-2-3-0004a.vhdl
X-- Check that static expressions formed with + and - have the correct static
X-- value.
X-- cases:  integer, user-defined physical, real; literals only.
X-- contexts:
X-- 1) choices in case statements.
X
X------------------------------------------------------------------------
X  Paragraph:  Multiplying Operators - 7.2.4
X------------------------------------------------------------------------
XTest:       e-07-2-4-0001a.vhdl
X-- Check that the binary operators mod and rem are not defined for 
X-- operands of other than integer type.  Check for objects, literals and
X-- function calls.
X-- cases:
X-- try operands of type real, time, character, bit, records with 1 integer
X--	element, 1x1 arrays of integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0002a.vhdl
X-- Check that the operands of the binary arithmetic operators * and / cannot be
X-- non-numeric. Check for objects, literals, function calls.
X-- cases:  
X-- 1) enumeration type;
X-- 2) record with one numeric element;
X-- 3) array with one numeric element;
X-- 4) character and boolean literals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls)
XTest:       e-07-2-4-0003a.vhdl
X-- Check that if one operand of the binary arithmetic operators * and / is
X-- floating point the other cannot be an integer. Check for objects, literals,
X-- function calls.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0004a.vhdl
X-- Check that if one operand of * is a physical type, the other must be an
X-- integer or a floating point type. Check for objects, literals, function
X-- calls.
X-- cases:  try for enumeration, 1x1 array of real, 1 element
X--	record of integer, another physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0005a.vhdl
X-- Check that if the right operand of / is a physical type, the left operand
X-- must be the same type (cannot be an integer or a floating point type). Check
X-- cases:  enumeration, real, integer, a different physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals, function calls).
XTest:       s-07-2-4-0001a.vhdl
X-- Check that the binary arithmetic operators mod and rem are defined for any
X-- integer type and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- cases:  predefined and user-defined integer types.
X-- contexts:
X-- 1) range constraint in a physical type definition;
X-- 2) index constraint in a constrained array definition;
X-- 3) choice in a case statement;
X-- 4) generate parameter specification in a for generate statement;
X-- 5) waveform element in a signal assignment statement;
X-- 6) actual parameter association.
XTest:       s-07-2-4-0002a.vhdl
X-- Check that the operands of the binary arithmetic operators * and / may be
X-- both integer or both floating point, and that when the types of the operands
X-- are the same the type of the result is the same as the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:  objects, literals, function calls of re-defined integers and reals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0003a.vhdl
X-- Check that for the binary arithmetic operators * and /, the left
X-- operand may be any physical type and the right operand any integer
X-- type or any floating point type; check that in this case, the result
X-- is the same type as the left operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0004a.vhdl
X-- Check that for the binary arithmetic operator *, the right operand
X-- may be any physical type and the left operand any integer type or any 
X-- floating point type; check that in this case, the result
X-- is the same type as the right operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0005a.vhdl
X-- Check that for the binary arithmetic operator /, the left operand may be any
X-- physical type and the right operand may be the same type; check that in this
X-- case, the result is universal integer. Check for objects, literals, function
X-- calls.
X-- cases:  user-defined physical and time, integer.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls);
X-- 5) integer subtype declaration (literals and function calls).
XTest:       s-07-2-4-0006a.vhdl
X-- Check that static expressions formed with the operators mod, rem, *, / have
X-- the correct static value. Check for signs of results of (A rem B) and (A mod
X-- B).
X-- cases:	A	B	A/B	A*B	A rem B	A mod B
X--
X--		10	5	2	50	0	0
X--		-11	5	-2	-55	-1	4
X--		10	-5	-2	-50	0	0
X--		-11	-5	2	55	-1	-1
X-- contexts:  choice in case statement.
X
X------------------------------------------------------------------------
X  Paragraph:  Misc Operators - 7.2.5
X------------------------------------------------------------------------
XTest:       e-07-2-1-5001a.vhdl
X-- Check that the unary operator abs is not defined for non-numeric types.
X-- Check for single-element arrays of numerics.
XTest:       e-07-2-1-5002a.vhdl
X-- Check that the left operand of the binary arithmetic operator ** cannot be
X-- any type other than integer or floating point, and that the right operand
X-- cannot be any type other than integer. Check for objects, literals, function
X-- calls.
X-- cases:  Try on the left:  enumeration type, 1x1 array of real, 
X--	1 element record of integer, time, character, and bit.
X--	On the right:  real, time, 1 element record of integer, 1 element
X--	array of integer, and character.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-1-5003a.vhdl
X-- Check that if the right operand of ** is negative, the left operand must be
X-- a floating point type. Check for static expression.
X-- case:  user-defined integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       s-07-2-1-5001a.vhdl
X-- Check that the unary arithmetic operator abs is defined for any
X-- numeric type.  Check for objects, literals, function calls.
XTest:       s-07-2-1-5002a.vhdl
X-- Check that the left operand of the binary arithmetic operator ** may be any
X-- integer or any floating point type, that the right operand may be of integer
X-- type, and that the type of the result is the same as the type of the left
X-- operand. Check for objects, literals, function calls.
X-- cases:  left operand:  re-defined integer and real.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment (objects, literals, and function calls)
X-- 4) signal assignment.
XTest:       s-07-2-1-5003a.vhdl
X-- Check that static expressions formed with the operators abs and ** have the
X-- correct static value.
X-- cases:
X-- 	for "abs":  types integer, real, and physical
X--		with positive, negative, and zero values.
X--	for "**":  types integer and real with positive,
X--		negative, and zero values.  Except: left operand is integer
X--		and right operand is negative.
X
X------------------------------------------------------------------------
X  Paragraph:  Operands - 7.3
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Literal - 7.3.1
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Aggregates - 7.3.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-2001a.vhdl
X-- Check that positional associations must precede any named associations.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
XTest:       e-07-2-2-2002a.vhdl
X-- Check that no association may follow an "others" association.
X-- cases:  1x2 array, 2 element record.
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2003a.vhdl
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases with more than one "others" association in an aggregate.
X--	Other cases in E-07-2-2-2003B.VHD.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2003b.vhdl
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases where "others" is not the only choice in an element 
X--	association.  other cases in E-07-2-2-2003A.VHD.
X-- cases:  1x3 array, 3 element record
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2004a.vhdl
X-- specified using named association (in order to distinguish them from
X-- parenthesized expressions).
X-- contexts:  signal assignment and declaration.
XTest:       e-07-2-2-2005a.vhdl
X-- Check that an element association with a choice that is an element simple
X-- name (and that cannot be interpreted as a simple expression) is only
X-- allowed in a record aggregate.
X-- cases:  1-dimensional array of character.
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2006a.vhdl
X-- Check that an element association with a choice that is a simple expression
X-- (and that cannot be interpreted as an element simple name) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006B.VHD
X-- note:  only cases where a choice is a simple expression in a 
X--	record aggregate.
X-- cases:  homogeneous 3 element record, only static expressions.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
XTest:       e-07-2-2-2006b.vhdl
X-- Check that an element association with a choice that is a simple expression
X-- ( and that cannot be interpreted as an element simple name ) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006A.VHD
X-- note:  only cases where a choice is a discrete range in a record aggregate.
X-- cases:  homogenous record type;  expressions are all static.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
XTest:       e-07-2-2-2007a.vhdl
X-- Check that the type of an aggregate must be determinable solely from the
X-- context in which the aggregate appears, excluding the aggregate itself, but
X-- using the fact that the type of the aggregate must be a composite type. 
X-- Check that a boolean expression of the form "aggregate = aggregate" is 
X-- illegal. Check that an attribute name of the form "aggregate'LENGTH" is 
X-- illegal.
X-- Questions:  Are these true for qualified aggregates as well?
X-- cases:  simple record and array aggregates.
X-- contexts:
X-- 1) port declaration;
X-- 2) variable assignment;
X-- 3) loop parameter specification.
XTest:       s-07-2-2-2001a.vhdl
X-- Check that both positional association and named association are legal.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
XTest:       s-07-2-2-2002a.vhdl
X-- Check that named associations may appear in any order with respect to
X-- each other
XTest:       s-07-2-2-2003a.vhdl
X-- Check that an "others" association may be the only association.
XTest:       s-07-2-2-2004a.vhdl
X-- Check that an "others" association may occur in a record aggregate or 
X-- in an array aggregate.
XTest:       s-07-2-2-2005a.vhdl
X-- Check that an identifier that could be either a simple expression or
X-- an element simple name can occur as the choice in an element 
X-- association in either a recored aggregate or an array aggregate.
X
X------------------------------------------------------------------------
X  Paragraph:  Record Aggregates - 7.3.2.1
X------------------------------------------------------------------------
XTest:       e-07-2-2-2101a.vhdl
X-- Check that if the type of an aggregate is a record type, the element names
X-- given as choices must denote elements of that record type.
X-- cases:
X-- 1) qualified aggregate where the element name in choice
X--	does not match an element name of the record type but matches an
X--	element name of a similiar record type.
X-- 2) unqualified aggregate, type discernable from context, element name
X--	as in 1).
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
XTest:       e-07-2-2-2102a.vhdl
X-- Check that all of the elements of the record type must be accounted for by
X-- the set of element associations.
X-- cases:
X-- 1) all positional associations with the last element missing.
X-- 2) positional then named associations with the element "in-between" missing.
X-- 3) all named associations with one element given incompletely as in 1).
X-- 4) all positional associations with one element given as in 2).
X-- 5) all named with one element missing.
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
XTest:       e-07-2-2-2103a.vhdl
X-- Check that no element of the record type may appear in more than one choice
X-- in the set of element associations.
X-- cases:
X-- 1) positional then named, with last positional association specified in a
X--	named association;
X-- 2) one element named twice in two "or" choices to have the same value.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2104a.vhdl
X-- Check that there may be no more element associations than there are record
X-- elements.
X-- cases:
X-- 1) all positional associations with one more element.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2105a.vhdl
X-- Check that the choice "others" must represent at least one element.
X-- cases:
X-- 1) all positional associations with an extra "others" choice;
X-- 2) positional then named with an extra "others" choice;
X-- 3) all named with an extra "others" choice;
X-- 4) correct aggregate with one element which is a record incorrectly
X--	specified as in 2).
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2106a.vhdl
X-- Check that an element association with more than one choice or with the
X-- choice "others" is allowed only if the elements specified are all of the 
X-- same type.
X-- cases:
X-- 1) the two elements are of types BIT and BOOLEAN;
X-- 2) the two elements are of types predefined integer and re-defined integer.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2107a.vhdl
X-- Check that the expression of an element association must have the type of 
X-- the associated record element. Check for objects, literals, aggregates, 
X-- function calls.
X
X------------------------------------------------------------------------
X  Paragraph:  Array Aggregates - 7.3.2.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-2201a.vhdl
X-- Check that each choice must specify a value of the index type.
X-- cases:
X-- 1) choice is an object of type BIT and the index type is BOOLEAN;
X-- 2) choices are the positional values of the (enumeration) index type;
X-- contexts:
X-- 1) variable assignment;
X-- 2) return statement;
XTest:       e-07-2-2-2202a.vhdl
X-- Check that the expression of each element association of an n-dimensional
X-- array must be an (n-1) dimensional array or array aggregate with
X-- elements of the array element type.
XTest:       e-07-2-2-2203a.vhdl
X-- Check that (aside from a final element association with the single choice
X-- "others") all element associations of an array aggregate must be either all
X-- positional or all named.
X-- cases:
X-- 1) mixed positional and named associations without an "others" association.
X-- contexts:
X-- 1) if statement;
X-- 2) variable assignment;
X-- 3) function return statement;
X-- 4) signal assignment;
X-- 5) port association;
XTest:       e-07-2-2-2204a.vhdl
X-- Check that all choices (including "others") in an aggregate that has more
X-- than one element association or that has more than one choice in an element
X-- association must be static.
X-- cases:
X-- 1) one generic, one "others" choice in different associations for an array
X--	subtype with static index constraint (i.e. "others" choice is static);
X-- 2) two choices, one non-static, in the same association;
X-- 3) same as 1) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 4) same as 2) but with the non-static choice being a formal parameter
X--	of a funtion.
XTest:       e-07-2-2-2205a.vhdl
X-- Check that in an aggregate without an "others" choice, every element in the
X-- array must be accounted for in the set of choices. Check for a positional
X-- aggregate assigned to a signal or variable array object. Check for a named
X-- association aggregate where there are gaps between the lower index bound and
X-- the upper index bound.
X-- cases:
X-- 1) positional aggregate with one missing element;
X-- 2) aggregate with two named associations which specify discrete ranges,
X--	and the two ranges cover the index range but with a gap between them.
X-- contexts:
X-- 1) variable assignment;
X-- 2) signal assignment statement;
X-- 3) function return statement;
X-- 4) if statement;
XTest:       e-07-2-2-2206a.vhdl
X-- Check that in a named association aggregate, no array element may have more
X-- than one associated expression.
X-- cases:
X-- 1) one element named twice in different associations;
X-- 2) one element named twice in different "or" associations;
X-- 3) one element named twice in the same "or" association.
X-- contexts:
X-- 1) assertion definition in an interface description;
X-- 2) return statement in a function;
X-- 3) port association;
X-- 4) signal assignment;
XTest:       e-07-2-2-2207a.vhdl
X-- Check that there may be no more associations than there are elements in the
X-- array (pertains to positional association in contexts requiring fixed size
X-- array aggregates).
X-- cases:
X-- 1) positional aggregate of an array with fixed index type
X--	with an extra element.
X-- contexts:
X-- 1) variable assignment;
XTest:       e-07-2-2-2208a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- actual parameter corresponding to an unconstrained formal parameter.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) actual parameter association;
X-- 2) variable assignment.
XTest:       e-07-2-2-2209a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- return expression for a function returning an unconstrained array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
XTest:       e-07-2-2-2210a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- operand of a qualified expression whose type mark denotes an unconstrained
X-- array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) variable assignment statement;
X-- 2) return statement in function.
XTest:       e-07-2-2-2211a.vhdl
X-- 	Check that the direction of the index subtype of the aggregate
X--      array is the same as the direction of the index subtype of the 
X--      base type of the array.
XTest:       e-07-2-2-2212a.vhdl
X--     Check that in a positional aggragate the leftmost bound
X--     is determined by the applicable index constraint or by
X--     S'LEFT where S is the index subtype of the base type of
X--     the array, and the rightmost bound is determined by the 
X--     direction of the index subtype and the number of elements.
XTest:       s-07-2-2-2201a.vhdl
X-- Check that a string literal or a bit string literal is allowed in a
X-- multi-dimensional aggregate at the place of a one-dimensional array of a
X-- character type.
X-- cases:  string literal and bit string literal, constrained and unconstrained
X--	arrays.
X-- contexts:
X-- 1) return statement of function;
X-- 2) subprogram parameters;
XTest:       s-07-2-2-2202a.vhdl
X-- Check that an aggregate that has a single element association having a 
X-- single choice may have a nonstatic choice.
XTest:       s-07-2-2-2203a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is an actual
X-- parameter associated with a formal parameter of a constrained array subtype.
X-- cases:
X-- 1) "others" as only choice;
X-- 2) "others" not only choice.
XTest:       s-07-2-2-2204a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the result
X-- expression of a function, where the corresponding function result type is a
X-- constrained array subtype.
XTest:       s-07-2-2-2205a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the expression
X-- on the right hand side of a variable assignment statement, and the name on
X-- the left hand side is of a constrained array subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
XTest:       s-07-2-2-2206a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is one of the 
X-- value expressions on the right hand side of a signal assignment statement, 
X-- and the names on the left hand side are all of the same constrained array 
X-- subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
XTest:       s-07-2-2-2207a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the operand of
X-- a qualified expression whose type mark denotes a constrained array type.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:
X-- 1) parameter specification;
X-- 2) return statement in function;
X-- 3) port declaration;
X-- 4) signal assignment.
XTest:       s-07-2-2-2208a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is a subaggregate
X-- of a multi-dimensional aggregate, and an "others" choice would be allowed
X-- for this multi-dimensional aggregate in this context.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:  those of all "others" cases above.
X-- 1) actual parameter associated with a formal parameter of
X--	a constrained array subtype.
X-- 2) return statement in a function whose return type is a constrained
X--	array subtype.
X-- 3) variable assignment to an object of constrained array subtype.
X-- 4) signal assignment to an object of constrained array subtype.
X-- 5) qualified expression whose type mark denotes a constrained array subtype.
X
X------------------------------------------------------------------------
X  Paragraph:  Function Calls - 7.3.3
X------------------------------------------------------------------------
XTest:       e-07-2-2-3001a.vhdl
X-- Check that the result of a function call is of the type specified in the
X-- definition of the function. Check for error cases here.
X-- cases:
X-- The type expected from the context of the function call is different from
X--	the type specified in the definition of the function, for:
X-- 1) one type "derived" from the other, i.e. a new integer type;
X-- 2) two "similiar" types, i.e. record types whose definitions are identical;
X-- 3) two constrained arrays of the same unconstrained base type.
X-- contexts:
X-- 1) value returned by a function in the body of the function declaration.
X-- 2) boolean condition in if statement.
X-- 3) waveform expression in signal assignment statement.
XTest:       e-07-2-2-3002a.vhdl
X-- Check that in a function call the type of each argument in the argument list
X-- must be compatible with the type of the corresponding input parameter in the
X-- definition of the function. Check for positional inversion of arguments.
XTest:       s-07-2-2-3001a.vhdl
X-- Check that the result of a function call is of the type specified in
X-- the definition of the function. Check for error_free cases here.
XTest:       s-07-2-2-3002a.vhdl
X-- Check that a function call without an actual parameter part is
X-- permitted (for functions with no formal parameters or functions whose
X-- formal parameters all have default values).  As a special case, check
X-- when the prefix of an indexed name is a function call with no actual
X-- parameter part.
X
X------------------------------------------------------------------------
X  Paragraph:  Qualified Expressions - 7.3.4
X------------------------------------------------------------------------
XTest:       e-07-2-2-4001a.vhdl
X-- Check that the operand must have the same type as the base type of the type
X-- mark.
X-- cases:
X-- 1) a boolean expression with type bit;
X-- 2) object of an "identical" record type.
X-- contexts:
X-- 1) function return statement;
X-- 2) port declaration;
X-- 3) signal assignment.
X
X------------------------------------------------------------------------
X  Paragraph: missing section: Type Conversion - 7.3.5
X------------------------------------------------------------------------
XTest:       e-07-3-5-0001a.vhd
X-- Check that type conversion cannot occur on an operand of any type
X-- but universal integer or universal real on an operand of any type 
XTest:       e-07-3-5-0001b.vhd
X-- Check that type conversion cannot occur on an operand of any type but
X-- universal integer or universal real.
XTest:       s-07-3-5-0001a.vhd
X-- Check that type conversion can only occur on an operand of type
X-- universal integer or universal real.
X
X------------------------------------------------------------------------
X  Paragraph: missing section: Allocators - 7.3.6
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Static Expressions - 7.3.1 --> 7.4.0
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Generic Expressions - 7.3.2 --> ?
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Universal Expressions - ???? --> 7.5
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Boolean Expressions -  7.3.3 --> ?
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Association Lists - 7.4 --> 4.3.3.2 ( Declarations)
X------------------------------------------------------------------------
XTest:       e-07-4-0-0001a.vhdl
X-- Check that the association list must specify exactly one actual part
X-- for each formal part of the corresponding interface list that does not 
X-- have a default expression. Check for the case where one formal part has
X-- more than one actual part. Check for the case where one formal part
X-- that does not have a default value does not have an actual part.
X-- cases:
X-- 1) more than one parameter association is specified for a formal parameter;
X-- 2) a formal parameter without default value does not have a parameter
X--	association;
X-- contexts:
X-- 1) range constraint in a real subtype declaration
X-- 2) signal assignment statement
XTest:       e-07-4-0-0002a.vhdl
X-- Check that all positional associations must appear before any named
X-- associations.
X-- cases:
X-- 1) named, positional, named, positional, all in the same order as the
X--	parameter specification.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       e-07-4-0-0003a.vhdl
X-- Check that the first n positional associations are taken to correspond to 
X-- the first n formal parts, regardless of whether the
X-- associations are, in principle, optional or obligatory or whether
X-- default values were specified for one or more of these formal parts.
X-- cases:
X-- 1) formal parameters of different types, first has a default value
X--	and does not have a parameter association of the same type.
X-- contexts:
X-- 1) generic association in component instantiation
XTest:       e-07-4-0-0004a.vhdl
X-- Check that the null association element (i.e. commas as place holders) is
X-- not allowed.
X-- cases:
X-- 1) function with formal parameters which all have default values.
X-- contexts:
X-- 1) assignment in variable declaration.
XTest:       e-07-4-0-0005a.vhdl
X-- Check that an empty association list (i.e. empty paired parentheses)
X-- is not allowed, even for a function that has no formal parameters or
X-- an entity whose formal parts all have default values.
X-- cases:
X-- 1) function with no formal parameters;
X-- 2) function whose formal parameters all have default values.
X-- contexts:
X-- 1) next statement;
X-- 2) enumeration subtype declaration.
XTest:       e-07-4-0-0006a.vhdl
X-- Check that if the mode of the formal designator is in, inout, or linkage
X-- and the actual designator is not open then the type of the actual designator
X-- after applying any type conversion function present in the actual must
X-- be the same as the type of the corresponding formal designator.
XTest:       e-07-4-0-0007a.vhdl
X-- Check that if the mode of the formal designator is out, inout, buffer or
X-- linkage and the actual designator is not open then the type of the formal
X-- designator the type of the formal designator after applying any type
X-- conversion function present in the formal part must be the same as the
X-- type of the corresponding actual designator.
XTest:       e-07-4-0-0008a.vhdl
X--   Check that an actual port in a port association list must not be a formal 
X--   port signal name.
XTest:       s-07-4-0-0001a.vhdl
X-- Check that both named and positional association elements can be used
X-- in the same association list.
X-- cases:
X-- 1) positional, positional, named, named, all in the same order as the
X--    parameter specification. 
X--    Note. all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       s-07-4-0-0002a.vhdl
X-- Check that an actual part can be omitted for any formal part for
X-- which a default value was specified in the corresponding interface
X-- list.
X-- cases:
X-- 1) all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       s-07-4-0-0003a.vhdl
X-- Check that the subtype of the formal designator is permitted to be 
X-- different from the subtype of the actual designator as long as the 
X-- base types match.
X
*-*-END-of-TEST-SYNOPSIS.text-*-*
echo x - e-07-1-0-0001a.vhdl
sed 's/^X//' >e-07-1-0-0001a.vhdl <<'*-*-END-of-e-07-1-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/13/85
X-- note:  in this file, tests for types and entities.
X-- types can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- 5) function declarative part
X-- 6) function statement part
X-- 7) package
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 5) attribute specification in a function declaration
X-- 6) return statement in a function
X-- 7) default value in formal parameter list of function declaration in package
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X--	<< modified 5/6/88 to 1076. jsgrout>>
Xpackage P is
X	type T is (one,two,three,four);
X	-- attribute A of function is T; -- 7.2
X	attribute A : T ; -- 1076
X	attribute A of all : function is one ;	-- 1076
Xend P;
X
X-- with package P; -- 7.2 - no longer used.
Xuse P.all ; --1076
Xentity E is -- 1076
X    generic ( WHATEVER : T ) ; -- 1076
X    port (PT:BOOLEAN) ; -- 1076
X    begin -- 1076
X        assert WHATEVER < T;
X    	-- SEMANTICS ERROR:  TYPE name used as primary.  (context 4)
X    end E;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
Xentity E is -- 1076
X    generic ( WHATEVER : T ) ; -- 1076
X    port (PT:BOOLEAN) ; -- 1076
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:    block -- 7.2
Xbegin -- 1076
X    begin	
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to T;
X	  -- SEMANTICS ERROR:  Type name used as primary.  (context 3)
X	begin
X	    Y:
X	    -- for I := T to T loop -- 7.2
X	    for I in T to T loop
X		-- Semantics Error : Type name used as primary in iteration
X			--           scheme expression
X			return;
X	    end loop;
X	    return;
X	end process;
X    end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:    block -- 7.2
Xbegin
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X	    S <= T;
X	     -- SEMANTICS ERROR:  type name used as primary (context 1)
X	end generate;
X	process
X	begin
X	    return;
X	end process;
X--    end block;
Xend AB;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
XPackage body P is
X    function F return T is
X	-- for F of function F use T; -- 7.2 .. no longer supported
X        -- SEMANTICS ERROR:  type name used as primary (context 5)
X    begin
X	return T;
X	-- SEMANTICS ERROR:  type name used as primary (context 6)
X    end F;
Xend P ;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
Xpackage body P2 is
X	function F ( A : INTEGER := T ) return INTEGER is
X	-- SEMANTICS ERROR:  type name used as primary (context 7)
X	begin
X		return 0;
X	end F;
Xend P2;
*-*-END-of-e-07-1-0-0001a.vhdl-*-*
echo x - e-07-1-0-0001b.vhdl
sed 's/^X//' >e-07-1-0-0001b.vhdl <<'*-*-END-of-e-07-1-0-0001b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/14/84
X-- note:  in this file, tests for entities only.
X-- entities can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type T is (one,two,three,four);
X	attribute A of function is T;
Xend P;
X
X-- with package P;
Xuse P.all;
Xentity E  is ;
Xgeneric ( WHATEVER : T ) ;
X    port (PT:BOOLEAN) ;
Xassert WHATEVER < E;
X	-- SEMANTICS ERROR:  entity name used as primary.  (context 4)
Xend E;
X
X-- with package P;
Xuse P.all;
Xentity E  is ;
Xgeneric ( WHATEVER : T ) ;
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to E;
X	    -- SEMANTICS ERROR:  entity name used as primary.  (context 3)
X	begin
X	    for i in 1 to E loop
X    	   -- SEMANTICS ERROR:  entity name used as primary.  (context 2)
X		return;
X    end loop;
X	return;
X	end process;
X--    end block;
Xend BB;
X
X
Xarchitecture AB of E is
Xbegin
X--L_X_2:    block
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X	    S <= E;
X	    -- SEMANTICS ERROR:  entity name used as primary (context 1)
Xnd generate;
X	process
X        begin
X	    return;
X	end process;
X    end block;
X-- end block ;
Xend AB;
*-*-END-of-e-07-1-0-0001b.vhdl-*-*
echo x - e-07-1-0-0001c.vhdl
sed 's/^X//' >e-07-1-0-0001c.vhdl <<'*-*-END-of-e-07-1-0-0001c.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001C.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for bodies only.
X-- bodies can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of architecture body statement)
X-- 3) body declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type T is (one,two,three,four);
X	attribute A of function is T;
Xend P;
X
X with package P;
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
Xblock
Xbegin
XL_X_1:    block
X    begin
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to BB;
X	    -- SEMANTICS ERROR:  body name used as primary.  (context 3)
X        begin
X	    return;
Xend process;
X    end block;
X    end begin;
Xend block ;
Xend BB;
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_2:    block
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X		S <= AB;
X		-- SEMANTICS ERROR:  body name used as primary (context 1)
Xend generate;
X    end block;
X    end begin;
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001c.vhdl-*-*
echo x - e-07-1-0-0001d.vhdl
sed 's/^X//' >e-07-1-0-0001d.vhdl <<'*-*-END-of-e-07-1-0-0001d.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001D.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for component labels only.
X-- component labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_1:    block
X	signal S : BOOLEAN;
X	component C port ( CPT1 : in BOOLEAN );
X    begin
X	if TRUE generate
X		NEW_C : C port ( PT );
X		S <= NEW_C;
X		-- SEMANTICS ERROR: component label used as primary (context 1)
X		end generate;
X    end block;
X    end begin
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001d.vhdl-*-*
echo x - e-07-1-0-0001e.vhdl
sed 's/^X//' >e-07-1-0-0001e.vhdl <<'*-*-END-of-e-07-1-0-0001e.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001E.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for generate labels only.
X-- generate labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_1:    block
X	signal S : BOOLEAN;
X    begin
X	DO_IT: if TRUE generate
X		S <= DO_IT;
X		-- SEMANTICS ERROR: generate label used as primary (context 1)
X		end generate;
X    end block;
X    end begin;
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001e.vhdl-*-*
echo x - e-07-1-0-0001f.vhdl
sed 's/^X//' >e-07-1-0-0001f.vhdl <<'*-*-END-of-e-07-1-0-0001f.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001F.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for loop labels only.
X-- loop labels can be visible in the following scopes:
X-- 1) loop statement (as particular example of beh. body statement)
X-- specific contexts:
X-- 1) exit statement in loop statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture BB of E is
X--   L_X_1:    block
X    begin
X	process
X        begin
X	    DO_LOOP : while TRUE loop
X		exit when DO_LOOP;
X	    end loop;
X	    return;
X	end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-1-0-0001f.vhdl-*-*
echo x - e-07-2-0-0001a.vhdl
sed 's/^X//' >e-07-2-0-0001a.vhdl <<'*-*-END-of-e-07-2-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that operators have the correct precedence. This is an indirect check
X-- using semantic error processing. The idea is that 'integer + real * real'
X-- should produce an error message stating that the operands of '+' are
X-- incompatible, while 'integer + real * real' should produce an error message
X-- stating that the operands of '*' are incompatible. Check for logical vs.
X-- relational, relational vs. adding, adding vs. multiplying, multiplying vs.
X-- miscellaneous. 
X-- DPS 05/14/84
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence. 
X-- cases:
X-- 1) logical and relational operators with boolean literals;
X-- 2) relational and adding operators with boolean and integer literals;
X-- 3) adding and multiplying operators with integer and real literals;
X-- 4) multiplying and miscellaneous operators with integer and real literals.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	subtype ALWAYS_FALSE is boolean range FALSE to FALSE;
Xend P;
X
X-- with package P;
Xuse P.all;
Xpackage body P is
Xfunction F ( PR : ALWAYS_FALSE ) return boolean is
Xbegin
X	case PR is
X		when ( FALSE = FALSE and FALSE = FALSE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( TRUE /= FALSE or TRUE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "/=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( 40 + 10 = 50 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "+" evaluated first.
X		-- WRONG ERROR:  incompatible operands to .
X		-- 10 = 50 becomes FALSE if and only if "=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( 4.0 < 10.3 - 6.1 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "-" evaluated first.
X		-- WRONG ERROR:  incompatible operands to .
X		-- 4.0 < 10.3 becomes TRUE if and only if "<" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 + 10 * 6 - 3 ) = 62 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "*" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 10.0 + 4.0 / 2.0 - 7.0 ) > 0.1 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "/" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 * 10 ** 2 / 2 ) = 250 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "**" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 100.0 / 10.0 ** 2 * 0.5 ) < 0.6 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "**" evaluated first.
X		when others => null;
X	end case;
X        return PR;
Xend F;
*-*-END-of-e-07-2-0-0001a.vhdl-*-*
echo x - e-07-2-0-0002a.vhdl
sed 's/^X//' >e-07-2-0-0002a.vhdl <<'*-*-END-of-e-07-2-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that operators of the same precedence associate left to right. This is
X-- an indirect check using semantic error processing. The idea is that 'integer
X-- + integer - real' should produce an error message stating that the operands
X-- of '-' are incompatible, while 'integer + real - integer' should produce an
X-- error message stating that the operands of '+' are incompatible (and 
X-- possibly another message about incompatible operands of '-'). Check for 
X-- logical, relational, adding, multiplying. Check when operands are 
X-- function calls.
X-- DPS 05/14/84
X-- Questions:  
X-- 1) I don't know how to check when operands are function calls.
X-- 2) It seems that a series of relational expressions is not legal.
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence.  NOTE:  this does NOT allow the check for
X-- function calls.
X-- cases:
X-- 1) logical operators with boolean literals;
X-- 2) relational operators with boolean literals;
X-- 3) adding operators with integer literals;
X-- 4) multiplying with integer literals.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	subtype ALWAYS_FALSE is boolean range FALSE to FALSE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PR : ALWAYS_FALSE ) return boolean is
Xbegin
X	case PR is
X		when ( TRUE nand FALSE nand FALSE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( TRUE /= FALSE <= TRUE ) => null;
X		-- SYNTAX ERROR:  cannot have series of relationals!!
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 - 10 + 3 ) = -2 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 10 / 2 * 5 ) = 25 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X        return TRUE;
Xend F;
*-*-END-of-e-07-2-0-0002a.vhdl-*-*
echo x - e-07-2-1-0001a.vhdl
sed 's/^X//' >e-07-2-1-0001a.vhdl <<'*-*-END-of-e-07-2-1-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, nor, nand, not) 
X-- are not defined for scalar types other than BOOLEAN or BIT.
X-- cases:  literals and objects of all predefined scalar types
X--	and an enumeration type..
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E ( PT : boolean ) is
Xend E;
X
Xarchitecture BB of E is
XL_X_1: block
X begin
X  process
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	variable E1,E2,E3 : ENUM 	:= ONE and TWO;
X	-- SEMANTIC ERROR:  "and" not defined for enumeration type.
X
X	variable C1,C2,C3 : CHARACTER	:= 'a' or 'B';
X	-- SEMANTIC ERROR:  "or" not defined for character type.
X
X	variable I1,I2,I3 : INTEGER	:= -10 xor 859;
X	-- SEMANTIC ERROR:  "xor" not defined for integer type.
X
X	variable R1,R2,R3 : REAL	:= not 3278.4;
X	-- SEMANTIC ERROR:  "not" not defined for real type.
X
X	variable T1,T2,T3 : TIME	:= 1 s and 2 ms;
X	-- SEMANTIC ERROR:  "and" not defined for time type.
X
X        variable R4,R5,R6 : REAL        := 1.6 nor 2.3;
X        -- SEMANTIC ERROR:  "nor" not defined for real type.
X
X        variable T4,T5,T6 : TIME        := 4 ps nand 6ms;
X        -- SEMANTIC ERROR:  "nand" not defined for real type.
X
X	variable B : boolean;
X  begin
X	B  := E1  or E2;
X	-- SEMANTIC ERROR:  "or" not defined for enumeration type.
X
X	B  := C2  xor C3;
X	-- SEMANTICS ERROR:  "xor" not defined for character type.
X
X	B  := not I3;
X	-- SEMANTICS ERROR:  "not" not defined for integer type.
X
X	B  := R2 and R3;
X	-- SEMANTICS ERROR:  "and" not defined for real type.
X
X	B  := T2 or T3;
X	-- SEMANTICS ERROR:  "or" not defined for time type.
X
X	return;
X  end process;
X end block;
Xend BB;
*-*-END-of-e-07-2-1-0001a.vhdl-*-*
echo x - e-07-2-1-0002a.vhdl
sed 's/^X//' >e-07-2-1-0002a.vhdl <<'*-*-END-of-e-07-2-1-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for record types. Check for record types with single BOOLEAN or
X-- BIT element.
X-- cases:  aggregate and objects of:
X-- 1) simple record with single boolean element;
X-- 2) simple record with single bit element.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:  block
X  begin
X   process
X	type A is record	E : BOOLEAN;	end record;
X	type B is record	E : BIT;	end record;
X
X	variable A1 : A;
X
X	variable A2 : A;
X
X	variable B1 : B;
X
X	variable B2 : B;
X
X	variable BOOL : boolean;
X   begin
X	A1 := A'(E=>TRUE) and A'(E=>FALSE);
X	-- SEMANTIC ERROR:  "and" not defined for record types.
X
X	A2 := A'(E=>TRUE)  or A'(E=>FALSE);
X	-- SEMANTIC ERROR:   "or" not defined for record types.
X
X	B1 := B'(E=>'1') xor B'(E=>'0');
X	-- SEMANTIC ERROR:  "xor" not defined for record types.
X
X	B2 := not B'(E=>'0');
X	-- SEMANTIC ERROR:  "not" not defined for record types.
X
X	BOOL := B1 and B2;
X	-- SEMANTIC ERROR:  "and" not defined for record types.
X
X	BOOL := B1 or B2;
X	-- SEMANTIC ERROR:  "or" not defined for record types.
X
X	BOOL := A1 xor A2;
X	-- SEMANTIC ERROR:  "xor" not defined for record types.
X
X	BOOL := not A2;
X	-- SEMANTIC ERROR:  "not" not defined for record types.
X
X        BOOL := A1 nor A2;
X        -- SEMANTIC ERROR:  "nor" not defined for record types.
X
X        BOOL := B'(E=>'1') nand B'(E=>'1');
X        -- SEMANTIC ERROR:  "nand" not defined for record types.
X
X	return;
X   end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-2-1-0002a.vhdl-*-*
echo x - e-07-2-1-0003a.vhdl
sed 's/^X//' >e-07-2-1-0003a.vhdl <<'*-*-END-of-e-07-2-1-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for multi-dimensional arrays of BOOLEAN or BIT. Check for (1x1)
X-- arrays.
X-- cases:
X-- 1) 1x1 array of bit;
X-- 2) 1x1 array of boolean.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:  block
X  begin
X   process
X	type A is array ( 1 to 1, 1 to 1 ) of boolean;
X	type B is array ( 1 to 1, 1 to 1 ) of bit;
X
X	variable A1 : A;
X
X	variable A2 : A;
X
X	variable B1 : B;
X
X	variable B2 : B;
X
X	variable BOOL : boolean;
Xbegin
X	A1 := A'(1=>(1=>TRUE)) and A'(1=>(1=>FALSE));
X	-- SEMANTIC ERROR:  "and" not defined for multi-dimensional arrays.
X
X	A2 := A'(1=>(1=>TRUE))  or A'(1=>(1=>FALSE));
X	-- SEMANTIC ERROR:   "or" not defined for multi-dimensional arrays.
X
X	B1 := B'(1=>(1=>'1')) xor B'(1=>(1=>'0'));
X	-- SEMANTIC ERROR:  "xor" not defined for multi-dimensional arrays.
X
X	B2 := not B'(1=>(1=>'0'));
X	-- SEMANTIC ERROR:  "not" not defined for multi-dimensional arrays.
X
X        B1 := B'(1=>(1=>'0')) nor B'(1=>(1=>'1'));
X        -- SEMANTIC ERROR:  "nor" not defined for multi-dimensional arrays.
X
X        BOOL := A1 nand A2;
X        -- SEMANTIC ERROR;  "nand" not defined for multi-dimensional arrays.
X        
X	BOOL := B1 and B2;
X	-- SEMANTIC ERROR:  "and" not defined for multi-dimensional arrays.
X
X	BOOL := B1 or B2;
X	-- SEMANTIC ERROR:  "or" not defined for multi-dimensional arrays.
X
X	BOOL := A1 xor A2;
X	-- SEMANTIC ERROR:  "xor" not defined for multi-dimensional arrays.
X
X	BOOL := not A2;
X	-- SEMANTIC ERROR:  "not" not defined for multi-dimensional arrays.
X
X	return;
X   end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-2-1-0003a.vhdl-*-*
echo x - e-07-2-1-0004a.vhdl
sed 's/^X//' >e-07-2-1-0004a.vhdl <<'*-*-END-of-e-07-2-1-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary logical operators (and, or, xor)
X-- are not defined for arrays of different lengths. Check where one or both 
X-- operands are aggregates or concatenated sequences. 
X-- cases:  objects, aggregates, and concatenated sequences.
X-- contexts:  variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	type A is array ( 1 to 1 ) of boolean;
X	type B is array ( 1 to 2 ) of boolean;
X
X	variable A1 : A;
X	variable B1 : B;
X	variable BOOL : boolean;
Xbegin
X	A1 := A1 and B1;
X	-- SEMANTIC ERROR:  "and" not defined for arrays of different lengths.
X
X	B1 := B1 or A1 & BOOL;
X	-- SEMANTIC ERROR:  "or" not defined for arrays of different lengths.
X
X	A1 := B'(1=>TRUE) xor A1 & BOOL;
X	-- SEMANTIC ERROR:  "xor" not defined for arrays of different lengths.
X
X	B1 := BOOL & B'(TRUE,FALSE) and A1;
X	-- SEMANTIC ERROR:  "and" not defined for arrays of different lengths.
X
X	A1 := A'(1=>FALSE) or B'(FALSE,TRUE);
X	-- SEMANTIC ERROR:  "or" not defined for arrays of different lengths.
X        return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-0004a.vhdl-*-*
echo x - e-07-2-1-5001a.vhdl
sed 's/^X//' >e-07-2-1-5001a.vhdl <<'*-*-END-of-e-07-2-1-5001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary operator abs is not defined for non-numeric types.
X-- Check for single-element arrays of numerics.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E is
Xend E;
X 
Xarchitecture AB of E is
X-- L_X_1: block
X begin
X  process
X    type T1 is (RED,GREEN,YELLOW);
X    variable CH1 : character :='A';
X    variable CH2 : T1;
X    variable BO1 : boolean := true;
X  begin
X   CH1 := abs(CH1);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X   CH2 := ABS(CH2);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X   BO1 := abs ( BO1);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-1-5001a.vhdl-*-*
echo x - e-07-2-1-5002a.vhdl
sed 's/^X//' >e-07-2-1-5002a.vhdl <<'*-*-END-of-e-07-2-1-5002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the left operand of the binary arithmetic operator ** cannot be
X-- any type other than integer or floating point, and that the right operand
X-- cannot be any type other than integer. Check for objects, literals, function
X-- calls.
X-- cases:  Try on the left:  enumeration type, 1x1 array of real, 
X--	1 element record of integer, time, character, and bit.
X--	On the right:  real, time, 1 element record of integer, 1 element
X--	array of integer, and character.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_REAL_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_INTEGER_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_INTEGER_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function L1 ( A : SINGLE_REAL_ARRAY ) return SINGLE_REAL_ARRAY is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L1;
X
X	function L2 ( A : SINGLE_INTEGER_RECORD) return SINGLE_INTEGER_RECORD is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L2;
X
X	function L3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L3;
X
X	function L4 ( A : TIME ) return TIME is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L4;
X
X	function L5 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L5;
X
X	function L6 ( A : BIT ) return BIT is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L6;
X
X	function R2 ( B : REAL ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R2;
X
X	function R3 ( B : SINGLE_INTEGER_ARRAY ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R3;
X
X	function R4 ( B : SINGLE_INTEGER_RECORD ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R4;
X
X	function R5 ( B : TIME ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R5;
X
X	function R6 ( B : CHARACTER ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R6;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_REAL_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_INTEGER_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_INTEGER_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function L1 ( A : SINGLE_REAL_ARRAY ) return SINGLE_REAL_ARRAY is
X	begin
X		return A;
X	end L1;
X
X	function L2 ( A : SINGLE_INTEGER_RECORD) return SINGLE_INTEGER_RECORD is
X	begin
X		return A;
X	end L2;
X
X	function L3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end L3;
X
X	function L4 ( A : TIME ) return TIME is
X	begin
X		return A;
X	end L4;
X
X	function L5 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A;
X	end L5;
X
X	function L6 ( A : BIT ) return BIT is
X	begin
X		return A;
X	end L6;
X
X	function R2 ( B : REAL ) return REAL is
X	begin
X		return 1.0;
X	end R2;
X
X	function R3 ( B : SINGLE_INTEGER_ARRAY ) return REAL is
X	begin
X		return 1.0;
X	end R3;
X
X	function R4 ( B : SINGLE_INTEGER_RECORD ) return REAL is
X	begin
X		return 1.0;
X	end R4;
X
X	function R5 ( B : TIME ) return REAL is
X	begin
X		return 1.0;
X	end R5;
X
X	function R6 ( B : CHARACTER ) return REAL is
X	begin
X		return 1.0;
X	end R6;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_REAL_ARRAY;
X	variable I : SINGLE_INTEGER_RECORD;
X
X	variable E : ENUMERATION_TYPE := TWO ** 10;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable T : TIME := 1 S ** 3;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable C : CHARACTER := 'C' ** 4;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable B : BIT := '1' ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X  begin
X
X	A := (1=>0.0) ** 2;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	I := (E=>0) ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	A := L1(A) ** 128;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	I := L2(I) ** 27;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	E := L3(E) ** 2;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	T := L4(T) ** 5;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	C := L5(C) ** 3;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	B := L6(B) ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	A(1) := 1.0 ** L1(A);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L2(I);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L3(E);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L4(T);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L5(C);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L6(B);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 1.0;
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** SINGLE_INTEGER_ARRAY'(1=>1);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** SINGLE_INTEGER_RECORD'(E=>1);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 10 S;
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 'C';
X		-- SEMANTICS ERROR:  right operand must be integer.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-5002a.vhdl-*-*
echo x - e-07-2-1-5003a.vhdl
sed 's/^X//' >e-07-2-1-5003a.vhdl <<'*-*-END-of-e-07-2-1-5003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the right operand of ** is negative, the left operand must be
X-- a floating point type. Check for static expression.
X-- case:  user-defined integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	function F ( A : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return A ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X	end F;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	function F ( A : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return A;
X	end F;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X process
X	variable N : NEW_INTEGER := 10 ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X begin
X
X	N := F(N) ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-5003a.vhdl-*-*
echo x - e-07-2-2-0001a.vhdl
sed 's/^X//' >e-07-2-2-0001a.vhdl <<'*-*-END-of-e-07-2-2-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of record types only.  Others in ...B & ...C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) record with single discrete element;
X-- 2) homogeneous record.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	type SINGLE is record	E : ENUM;		end record;
X	type SAME is record	E1,E2,E3 : BIT;		end record;
X
X	function F_SINGLE_BOOL ( A,B : SINGLE ) return BOOLEAN is
X	begin
X		return A < B;
X		-- SEMANTIC ERROR:  "<" not defined for record types
X	end F_SINGLE_BOOL;
X
X	function F_SAME_BOOL ( A,B : SAME ) return BOOLEAN is
X	begin
X		return A <= B;
X		-- SEMANTIC ERROR:  "<=" not defined for record types
X	end F_SAME_BOOL;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	type SINGLE is record	E : ENUM;		end record;
X	type SAME is record	E1,E2,E3 : BIT;		end record;
X
X	function F_SINGLE_REC ( A : ENUM ) return SINGLE is
X	begin	return (E=>A);
X	end F_SINGLE_REC;
X
X	function F_SAME_REC ( A : bit ) return SAME is
X	begin	return (others=>A);
X	end F_SAME_REC;
X
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1,PT2 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X
X	variable B1 : boolean := SINGLE'(E=>ONE) < SINGLE'(E=>TWO);
X		-- SEMANTIC ERROR:  "<" not defined for record types
X
X	variable B2 : boolean := SAME'(others=>'1') <= SAME'(others=>'1') ;
X		-- SEMANTIC ERROR:  "<=" not defined for record types
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_SINGLE_REC(ONE) >= F_SINGLE_REC(TWO);
X		-- SEMANTIC ERROR:  ">=" not defined for record types
X
X	PT2 <= F_SAME_REC('1') > F_SAME_REC('0');
X		-- SEMANTIC ERROR:  ">" not defined for record types
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001a.vhdl-*-*
echo x - e-07-2-2-0001b.vhdl
sed 's/^X//' >e-07-2-2-0001b.vhdl <<'*-*-END-of-e-07-2-2-0001b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of multi-dimensional array types only.  Others in  to .A &  to .
X-- cases:  objects, aggregates, and function calls of
X-- multi-dimensional array of discrete type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) if statement (objects);
X-- 3) variable declaration (aggregates);
X-- 4) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all;
Xpackage body P is
X	type MULTI is array (integer range <>, integer range <>) of integer;
X	subtype S_MULTI is MULTI ( 1 to 3, 1 to 2 );
X	function F_BOOL ( A,B : MULTI ) return boolean is
X	begin
X		if A > B then
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X			return A < B;
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X		else
X			return A <= B;
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X		end if;
X	end F_BOOL;
X
X	
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type MULTI is array (integer range <>, integer range <>) of integer;
X	subtype S_MULTI is MULTI ( 1 to 3, 1 to 2 );
X
X        function F_SMULTI ( A : integer ) return S_MULTI is
X	begin	return (others=>(others=>2));
X	end F_SMULTI;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1, PT2 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable B1 : boolean := S_MULTI'(1 to 3=>(1,2)) > S_MULTI'(1 to 3=>(2,3));
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X	variable B2 : boolean := S_MULTI'(1 to 3=>(1,2)) < S_MULTI'(1 to 3=>(2,3));
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_SMULTI(1) >= F_SMULTI(2);
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X	PT2 <= F_SMULTI(1) <= F_SMULTI(2);
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X  end process; 
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001b.vhdl-*-*
echo x - e-07-2-2-0001c.vhdl
sed 's/^X//' >e-07-2-2-0001c.vhdl <<'*-*-END-of-e-07-2-2-0001c.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001C.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of one dimensional arrays only.  Others in  to .A &  to .C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) array of arrays;
X-- 2) array of records;
X-- 3) array of floating point.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ARR is array ( 1 to 2 ) of integer;
X	type REC is record	E : boolean;	end record;
X
X	type FLT_ARRAY is array ( 1 to 10 ) of real;
X	type ARR_ARRAY is array ( 1 to 10 ) of ARR;
X	type REC_ARRAY is array ( 1 to 10 ) of REC;
X
X	function F_FLT_BOOL ( A,B : FLT_ARRAY ) return boolean is
X	begin
X		return A < B;
X		-- SEMANTIC ERROR:
X		--	"<" not defined for arrays of nondiscrete elements.
X	end F_FLT_BOOL;
X
X	function F_ARR_BOOL ( A,B : ARR_ARRAY ) return boolean is
X	begin
X		return A <= B;
X		-- SEMANTIC ERROR:
X		--	"<=" not defined for arrays of nondiscrete elements.
X	end F_ARR_BOOL;
X
X	function F_REC_BOOL ( A,B : REC_ARRAY ) return boolean is
X	begin
X		return A > B;
X		-- SEMANTIC ERROR:  
X		--	">" not defined for arrays of nondiscrete elements.
X	end F_REC_BOOL;
X
X	function F_FLT_ARRAY ( A : real ) return FLT_ARRAY is
X	begin	return ( others=>A );
X	end F_FLT_ARRAY;
X
X	function F_ARR_ARRAY ( A : ARR ) return ARR_ARRAY is
X	begin	return ( others=>A );
X	end F_ARR_ARRAY;
X
X	function F_REC_ARRAY ( A : REC ) return REC_ARRAY is
X	begin	return ( others=>A );
X	end F_REC_ARRAY;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type ARR is array ( 1 to 2 ) of integer;
X	type REC is record	E : boolean;	end record;
X
X	type FLT_ARRAY is array ( 1 to 10 ) of real;
X	type ARR_ARRAY is array ( 1 to 10 ) of ARR;
X	type REC_ARRAY is array ( 1 to 10 ) of REC;
X
X	function F_FLT_ARRAY ( A : real ) return FLT_ARRAY is
X	begin	return ( others=>A );
X	end F_FLT_ARRAY;
X
X	function F_ARR_ARRAY ( A : ARR ) return ARR_ARRAY is
X	begin	return ( others=>A );
X	end F_ARR_ARRAY;
X
X	function F_REC_ARRAY ( A : REC ) return REC_ARRAY is
X	begin	return ( others=>A );
X	end F_REC_ARRAY;
Xend P;
X
X
X-- with package P; use P.all;
Xentity E  is
X    port ( PT1,PT2,PT3 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable B1 : boolean := 
X		FLT_ARRAY'(others=>1.0) > FLT_ARRAY'(others=>5.2);
X		-- SEMANTIC ERROR:
X		--	">" not defined for arrays of nondiscrete elements.
X
X	variable B2 : boolean := 
X		ARR_ARRAY'(others=>(others=>1)) < ARR_ARRAY'(others=>(1,2));
X		-- SEMANTIC ERROR:
X		--	"<" not defined for arrays of nondiscrete elements.
X
X	variable B3 : boolean := 
X		REC_ARRAY'(others=>(E=>TRUE)) <= REC_ARRAY'(others=>(E=>TRUE));
X		-- SEMANTIC ERROR:
X		--	"<=" not defined for arrays of nondiscrete elements.
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_FLT_ARRAY(1.0) >= F_FLT_ARRAY(5.2);
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X
X	PT2 <= F_ARR_ARRAY( (1,0) ) >= F_ARR_ARRAY( (5,2) );
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X
X	PT3 <= F_REC_ARRAY( (E=>TRUE) ) >= F_REC_ARRAY( (E=>FALSE) );
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001c.vhdl-*-*
echo x - e-07-2-2-2001a.vhdl
sed 's/^X//' >e-07-2-2-2001a.vhdl <<'*-*-END-of-e-07-2-2-2001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that positional associations must precede any named associations.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 2);
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S1 <= (1=>TRUE,TRUE);
X	-- SEMANTIC ERROR:  positional association cannot follow named.
X
X	S2 <= (E1=>FALSE,TRUE);
X	-- SEMANTIC ERROR:  positional association cannot follow named.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2001a.vhdl-*-*
echo x - e-07-2-2-2002a.vhdl
sed 's/^X//' >e-07-2-2-2002a.vhdl <<'*-*-END-of-e-07-2-2-2002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that no association may follow an "others" association.
X-- cases:  1x2 array, 2 element record.
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 2) ;
X
X	signal S2 : RECORD_TYPE ;
X begin
X  process
X  begin
X	S1 <= (others=>TRUE,TRUE);
X	-- SEMANTIC ERROR:  association cannot follow "others" association.
X
X	S2 <= (others=>FALSE,TRUE);
X	-- SEMANTIC ERROR:  association cannot follow "others" association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2002a.vhdl-*-*
echo x - e-07-2-2-2003a.vhdl
sed 's/^X//' >e-07-2-2-2003a.vhdl <<'*-*-END-of-e-07-2-2-2003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases with more than one "others" association in an aggregate.
X--	Other cases in E-07-2-2-2003B.VHD.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S2 <= (others=>TRUE,others=>FALSE);
X	-- SEMANTIC ERROR:  more than one "others" association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2003a.vhdl-*-*
echo x - e-07-2-2-2003b.vhdl
sed 's/^X//' >e-07-2-2-2003b.vhdl <<'*-*-END-of-e-07-2-2-2003b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2003B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases where "others" is not the only choice in an element 
X--	association.  other cases in E-07-2-2-2003A.VHD.
X-- cases:  1x3 array, 3 element record
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S2 <= (E2 => TRUE, others | E1 => FALSE);
X	-- SEMANTIC ERROR:  "others" must be only choice in an association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2003b.vhdl-*-*
echo x - e-07-2-2-2004a.vhdl
sed 's/^X//' >e-07-2-2-2004a.vhdl <<'*-*-END-of-e-07-2-2-2004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- specified using named association (in order to distinguish them from
X-- parenthesized expressions).
X-- contexts:  signal assignment and declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X        
X	type SINGLE_ELEMENT_RECORD is record
X			E : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : SINGLE_ELEMENT_RECORD ;
X begin
X  process
X  begin
X	S <= (E => TRUE);
X
X	S <= (TRUE);
X		-- SEMANTIC ERROR:  single element record must be specified
X		--	using named association.
X  end process;
X--  end block;
Xend AB;
X
*-*-END-of-e-07-2-2-2004a.vhdl-*-*
echo x - e-07-2-2-2005a.vhdl
sed 's/^X//' >e-07-2-2-2005a.vhdl <<'*-*-END-of-e-07-2-2-2005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is an element simple
X-- name (and that cannot be interpreted as a simple expression) is only
X-- allowed in a record aggregate.
X-- cases:  1-dimensional array of character.
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	type ARRAY_TYPE is array (INTEGER range <>) of CHARACTER;
X	function F return INTEGER is
X	begin
X		return 1;
X	end F;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block 
X	signal S : ARRAY_TYPE(1 to 5) ;
X begin
X  process
X  begin
X	S <= (F=>' ', others=>'x');
X		-- SEMANTIC ERROR:  choice which is a simple name
X		--	can only occur in a record aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process
X	variable V : ARRAY_TYPE(1 to 5);
X	variable C : INTEGER := 1;
X  begin
X	V := ( C=>'C', others=>' ' );
X		-- SEMANTIC ERROR:  choice which is a simple name
X		--	can only occur in a record aggregate.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2005a.vhdl-*-*
echo x - e-07-2-2-2006a.vhdl
sed 's/^X//' >e-07-2-2-2006a.vhdl <<'*-*-END-of-e-07-2-2-2006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is a simple expression
X-- (and that cannot be interpreted as an element simple name) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006B.VHD
X-- note:  only cases where a choice is a simple expression in a 
X--	record aggregate.
X-- cases:  homogeneous 3 element record, only static expressions.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : RECORD_TYPE ;
X begin
X  process
X  begin
X	S <= ( (1+2)=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process
X	variable V : RECORD_TYPE;
X	constant C : INTEGER := 1;
X  begin
X	V := ( TRUE, TRUE, (3*1)=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X
X	V := ( C=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend BB;
X
*-*-END-of-e-07-2-2-2006a.vhdl-*-*
echo x - e-07-2-2-2006b.vhdl
sed 's/^X//' >e-07-2-2-2006b.vhdl <<'*-*-END-of-e-07-2-2-2006b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2006B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is a simple expression
X-- ( and that cannot be interpreted as an element simple name ) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006A.VHD
X-- note:  only cases where a choice is a discrete range in a record aggregate.
X-- cases:  homogenous record type;  expressions are all static.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : RECORD_TYPE ;
X begin
X  process
X  begin
X	S <= ( E1 to E3 => FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process 
X	constant C : INTEGER := 1;
X	variable V : RECORD_TYPE;
X  begin
X	V := ( 1 to C=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X
X	V := ( E1 to E2=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2006b.vhdl-*-*
echo x - e-07-2-2-2007a.vhdl
sed 's/^X//' >e-07-2-2-2007a.vhdl <<'*-*-END-of-e-07-2-2-2007a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2007A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the type of an aggregate must be determinable solely from the
X-- context in which the aggregate appears, excluding the aggregate itself, but
X-- using the fact that the type of the aggregate must be a composite type. 
X-- Check that a boolean expression of the form "aggregate = aggregate" is 
X-- illegal. Check that an attribute name of the form "aggregate'LENGTH" is 
X-- illegal.
X-- Questions:  Are these true for qualified aggregates as well?
X-- cases:  simple record and array aggregates.
X-- contexts:
X-- 1) port declaration;
X-- 2) variable assignment;
X-- 3) loop parameter specification.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type SIMPLE_ARR is array ( 1 to 3 ) of boolean;
X	type SIMPLE_REC is record
X			E1,E2,E3 : integer;
X		end record;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E is
X port ( PT : boolean := 
X    (E1=>1,E2=>2,E3=>3) = (E1=>0,E2=>1,E3=>2) ) ;
X-- SEMANTIC ERROR:  type of aggregate must be determinable from context.
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E is
X   port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X    variable I : integer := 0;
X    variable B : boolean;
X  begin
X	while (1 to 3=>TRUE) = (1 to 3 =>FALSE) loop
X	-- SEMANTIC ERROR:  type of aggregate must be determinable 
X	--	from context.
X
X                I := I + 1;
X
X		B := (E1=>I,E2=>I,E3=>I) = (E1=>0,others=>2);
X		-- SEMANTIC ERROR:  type of aggregate must be determinable 
X		--	from context.
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2007a.vhdl-*-*
echo x - e-07-2-2-2101a.vhdl
sed 's/^X//' >e-07-2-2-2101a.vhdl <<'*-*-END-of-e-07-2-2-2101a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2101A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the type of an aggregate is a record type, the element names
X-- given as choices must denote elements of that record type.
X-- cases:
X-- 1) qualified aggregate where the element name in choice
X--	does not match an element name of the record type but matches an
X--	element name of a similiar record type.
X-- 2) unqualified aggregate, type discernable from context, element name
X--	as in 1).
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	type NEW_INTEGER is range INTEGER'RIGHT downto INTEGER'LEFT;
X
X	type A_RECORD is record
X			A : CHARACTER;
X		end record;
X
X	type B_RECORD is record
X			B : CHARACTER;
X		end record;
X
X	type C_RECORD is record
X			C1, C2, C3 : INTEGER;
X		end record;
X
X	type D_RECORD is record
X			D1 : NEW_INTEGER;
X			D2 : INTEGER;
X			D3 : C_RECORD;
X		end record;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : A_RECORD;
X	variable B : B_RECORD;
X begin
X	A := A_RECORD'(B=>'E');
X	-- SEMANTICS ERROR:  choice does not denote record element (case 2)
X
X	B := (A=>'F');
X	-- SEMANTICS ERROR:  choice does not denote record element (case 1)
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2101a.vhdl-*-*
echo x - e-07-2-2-2102a.vhdl
sed 's/^X//' >e-07-2-2-2102a.vhdl <<'*-*-END-of-e-07-2-2-2102a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2102A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that all of the elements of the record type must be accounted for by
X-- the set of element associations.
X-- cases:
X-- 1) all positional associations with the last element missing.
X-- 2) positional then named associations with the element "in-between" missing.
X-- 3) all named associations with one element given incompletely as in 1).
X-- 4) all positional associations with one element given as in 2).
X-- 5) all named with one element missing.
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record
X			A : CHARACTER;
X		end record;
X
X	type B_RECORD is record
X			B : CHARACTER;
X		end record;
X
X	type C_RECORD is record
X			C1, C2, C3 : INTEGER;
X		end record;
X
X	type D_RECORD is record
X			D1 : NEW_INTEGER;
X			D2 : INTEGER;
X			D3 : C_RECORD;
X		end record;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable C1 : C_RECORD;
X	variable C2 : C_RECORD;
X	variable D1 : D_RECORD;
X	variable D2 : D_RECORD;
X  begin
X	C1 := ( -1001, 32767 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 1)
X
X	C2 := ( 2, C3=> 100 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 2)
X
X        D1 := ( D1=>-101, D2=>-855, D3=>(0,0) );
X	-- SEMANTICS ERROR:  record element unaccountable (case 3)
X
X	D2 := ( 63, -63, ( 357, C3=> 3400 ) );
X	-- SEMANTICS ERROR:  record element unaccountable (case 4)
X
X        C2 := ( C1=>1,C2=>4 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 5)
X
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2102a.vhdl-*-*
echo x - e-07-2-2-2103a.vhdl
sed 's/^X//' >e-07-2-2-2103a.vhdl <<'*-*-END-of-e-07-2-2-2103a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2103A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that no element of the record type may appear in more than one choice
X-- in the set of element associations.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) positional then named, with last positional association specified in a
X--	named association;
X-- 2) one element named twice in two "or" choices to have the same value.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record		A : CHARACTER;		end record;
X	type B_RECORD is record		B : CHARACTER;		end record;
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	type F_RECORD is record		F : A_RECORD;		end record;
X
X        attribute C_ATTR of body,entity,function is C_RECORD ;
X
X  
X	function A_FUN ( PAR : A_RECORD ) return A_RECORD is
X	begin
X		return ( A => PAR.A, A => PAR.A );
X		-- SEMANTICS ERROR:  element A named in more than one choice.
X	end A_FUN;
X
X	function B_FUN ( PAR : B_RECORD ) return B_RECORD is
X	begin
X		return ( B => PAR.B, B => PAR.B );
X		-- SEMANTICS ERROR:  element B named in more than one choice.
X	end B_FUN;
X
X	function C_FUN ( PAR : C_RECORD ) return C_RECORD is
X                variable C_VAR : C_RECORD;
X	begin
X
X                C_VAR := ( 1, 2, 3, C1=>4);
X                -- SEMANTICS ERROR:  element C1 has two associations.
X
X		return ( C1=>PAR.C1, C2=>PAR.C2, C3 | C2 =>PAR.C2 );
X		-- SEMANTICS ERROR:  element C2 named in more than one choice.
X	end C_FUN;
X
X	function D_FUN ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return ( D1=>1, D2=>PAR.D2, D3=>PAR.D3, D2=>PAR.D2 );
X		-- SEMANTICS ERROR:  element D2 named in more than one choice.
X	end D_FUN;
X
X	function E_FUN ( PAR : E_RECORD  ) return E_RECORD is
X	begin
X		return ( E1=>PAR.E1, E2=>PAR.E2, E1=>PAR.E1 );
X		-- SEMANTICS ERROR:  element E1 named in more than one choice.
X	end E_FUN;
X
X	function F_FUN ( PAR : F_RECORD ) return F_RECORD is
X	begin
X		return ( F => PAR.F, F => PAR.F );
X		-- SEMANTICS ERROR:  element F named in more than one choice.
X	end F_FUN;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record		A : CHARACTER;		end record;
X	type B_RECORD is record		B : CHARACTER;		end record;
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	type F_RECORD is record		F : A_RECORD;		end record;
X
X  
X        attribute C_ATTR of body,entity,function is C_RECORD ;
X
X	function A_FUN ( PAR : A_RECORD ) return A_RECORD is
X	begin
X		return PAR;
X	end A_FUN;
X
X	function B_FUN ( PAR : B_RECORD ) return B_RECORD is
X	begin
X		return PAR;
X	end B_FUN;
X
X	function C_FUN ( PAR : C_RECORD ) return C_RECORD is
X	begin
X		return PAR;
X	end C_FUN;
X
X	function D_FUN ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return PAR;
X	end D_FUN;
X
X	function E_FUN ( PAR : E_RECORD ) 
X		return E_RECORD is
X	begin
X		return PAR;
X	end E_FUN;
X
X	function F_FUN ( PAR : F_RECORD ) return F_RECORD is
X	begin
X		return PAR;
X	end F_FUN;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric ( 	G_CHAR : CHARACTER;	G_INT : INTEGER;
X		G_NINT : NEW_INTEGER;	G_BIT : BIT;
X		G_BOOL : BOOLEAN			)
X  ;
X    port (
X	A_PT_IN : in A_RECORD;	B_PT_IN : in B_RECORD;
X	C_PT_IN : in C_RECORD;	D_PT_IN : in D_RECORD;
X	E_PT_IN : in E_RECORD;	F_PT_IN : in F_RECORD;
X	A_PT_OUT : out A_RECORD;
X	C_PT_OUT : out C_RECORD;
X	D_PT_OUT : out D_RECORD;
X	E_PT_OUT : out E_RECORD;
X	F_PT_OUT : out F_RECORD
X	) ;
X
X      
Xassert
X	C_RECORD'( (C1=>G_INT, C2|C3|C1=>G_INT) ) /= C_PT_IN;
X	-- SEMANTICS ERROR:  element C1 named in more than one choice.
Xend E;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric ( 	G_CHAR : CHARACTER;	G_INT : INTEGER;
X		G_NINT : NEW_INTEGER;	G_BIT : BIT;
X		G_BOOL : BOOLEAN			)
X  ;
X    port (
X	A_PT_IN : in A_RECORD;	B_PT_IN : in B_RECORD;
X	C_PT_IN : in C_RECORD;	D_PT_IN : in D_RECORD;
X	E_PT_IN : in E_RECORD;	F_PT_IN : in F_RECORD;
X	A_PT_OUT : out A_RECORD;
X	C_PT_OUT : out C_RECORD;
X	D_PT_OUT : out D_RECORD;
X	E_PT_OUT : out E_RECORD;
X	F_PT_OUT : out F_RECORD
X	) ;
X
X      
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : D_RECORD;
X
X begin
X	V := ( D1=>D_PT_IN.D1, D2=>G_INT, D3=>(1,2,3), D2=>2 );
X	-- SEMANTICS ERROR:  element D2 named in more than one choice.
X
X	if A_PT_IN = (A=>'a', A=>G_CHAR) then
X	-- SEMANTICS ERROR:  element A named in more than one choice.
X
X		while C_FUN( (C1=>V.D2, C2=>V.D2, C1|C3=>V.D2) ).C1 < 5 loop
X		-- SEMANTICS ERROR:  element C1 named in more than one choice.
X
X			V := ( V.D1+1, V.D2+1, D3=>V.D3, D3=>V.D3 );
X		-- SEMANTICS ERROR:  element D3 named in more than one choice.
X
X		end loop;
X	end if;
X
X	F_PT_OUT <= ( F=>(A=>G_CHAR), F=>(A=>G_CHAR) );
X	-- SEMANTICS ERROR:  element F named in more than one choice.
X
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : A_RECORD ;
X
X	component C port( PT_IN : in E_RECORD;
X                          PT_OUT : out E_RECORD );
X        end component ;
X begin
X	C_1: C port map( 
X                    E_FUN(('1',E2=>TRUE,E2=>TRUE)),
X                    E_PT_OUT );
X	-- SEMANTICS ERROR:  element E2 named in more than one choice.
X
X	S <= ( A=>A_FUN((A=>'a')).A, A=>'b' );
X	-- SEMANTICS ERROR:  element A named in more than one choice.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2103a.vhdl-*-*
echo x - e-07-2-2-2104a.vhdl
sed 's/^X//' >e-07-2-2-2104a.vhdl <<'*-*-END-of-e-07-2-2-2104a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2104A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that there may be no more element associations than there are record
X-- elements.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) all positional associations with one more element.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X	variable V : E_RECORD;
X
Xbegin
X	V := ( '0', F_TRUE, F_TRUE );
X		-- SEMANTICS ERROR:  more associations than elements.
X
X	if PAR /= ( F_INT, F_INT*2, 3, -100 ) then
X		-- SEMANTICS ERROR:  more associations than elements.
X
X		return ( PAR.C1, PAR.C2, PAR.C3, PAR.C4 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	else
X		return ( F_INT, PAR.C1, PAR.C2, PAR.C3 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	end if;
X   end F;
Xend P ;
X
X-- with package P; use P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X  begin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
Xgeneric ( G_BIT : BIT;  
X          G_BOOL : BOOLEAN;  
X          G_INT : INTEGER ) ;
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X    assert
X	PT_IN /= ('1',TRUE,TRUE);
X	-- SEMANTICS ERROR:  more associations than elements.
Xend E;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
X    generic ( G_BIT : BIT;  
X              G_BOOL : BOOLEAN;  
X              G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X 	variable V : C_RECORD;
X  begin
X	while F(V) /= (G_INT,2,3,4) loop
X		-- SEMANTICS ERROR:  more associations than elements.
X		V := ( V.C1+1, V.C2+2, 3, 3 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	end loop;
X
X	PT_OUT <= (G_BIT,G_BOOL,F_TRUE);
X		-- SEMANTICS ERROR:  more associations than elements.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port( PT_IN : in E_RECORD; 
X			  PT_OUT : out E_RECORD );
X 	end component ;
X begin
X--	C_1: C port ( ('1',G_BOOL,F_TRUE), PT_OUT );
X	C_1: C port map ( G_BOOL,F_TRUE, PT_OUT );
X	-- SEMANTICS ERROR:  more associations than elements.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2104a.vhdl-*-*
echo x - e-07-2-2-2105a.vhdl
sed 's/^X//' >e-07-2-2-2105a.vhdl <<'*-*-END-of-e-07-2-2-2105a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2105A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the choice "others" must represent at least one element.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) all positional associations with an extra "others" choice;
X-- 2) positional then named with an extra "others" choice;
X-- 3) all named with an extra "others" choice;
X-- 4) correct aggregate with one element which is a record incorrectly
X--	specified as in 2).
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute C_ATTR of function is C_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
X
X	function F_D_REC ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return ( 1, 2, ( 1, C2=>F_INT, C3=>10, others=>20 ) );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end F_D_REC;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute C_ATTR of function is C_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
X
X	function F_D_REC ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return PAR;
X	end F_D_REC;
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X	variable V : E_RECORD ;
X
X  begin
X	if PAR /= ( F_INT, F_INT*2, 3, others=>-100 ) then
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X
X		return ( PAR.C1, PAR.C2, PAR.C3, others=>PAR.C3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	else
X		return ( F_INT, PAR.C1, PAR.C2, others=>PAR.C3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X  begin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
X    generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN;  
X		G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X    assert
X	PT_IN /= ('1',TRUE,others=>TRUE);
X -- SEMANTICS ERROR:  "others" does not represent any elements.
Xend E;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  
X  	G_BOOL : BOOLEAN;  
X	G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : C_RECORD ;
Xbegin
X	while F(V) /= (G_INT,2,3,others=>4) loop
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X		V := ( V.C1+1, V.C2+2, 3, others=>3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end loop;
X
X	PT_OUT <= (G_BIT,G_BOOL,others=>F_TRUE);
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port( PT_IN : 
X			in E_RECORD; 
X			PT_OUT : 
X			out E_RECORD );
X	end component ;
X begin
X--        C_1: C port  ( ('1',G_BOOL,others=>F_TRUE), PT_OUT ) ;
X        C_1: C port map  ( G_BOOL,others=>F_TRUE, PT_OUT ) ;
X-- SEMANTICS ERROR: "others" does not represent any elements.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2105a.vhdl-*-*
echo x - e-07-2-2-2106a.vhdl
sed 's/^X//' >e-07-2-2-2106a.vhdl <<'*-*-END-of-e-07-2-2-2106a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2106A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with more than one choice or with the
X-- choice "others" is allowed only if the elements specified are all of the 
X-- same type.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) the two elements are of types BIT and BOOLEAN;
X-- 2) the two elements are of types predefined integer and re-defined integer.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute D_ATTR of function is D_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : D_RECORD ) return D_RECORD is
X
X	variable V : E_RECORD ;
X
Xbegin
X	if PAR /= ( D1|D2=>F_INT, D3=>(1,2,3) ) then
X		-- SEMANTICS ERROR:  elements specified are of different types.
X
X		return ( D3=>(4,4,4), others=>PAR.D1 );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	else
X		return ( D3=>(-1,-1,-1), D1|D2=>F_INT );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	end if;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : D_RECORD ) return D_RECORD is
Xbegin
X	return PAR;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  G_BOOL : BOOLEAN;  G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X   assert
X	PT_IN /= (others=>TRUE);
X	-- SEMANTICS ERROR:  elements specified are of different types.
Xend E;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  G_BOOL : BOOLEAN;  G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : D_RECORD ;
X  begin
X	while F(V) /= ( D3=>(G_INT,2,3),others=>4) loop
X		-- SEMANTICS ERROR:  elements specified are of different types.
X		V := ( D3=>(1,1,1), others=>V.D1+1 );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	end loop;
X
X	PT_OUT <= (others=>F_TRUE);
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X
X	component C port  ( PT_IN : in E_RECORD; PT_OUT : out E_RECORD );
X	end component ;
X begin
X	C_1: C port map  ( others=>F_TRUE, PT_OUT ) ;
X	-- SEMANTICS ERROR:  elements specified are of different types.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2106a.vhdl-*-*
echo x - e-07-2-2-2107a.vhdl
sed 's/^X//' >e-07-2-2-2107a.vhdl <<'*-*-END-of-e-07-2-2-2107a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2107A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the expression of an element association must have the type of 
X-- the associated record element. Check for objects, literals, aggregates, 
X-- function calls.
X-- PS  7/21/84
X-- DB 7/22/85,9/5/85
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type A_RECORD is record	A : NEW_INT; end record;
X	type B_RECORD is record	B : NEW_INT; end record;
X	type C_RECORD is record	C : A_RECORD; end record;
X	type D_RECORD is record	D : BIT; end record;
X-- ?	attribute D_ATTR of entity,function is D_RECORD;
X-- ?	attribute A_ATTR of entity,function is A_RECORD;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
X  function F ( PAR : C_RECORD ) return C_RECORD is
X	variable V : A_RECORD ;
X  begin
X	if PAR /= (C=>(B=>10)) then
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X            return (C=>(B_RECORD'(B=>INTEGER'LOW)));
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X	else
X            return (others=>(B_RECORD'(B=>F_INT)));
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X	end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
Xbegin
X	return PAR;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
X         generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN; 
X		G_INT : INTEGER ) ;
X    port ( PT_IN : in D_RECORD; 
X           PT_OUT : out D_RECORD ) ;
Xbegin
X assert
X    PT_IN /= (others=>TRUE);
X    -- SEMANTICS ERROR:  element D is of type BIT.
Xend E;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
X         generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN;  
X		G_INT : INTEGER ) ;
X    port ( PT_IN : in D_RECORD; 
X           PT_OUT : out D_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:block
Xbegin
X process
X    variable V : C_RECORD;
X begin
X    V := F( (others=>(B=>10)) );
X    -- SEMANTICS ERROR:  element specified is of type A_RECORD.
X  while F(V) /= (C=>B_RECORD'(B=>1)) loop
X  -- SEMANTICS ERROR:  element C is of type A_RECORD.
X    V := ( F( (C=>(B=>1)) ) );
X    -- SEMANTICS ERROR:  element C is of type A_RECORD.
X  end loop;
X  PT_OUT <= (others=>F_TRUE);
X  -- SEMANTICS ERROR:  element specified is of type BIT.
X end process;
X-- end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:block
X  signal S : A_RECORD;
X  component C port ( PT_IN : in D_RECORD; PT_OUT : out D_RECORD );
X	end component ;
Xbegin
X  C_1: C port map ( others=>F_TRUE, PT_OUT ) ;
X    -- SEMANTICS ERROR:  element specified is of type BIT.
X  process
X  begin
X    S <= ( others=>G_INT );
X    -- SEMANTICS ERROR:  element specified is of type NEW_INT.
X  end process;
X-- end block;
Xend AB;
*-*-END-of-e-07-2-2-2107a.vhdl-*-*
echo x - e-07-2-2-2201a.vhdl
sed 's/^X//' >e-07-2-2-2201a.vhdl <<'*-*-END-of-e-07-2-2-2201a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2201A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each choice must specify a value of the index type.
X-- cases:
X-- 1) choice is an object of type BIT and the index type is BOOLEAN;
X-- 2) choices are the positional values of the (enumeration) index type;
X-- contexts:
X-- 1) variable assignment;
X-- 2) return statement;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X
X
X    function F return A_ARRAY is
X	variable V : B_ARRAY;
X    begin
X	V := ( 1=>550.0, others => 0.0 );
X	-- SEMANTICS ERROR:  choice is of type integer, index type is ENUM.
X	return A_ARRAY'( ('0' => 4, '1' => -10) );
X	-- SEMANTICS ERROR:  choice is of type Bit, index type is boolean.
X    end F;
X
Xend P;
*-*-END-of-e-07-2-2-2201a.vhdl-*-*
echo x - e-07-2-2-2202a.vhdl
sed 's/^X//' >e-07-2-2-2202a.vhdl <<'*-*-END-of-e-07-2-2-2202a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2202A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the expression of each element association of an n-dimensional
X-- array must be an (n-1) dimensional array or array aggregate with
X-- elements of the array element type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X    type A_ARRAY is array ( boolean range <>,integer range <>) of integer;
X    type B_ARRAY is array ( ENUM range <>, ENUM range <> ) of real;
X    type C_ARRAY is array ( integer range <>, integer range <>, 
X                   integer range <>, integer range <>) of character;
X 
X    subtype A_CON is A_ARRAY (FALSE to TRUE, 1 to 2);
X    subtype B_CON is B_ARRAY (ONE to TWO, FIVE to FIVE);
X    subtype C_CON is C_ARRAY ( 1 to 1, 2 to 2, 3 to 3, 4 to 4);             
X	
Xend P;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F(I : INTEGER) return A_CON is
X
Xbegin
X   if I = 1 then
X      return ( others => 3 );
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X   elsif I = 2 then
X      return ( FALSE => 
X                      ( 1 => 
X                           B_ARRAY'( ONE => 
X                                         ( FIVE => 2.0), 
X                                     TWO => 
X                                          (FIVE => 3.0)
X                                    ),
X                        2 => 
X                           B_ARRAY'( ONE => 
X                                         ( FIVE => 2.0), 
X                                     TWO => 
X                                          (FIVE => 3.0)
X                                    )
X                       )
X             );
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X   end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xprocedure PP is
X  variable AA : C_CON;
Xbegin
X  AA := ( 1 => "THIS IS A STRING");
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X  end PP;
Xend P ;
*-*-END-of-e-07-2-2-2202a.vhdl-*-*
echo x - e-07-2-2-2203a.vhdl
sed 's/^X//' >e-07-2-2-2203a.vhdl <<'*-*-END-of-e-07-2-2-2203a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2203A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that (aside from a final element association with the single choice
X-- "others") all element associations of an array aggregate must be either all
X-- positional or all named.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) mixed positional and named associations without an "others" association.
X-- contexts:
X-- 1) if statement;
X-- 2) variable assignment;
X-- 3) function return statement;
X-- 4) signal assignment;
X-- 5) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X	
X-- ?	attribute B_ATTR of function is B_ARRAY ;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
X
X	function to_integer(f : REAL) return INTEGER is
X	 begin
X		return 0;
X	end to_integer;
X
X	function to_real (i : INTEGER) return REAL is
X	 begin
X		return 0.0;
X	end to_real;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
X	variable V : B_ARRAY ;
Xbegin
X	if PAR /= (F_INT,TRUE=>F_INT) then
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X
X		V := (1.0,2.0,3.0,4.0,FIVE=>F_REAL);
X		-- SEMANTIC ERROR:  mixed positional and named associations.
X	end if;
X
X	return ( to_integer(V(ONE)), TRUE=> to_integer(V(TWO)) );
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X  end F;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
Xbegin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X          PT_OUT : out B_ARRAY ) ;
X
Xend E;
X 
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X	PT_OUT : out B_ARRAY ) ;
X
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : A_ARRAY;
Xbegin
X	V := F(( G_INT, TRUE=>G_INT ));
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X	PT_OUT <= (F_REAL, TWO|THREE|FOUR|FIVE=>G_REAL);
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port ( PT_IN : in B_ARRAY; PT_OUT : out B_ARRAY );
X	end component ;
X begin
X	C_1: C port map (
X	 1.0, FIVE=>5.0, THREE|TWO|FOUR=>0.0, PT_OUT );
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2203a.vhdl-*-*
echo x - e-07-2-2-2204a.vhdl
sed 's/^X//' >e-07-2-2-2204a.vhdl <<'*-*-END-of-e-07-2-2-2204a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2204A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that all choices (including "others") in an aggregate that has more
X-- than one element association or that has more than one choice in an element
X-- association must be static.
X-- PS  7/21/84
X-- DB 7/23/85
X-- cases:
X-- 1) one generic, one "others" choice in different associations for an array
X--	subtype with static index constraint (i.e. "others" choice is static);
X-- 2) two choices, one non-static, in the same association;
X-- 3) same as 1) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 4) same as 2) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range 1 to 10;
X        type NEW_IX is range 1 to 9;
X	type ARR is array ( NEW_INT'LEFT to NEW_INT'RIGHT ) of INTEGER;
X
X	function F( A : NEW_INT ) return ARR is
X          variable X : ARR;
X	begin
X          X := ( A=>999, others=>-1 );
X          --ERROR: nonstatic(formal) choice in multi-association array aggregate
X          return ( A|1|3=>1, others=>0 );
X          --ERROR: nonstatic(formal) choice in multi-choice array aggregate.
X	end F;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range 1 to 10;
X        type NEW_IX is range 1 to 9;
X	type ARR is array ( NEW_INT'LEFT to NEW_INT'RIGHT ) of INTEGER;
X
X	function F( A : NEW_INT ) return ARR is
X          variable X : ARR;
X	begin
X          X := ( others=>-1 );
X          return X;
X	end F;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric (A:NEW_INT) ;
X    port (PT:ARR) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X  signal S1: ARR;
X begin
X  process
X    variable X: ARR;
X  begin
X        S1 <= ( A|1|3=>1, 5=>2, others=>3);
X        --ERROR: nonstatic(dynamic) choice in multi-association array aggregate.
X        S1 <= ( A=>-5, others=>5 );
X        --ERROR: nonstatic(generic) choice in multi-association array aggregate.
X	S1 <= ( ARR'LEFT to NEW_IX'RIGHT|NEW_INT'RIGHT=>1 );
X	--ERROR: nonstatic(dynamic) choice in multi-choice array aggregate.
X        while X<=( A|1|3=>5, others=>1 ) loop
X        --ERROR: nonstatic(generic) choice in multi-choice array aggregate.
X          null;
X        end loop;
X    end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2204a.vhdl-*-*
echo x - e-07-2-2-2205a.vhdl
sed 's/^X//' >e-07-2-2-2205a.vhdl <<'*-*-END-of-e-07-2-2-2205a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2205A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in an aggregate without an "others" choice, every element in the
X-- array must be accounted for in the set of choices. Check for a positional
X-- aggregate assigned to a signal or variable array object. Check for a named
X-- association aggregate where there are gaps between the lower index bound and
X-- the upper index bound.
X-- cases:
X-- 1) positional aggregate with one missing element;
X-- 2) aggregate with two named associations which specify discrete ranges,
X--	and the two ranges cover the index range but with a gap between them.
X-- contexts:
X-- 1) variable assignment;
X-- 2) signal assignment statement;
X-- 3) function return statement;
X-- 4) if statement;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type B_ARRAY is array ( ENUM ) of real;
X	
X-- ?	attribute B_ATTR of function is B_ARRAY ;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F( PAR : B_ARRAY ) return B_ARRAY is
X
X        variable V : B_ARRAY ;
X
X   begin
X         if PAR /= (F_REAL,1.0,F_REAL,2.0 ) then
X        -- SEMANTIC ERROR : all elements not specified.
X
X             V := (1.0,2.0,4.0,5.0);
X              -- SEMANTIC ERROR : all elements not specified.
X
X        end if;
X
X        return (F_REAL,1.0,F_REAL,1.0);
X        -- SEMANTIC ERROR : all elements not specified.
X   
X   end F;
Xend P ;
X     
X-- with package P; 
Xuse P.all;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X 	PT_OUT : out B_ARRAY ) ;
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X  generic ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY;
X           PT_OUT : out B_ARRAY) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : B_ARRAY ;
X  begin
X	V := ( F_REAL, F_REAL, 5.332, G_REAL );
X	-- SEMANTIC ERROR:  last element not specified.
X
X	PT_OUT <= ( G_REAL, THREE to FIVE=> G_REAL );
X	-- SEMANTIC ERROR:  element TWO not specified.
X
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2205a.vhdl-*-*
echo x - e-07-2-2-2206a.vhdl
sed 's/^X//' >e-07-2-2-2206a.vhdl <<'*-*-END-of-e-07-2-2-2206a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2206A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a named association aggregate, no array element may have more
X-- than one associated expression.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) one element named twice in different associations;
X-- 2) one element named twice in different "or" associations;
X-- 3) one element named twice in the same "or" association.
X-- contexts:
X-- 1) assertion definition in an interface description;
X-- 2) return statement in a function;
X-- 3) port association;
X-- 4) signal assignment;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X        type C_ARRAY is array ( ENUM ) of integer;  
X	
X        constant MININT : INTEGER := INTEGER'LOW;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
Xbegin
X	return ( TRUE|TRUE=>F_INT, FALSE=>-27 );
X	-- SEMANTIC ERROR:  element TRUE specified twice.
X  end F;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xentity C  is
Xgeneric ( G_INT : integer;  G_REAL : real;
X	G_B_ARRAY : B_ARRAY  ) ;
X    port ( PT_IN : in A_ARRAY; PT_OUT : out B_ARRAY ) ;
Xend C;
X
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT_IN : in C_ARRAY; 
X	PT_OUT : out B_ARRAY ) ;
Xbegin
X   assert	PT_IN > ( ONE to FOUR=>MININT, THREE to FIVE=>MININT );
X	-- SEMANTIC ERROR:  elements THREE and FOUR specified twice.
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E is
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X        signal S : B_ARRAY;
X	component C port ( PT_IN : in A_ARRAY; PT_OUT : out B_ARRAY );
X	end component ;
Xbegin
X	for I in 1 to 5 generate
XL_X_2: 	     block
X             begin
X		C_1: C port map ( FALSE|TRUE=>I,FALSE=>I,
X				PT_OUT );
X	-- SEMANTIC ERROR:  element FALSE specified twice.
X	     end block;
X	end generate;
X  process
X  begin
X	S <= ( ONE=>0.4, TWO=>4.4, ONE=>0.4, others=>25.5 );
X	-- SEMANTIC ERROR:  element ONE specified twice.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2206a.vhdl-*-*
echo x - e-07-2-2-2207a.vhdl
sed 's/^X//' >e-07-2-2-2207a.vhdl <<'*-*-END-of-e-07-2-2-2207a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2207A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that there may be no more associations than there are elements in the
X-- array (pertains to positional association in contexts requiring fixed size
X-- array aggregates).
X-- cases:
X-- 1) positional aggregate of an array with fixed index type
X--	with an extra element.
X-- contexts:
X-- 1) variable assignment;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type B_ARRAY is array ( ENUM ) of real;
X	
X	function F_REAL( PAR : real ) return real is
X		variable V : B_ARRAY ;
X	begin
X		V := ( PAR, 0.0, PAR, 0.0, PAR, 0.0 );
X		-- SEMANTIC ERROR:  more associations than elements.
X		return 0.0;
X	end F_REAL;
Xend P;
*-*-END-of-e-07-2-2-2207a.vhdl-*-*
echo x - e-07-2-2-2208a.vhdl
sed 's/^X//' >e-07-2-2-2208a.vhdl <<'*-*-END-of-e-07-2-2-2208a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2208A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- actual parameter corresponding to an unconstrained formal parameter.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) actual parameter association;
X-- 2) variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	subtype A_CON is A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_ARRAY ) return A_CON is
X	begin	return (1,2,3,4);	end F_A;
X
X	function F_B ( PAR : B_ARRAY ) return B_CON is
X	begin	return (1.0, 2.0);	end F_B;
X
X	function F_C ( PAR : C_ARRAY ) return C_CON is
X	begin	return (ONE=>(ONE=>'0'));	        end F_C;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X
X	variable V_A : A_CON ;
X	variable V_B : B_CON ;
X	variable V_C : C_CON ;
X  begin
X	V_A := F_A( F_A( (1,2,others=>3) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X
X	V_B := F_B( F_B( (1.0,others=>2.0) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X
X	V_C := F_C( F_C( (ONE=>('1',others=>'0')) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2208a.vhdl-*-*
echo x - e-07-2-2-2209a.vhdl
sed 's/^X//' >e-07-2-2-2209a.vhdl <<'*-*-END-of-e-07-2-2-2209a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2209A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- return expression for a function returning an unconstrained array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	function F_A ( PAR : A_ARRAY ) return A_ARRAY is
X	begin	
X		return (1,2,3,others=>4);
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_A;
X
X	function F_B ( PAR : B_ARRAY ) return B_ARRAY is
X	begin	
X		return (others=>2.0);
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_B;
X
X	function F_C ( PAR : C_ARRAY ) return C_ARRAY is
X	begin	
X		return (others=>(ONE=>'0'));
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_C;
Xend P;
*-*-END-of-e-07-2-2-2209a.vhdl-*-*
echo x - e-07-2-2-2210a.vhdl
sed 's/^X//' >e-07-2-2-2210a.vhdl <<'*-*-END-of-e-07-2-2-2210a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2210A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- operand of a qualified expression whose type mark denotes an unconstrained
X-- array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) variable assignment statement;
X-- 2) return statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	
X
X	SUBTYPE A_CON IS A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_CON ) return A_CON is
X	begin	
X		return A_ARRAY'(1,2,3,others=>4);
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_A;
X
X	function F_B ( PAR : B_CON ) return B_CON is
X	begin
X		return B_ARRAY'(1.0,others=>2.0);
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_B;
X
X	function F_C ( PAR : C_CON ) return C_CON is
X	begin
X		return C_ARRAY'(others=>(ONE=>'0'));
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_C;
Xend P;
X
Xuse P2.all ;
Xpackage body P2 is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	subtype A_CON is A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_CON ) return A_CON is
X	begin	
X		return (1,2,3,4);
X	end F_A;
X
X	function F_B ( PAR : B_CON ) return B_CON is
X	begin
X		return (1.0,2.0);
X	end F_B;
X
X	function F_C ( PAR : C_CON ) return C_CON is
X	begin
X		return (ONE=>(ONE=>'0'));
X	end F_C;
Xend P2;
X
X
X-- with package P2;  
Xuse P2.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V_A : A_CON ;
X	variable V_B : B_CON ;
X	variable V_C : C_CON ;
X  begin
X	V_A := F_A( A_ARRAY'(1,2,others=>3) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X
X	V_B := F_B( B_ARRAY'(1.0,others=>2.0) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X
X	V_C := F_C( C_ARRAY'(ONE=>('1',others=>'0')) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2210a.vhdl-*-*
echo x - e-07-2-2-2211a.vhdl
sed 's/^X//' >e-07-2-2-2211a.vhdl <<'*-*-END-of-e-07-2-2-2211a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2211A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- 	Check that the direction of the index subtype of the aggregate
X--      array is the same as the direction of the index subtype of the 
X--      base type of the array.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CA_UP is UNCONSTRAINED_ARRAY ( 1 to 10 );
X        subtype CA_DOWN is UNCONSTRAINED_ARRAY (10 downto 1);
X
X	function F_ok (C1 : CA_UP) return CA_UP IS
X	    begin
X		 return CA_UP'((1 to 10 => 'B'));
X	end F_ok;
X
Xend P;
X
X-- with package P; 
X
Xuse P.all;
Xpackage body  P is
Xfunction F_bad (C : CA_UP) return CA_UP IS
X    begin
X	 return CA_DOWN'((1 to 10 => 'B'));
X	-- SEManTic ERRor : descending discrete range of 
X	--  aggragate conflicts with ascending range of return type
Xend F_bad;
X
*-*-END-of-e-07-2-2-2211a.vhdl-*-*
echo x - e-07-2-2-2212a.vhdl
sed 's/^X//' >e-07-2-2-2212a.vhdl <<'*-*-END-of-e-07-2-2-2212a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2212A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X--     Check that in a positional aggragate the leftmost bound
X--     is determined by the applicable index constraint or by
X--     S'LEFT where S is the index subtype of the base type of
X--     the array, and the rightmost bound is determined by the 
X--     direction of the index subtype and the number of elements.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse pp.all ;
Xpackage body pp is
X	type index_values is (one, two, three);
X	type ucarr is array (index_values range <>) of Boolean;
X	subtype carr is ucarr (index_values'low to index_values'high);
X
X	function f1 (i : integer) return carr is
X	begin
X	     return (True, index_values'LOW => TRUE, others => False);	
X		-- SEMANTIC ERROR : First element association specifies
X		--  index which is out of bounds for the array.
X        end f1;
X
X
X	function f2 (i : integer) return carr is
X	begin
X	     return (True, True, TRUE, False);
X		-- SEMANTIC ERROR : Last element association specifies
X		--  index which is out of bounds for the array.
X        end f2;
Xend pp;
X
X
*-*-END-of-e-07-2-2-2212a.vhdl-*-*
echo x - e-07-2-2-3001a.vhdl
sed 's/^X//' >e-07-2-2-3001a.vhdl <<'*-*-END-of-e-07-2-2-3001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the result of a function call is of the type specified in the
X-- definition of the function. Check for error cases here.
X-- JB  (DB 7/18/85)
X-- cases:
X-- The type expected from the context of the function call is different from
X--	the type specified in the definition of the function, for:
X-- 1) one type "derived" from the other, i.e. a new integer type;
X-- 2) two "similiar" types, i.e. record types whose definitions are identical;
X-- 3) two constrained arrays of the same unconstrained base type.
X-- contexts:
X-- 1) value returned by a function in the body of the function declaration.
X-- 2) boolean condition in if statement.
X-- 3) waveform expression in signal assignment statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 12 fn;	-- boxafiganewton
X		end units;
X	type UN_ARRAY is array ( ENUM range <> ) of CHARACTER;
X	subtype SMALL_ARRAY is UN_ARRAY ( TWO to THREE );
X	subtype LARGE_ARRAY is UN_ARRAY ( TWO to FOUR );
X	type A_RECORD is record
X			E : BIT;
X		end record;
X	type B_RECORD is record
X			E : BIT;
X		end record;
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
X	function F_NEW (	A : INTEGER; 
X				B : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return B;
X	end F_NEW;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : NEW_INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_UN (		A : UN_ARRAY;
X				B : CHARACTER ) return UN_ARRAY is
X	begin
X		return ( A'LEFT to A'RIGHT => ' ' );
X	end F_UN;
X
X	function F_SMALL (	A : SMALL_ARRAY ) return SMALL_ARRAY is
X	begin
X		return A;
X	end F_SMALL;
X
X	function F_AREC (	A : A_RECORD;
X				B : B_RECORD ) return A_RECORD is
X	begin
X		return A;
X	end F_AREC;
X
X        function F_BREC ( A : A_RECORD;
X                          B : B_RECORD  ) return B_RECORD is
X        begin
X            return B;
X        end F_BREC;
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xfunction F_WHATEVER ( A : INTEGER ) return INTEGER is
X    variable N : NEW_INTEGER;
Xbegin
X    N := F_NEW(1,42);
X    return F_NEW(1,1);  -- SEMANTIC ERROR:  Type of value returned by
X                        -- function call does not match expected type;
X                        -- context requires value of type INTEGER.
Xend F_WHATEVER;
Xend P ;
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xprocedure PROC (EL : inout ENUM; N : inout NEW_INTEGER) is
X    variable I : INTEGER;
X    variable X : REAL;
X    variable S : SNACK;
X    variable A : UN_ARRAY(ONE to FOUR);
Xbegin
X   EL := F_ENUM(ONE, THREE);
X   N := F_NEW(I, N);
X   S := F_SNACK(X, N, S);
X   A := F_UN(A, 'A');
X   X := F_REAL(X, X, X, X);
X
X   I := F_NEW(I, N);  -- SEMANTIC ERROR:  Type of value returned by function
X                      --   call on right-hand side of assignment does not
X                      --   match type of object on left-hand side.
X   if X = F_ENUM(THREE, FOUR) then
X        -- SEMANTIC ERROR:  Type of value returned by function call on
X        --   right-hand side of Boolean expression does not match
X        --   type of object on left-hand side.
X        return;
X    end if;
X  end PROC;
Xend P ;
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT : out B_RECORD) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : LARGE_ARRAY;
X  begin	
X         V := ( 'a', 'b', 'c' );
X	 if V = F_SMALL( ('A','B') ) then
X              return;
X         end if;
X
X         V := F_SMALL( ('A','B') );  -- SEMANTIC ERROR: Type of value returned
X                                     --   by the funciton call is of the same
X                                     --   base type as the variable on the
X                                     --   left-hand side of the assignment;
X                                     --   however, the arrays are not of the
X                                     --   same length.
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:  block
X  begin
X   process
X   begin
X        PT <= F_BREC((E=>'1'),(E=>'0'));
X
X	PT <= F_AREC((E=>'1'),(E=>'0'));
X	-- SEMANTIC ERROR:  Type of value returned by function
X        --   call does not match expected type;
X	--   context requires value of type B_RECORD.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-3001a.vhdl-*-*
echo x - e-07-2-2-3002a.vhdl
sed 's/^X//' >e-07-2-2-3002a.vhdl <<'*-*-END-of-e-07-2-2-3002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a function call the type of each argument in the argument list
X-- must be compatible with the type of the corresponding input parameter in the
X-- definition of the function. Check for positional inversion of arguments.
X-- JB  (DB 7/18/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 144 fn;	-- boxafiganewton
X		end units;
X	type UN_ARRAY is array ( ENUM range <> ) of CHARACTER;
X	subtype SMALL_ARRAY is UN_ARRAY ( TWO to THREE );
X	subtype LARGE_ARRAY is UN_ARRAY ( TWO to FOUR );
X	type A_RECORD is record
X			E : BIT;
X		end record;
X	type B_RECORD is record
X			E : BIT;
X		end record;
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
X	function F_NEW (	A : INTEGER; 
X				B : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return B;
X	end F_NEW;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : NEW_INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_UN (		A : UN_ARRAY;
X				B : CHARACTER ) return UN_ARRAY is
X	begin
X		return ( A'LEFT to A'RIGHT => ' ' );
X	end F_UN;
X
X	function F_SMALL (	A : SMALL_ARRAY ) return SMALL_ARRAY is
X	begin
X		return A;
X	end F_SMALL;
X
X	function F_AREC (	A : A_RECORD ) return A_RECORD is
X	begin
X		return A;
X	end F_AREC;
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage P2 is
X	subtype NEW_ARRAY is 
X		UN_ARRAY( F_NEW(A=>NEW_INTEGER'(1),B=>INTEGER'(2)) to FOUR );
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
Xend P2;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction WHATEVER ( A,B : INTEGER ) return INTEGER is
Xbegin
X	return F_NEW(A,B);
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
X  end WHATEVER;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1 : in A_RECORD; PT2 : out A_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SMALL_ARRAY;
X     begin
X        A := ('a', 'b');
X     
X	for CHAR in CHARACTER'LEFT to CHARACTER'RIGHT loop
X		exit when F_UN( CHAR, A ) /= A;
X		-- SEMANTIC ERROR:  types of arguments incompatible with
X		--	types of parameters.
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X-- with package P; 
Xuse P.all;
Xentity C  is
X    port ( PT1 : in A_RECORD; PT2 : in B_RECORD ) ;
Xend C;
X
X
Xarchitecture AB of C is
X-- L_X_2: block
X   component C port  (X, Y : A_RECORD);
X	end component ;
X begin
X	NEW_COMP : C port map ( F_AREC(PT1), F_AREC(PT2) );
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-3002a.vhdl-*-*
echo x - e-07-2-2-4001a.vhdl
sed 's/^X//' >e-07-2-2-4001a.vhdl <<'*-*-END-of-e-07-2-2-4001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-4001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the operand must have the same type as the base type of the type
X-- mark.
X-- cases:
X-- 1) a boolean expression with type bit;
X-- 2) object of an "identical" record type.
X-- contexts:
X-- 1) function return statement;
X-- 2) port declaration;
X-- 3) signal assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type A_REC is record	E : integer;	end record;
X	type B_REC is record	E : integer;	end record;
Xend P;
X
Xuse P.all ;
Xpackage body P is
Xfunction F1 ( PARAM : bit ) return boolean is
Xbegin
X	return boolean'(PARAM);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
Xend F1;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F2 ( PARAM : A_REC ) return B_REC is
Xbegin
X	return B_REC'(PARAM);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
Xend F2;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X  generic ( G_BOOL : boolean; G_BREC : B_REC ) ;
X    port ( OUT_BIT : out bit ;  OUT_A : out A_REC ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	OUT_BIT <= bit'(G_BOOL);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
X
X	OUT_A <= A_REC'(G_BREC);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-4001a.vhdl-*-*
echo x - e-07-2-3-0001a.vhdl
sed 's/^X//' >e-07-2-3-0001a.vhdl <<'*-*-END-of-e-07-2-3-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary arithmetic operators + and - are not defined for any
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A + B;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A - B;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A + B;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end H;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return B;
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return B;
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package  P;  use P.all;
Xentity E is
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A,B : SINGLE_NUMERIC_ARRAY;
X	variable R,S : SINGLE_NUMERIC_RECORD;
X	variable E,D : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable BB : BOOLEAN;
X  begin
X	A := F(B,A) - F(A,B);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	R := G(R,S) + G(S,R);
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	E := H(E,D) - H(D,E);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	E := ONE + TWO;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	C := 'C' - 'D';
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	BB := TRUE + TRUE;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X        return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0001a.vhdl-*-*
echo x - e-07-2-3-0002a.vhdl
sed 's/^X//' >e-07-2-3-0002a.vhdl <<'*-*-END-of-e-07-2-3-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the two operands of the binary arithmetic operators + and - must
X-- be of the same base type. Check for objects, literals, function calls.
X-- cases:
X-- 1) re-defined integer types;
X-- 2) re-defined real types;
X-- 3) re-defined time types.
X-- contexts:
X-- 1) function return statements (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INT_1 is range integer'left to integer'right;
X	type NEW_INT_2 is range integer'left to integer'right;
X
X	type NEW_REAL_1 is range real'left to real'right;
X	type NEW_REAL_2 is range real'left to real'right;
X
X	type NEW_TIME_1 is range 1 to 1E20
X		units
X			FS;
X			PS = 1000 FS;
X			NS = 1000 PS;
X			US = 1000 NS;
X			MS = 1000 US;
X			S  = 1000 MS;
X			MIN = 60 S;
X			HR = 60 MIN;
X		end units;
X
X	function F_INT ( A : integer; B : NEW_INT_1 ) return integer is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_INT;
X
X	function F_NINT_1 ( A : NEW_INT_1; B : NEW_INT_2 ) return NEW_INT_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NINT_1;
X
X	function F_REAL ( A : REAL; B : NEW_REAL_1 ) return REAL is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_REAL;
X
X	function F_NREAL_1 ( A:NEW_REAL_1; B:NEW_REAL_2 ) return NEW_REAL_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NREAL_1;
X
X	function F_TIME ( A : time; B : NEW_TIME_1 ) return time is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_TIME;
X
X	function F_NTIME_1 ( A:NEW_TIME_1; B:TIME ) return NEW_TIME_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NTIME_1;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INT_1 is range integer'left to integer'right;
X	type NEW_INT_2 is range integer'left to integer'right;
X
X	type NEW_REAL_1 is range real'left to real'right;
X	type NEW_REAL_2 is range real'left to real'right;
X
X	type NEW_TIME_1 is range 1 to 1E20
X		units
X			FS;
X			PS = 1000 FS;
X			NS = 1000 PS;
X			US = 1000 NS;
X			MS = 1000 US;
X			S  = 1000 MS;
X			MIN = 60 S;
X			HR = 60 MIN;
X		end units;
X
X	function F_INT ( A : integer; B : NEW_INT_1 ) return integer is
X	begin
X		return A;
X	end F_INT;
X
X	function F_NINT_1 ( A : NEW_INT_1; B : NEW_INT_2 ) return NEW_INT_1 is
X	begin
X		return A;
X	end F_NINT_1;
X
X	function F_REAL ( A : REAL; B : NEW_REAL_1 ) return REAL is
X	begin
X		return A;
X	end F_REAL;
X
X	function F_NREAL_1 ( A:NEW_REAL_1; B:NEW_REAL_2 ) return NEW_REAL_1 is
X	begin
X		return A;
X	end F_NREAL_1;
X
X	function F_TIME ( A : time; B : NEW_TIME_1 ) return time is
X	begin
X		return A;
X	end F_TIME;
X
X	function F_NTIME_1 ( A:NEW_TIME_1; B:TIME ) return NEW_TIME_1 is
X	begin
X		return A;
X	end F_NTIME_1;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : INTEGER	:= 1 + 1.0;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable B : NEW_INT_1	:= 1 + 1 P.S;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable C : NEW_INT_2	:= 1 - 8.34;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X
X	variable I : REAL	:= 0.0 - 1;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable J : NEW_REAL_1	:= 0.0 + 35 P.MS;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable K : NEW_REAL_2	:= 0.0 - 5 STANDARD.HR;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X
X	variable Q : TIME	:= 0 STANDARD.S + 5.3;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable R : NEW_TIME_1	:= 0  - 8033;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable X : TIME	:= 0 P.S + 'C';
X		--SEMANTIC ERROR:  operands must be of the same base type.
X  begin
X	A := A + C;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	A := F_INT(A,B) - F_NINT_1(B,C);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	C := B - C;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X
X	I := I + K;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	I := F_REAL(I,J) - F_NREAL_1(J,K);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	K := J - K;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X
X	Q := Q + X;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	Q := F_TIME(Q,R) - F_NTIME_1(R,X);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	X := R - X;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0002a.vhdl-*-*
echo x - e-07-2-3-0003a.vhdl
sed 's/^X//' >e-07-2-3-0003a.vhdl <<'*-*-END-of-e-07-2-3-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of the concatenation operator & is an array,
X-- then the other operand must be an array of the same type or an object or
X-- value of the type of the array element. Check that in this case, the result
X-- is the same type as the array operand. Check for objects, literals,
X-- aggregates, function calls.
X-- cases:
X-- 1) array of boolean & array of boolean of different array type;
X-- 2) array of boolean & bit literal;
X-- 3) array of boolean & bit object;
X-- 4) array of integer & object of different integer type;
X-- 5) array of record & aggregate of similiar record type;
X-- 6) array of integer & function call of different integer type.
X-- contexts:  actual parameter association in variable declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type REC is record	E1,E2 : boolean;	end record;
X	type REC1 is record	E1,E2 : bit;		end record;
X
X	type A_ARRAY is array ( integer range <> ) of boolean;
X	type B_ARRAY is array ( integer range <> ) of integer;
X	type C_ARRAY is array ( integer range <> ) of REC;
X	type D_ARRAY is array ( integer range <> ) of boolean;
X
X	function F_INT return NEW_INT is
X	begin	return 1;
X	end F_INT;
X
X	function F_A ( PARAM : A_ARRAY ) return boolean is
X	begin
X		return TRUE;
X	end F_A;
X
X	function F_B ( PARAM : B_ARRAY ) return integer is
X	begin
X		return 0;
X	end F_B;
X
X	function F_C ( PARAM : C_ARRAY ) return REC is
X	begin
X		return ( TRUE, FALSE );
X	end F_C;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : A_ARRAY(1 to 5);
X	variable B : B_ARRAY(0 to 2);
X	variable C : C_ARRAY(-1 to 0);
X	variable D : D_ARRAY(1 to 5);
X
X	constant X : bit := '0';
X	constant Y : NEW_INT := 1;
X
X	variable V1 : boolean;
X	variable V2 : boolean;
X	variable V3 : boolean;
X	variable V4 : integer;
X	variable V5 : REC;
X	variable V6 : integer;
X  begin
X	V1 := F_A( A & D );
X	-- SEMANTIC ERROR:  A and D are of different array types.
X
X	V2 := F_A( '1' & A );
X	-- SEMANTIC ERROR:  '1' is not of the element type of A.
X
X	V3 := F_A( A & X );
X	-- SEMANTIC ERROR:  X is not of the element type of A.
X
X	V4 := F_B( B & Y );
X	-- SEMANTIC ERROR:  Y is not of the element type of B.
X
X	V5 := F_C( (E1=>'1',E2=>'0') & C );
X	-- SEMANTIC ERROR:  aggregate is not of the element type of C.
X
X	V6 := F_B( F_INT & B );
X	-- SEMANTIC ERROR:  F_INT is not of the element type of B.
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0003a.vhdl-*-*
echo x - e-07-2-3-0004a.vhdl
sed 's/^X//' >e-07-2-3-0004a.vhdl <<'*-*-END-of-e-07-2-3-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if neither operand of the concatenation operator & is an array,
X-- then they must be objects or values of the same type. Check that in this
X-- case, the result is an array whose element type is the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:
X-- 1) bit & boolean where result should be array of boolean;
X-- 2) integer & re-defined integer where result should be array of integer;
X-- 3) simple record & similiar record where result should be array of simple;
X-- 4) bit & bit where result should be array of boolean.
X-- contexts:  actual parameter association in variable declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type REC1 is record	E1,E2 : boolean;	end record;
X	type REC2 is record	E1,E2 : bit;		end record;
X
X	type A_ARRAY is array ( integer range <> ) of boolean;
X	type B_ARRAY is array ( integer range <> ) of integer;
X	type C_ARRAY is array ( integer range <> ) of REC1;
X  
X	function F_INT return integer is
X	begin	return 1;	end F_INT;
X
X	function F_A ( PARAM : A_ARRAY ) return boolean is
X	begin
X		return TRUE;
X	end F_A;
X
X	function F_B ( PARAM : B_ARRAY ) return integer is
X	begin
X		return 0;
X	end F_B;
X
X	function F_C ( PARAM : C_ARRAY ) return REC1 is
X	begin
X		return ( TRUE, FALSE );
X	end F_C;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	constant X : bit := '0';
X	constant Y : NEW_INT := 1;
X
X	variable V1 : boolean := F_A( TRUE & X );
X	-- SEMANTIC ERROR:  TRUE and X are of different types.
X
X	variable V2 : boolean := F_A( F_INT & Y );
X	-- SEMANTIC ERROR:  F_INT and Y are of different types.
X
X	variable V5 : REC1;
X
X	variable V6 : integer := F_A( X & '0' );
X	-- SEMANTIC ERROR:  boolean array expected.
X  begin
X	V5 := F_C(REC2'(E1=>'1',E2=>'0') & REC1'(E1|E2=>TRUE) );
X	-- SEMANTIC ERROR:  aggregates are of different types.
X
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0004a.vhdl-*-*
echo x - e-07-2-3-0005a.vhdl
sed 's/^X//' >e-07-2-3-0005a.vhdl <<'*-*-END-of-e-07-2-3-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary arithmetic operators +, and - are not defined for
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return -A;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return +A;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end H;
X
Xend P;
X
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A;
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable R : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable B : BOOLEAN;
X  begin
X	A := (1=>0.0);
X	R := (E=>0);
X	A := +F(A);
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	E := -H(E);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	E := +ONE;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	B := -TRUE;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0005a.vhdl-*-*
echo x - e-07-2-3-0006a.vhdl
sed 's/^X//' >e-07-2-3-0006a.vhdl <<'*-*-END-of-e-07-2-3-0006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a signed operator cannot follow an adding operator or a
X-- multiplying operator or a miscellaneous operator (**, abs) or
X-- the logical operator not.
X-- cases:  expressions involving real and integer objects.
X-- contexts:  variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X  
X        type A_ARRAY is array (1 to 2) of CHARACTER;
X
Xend P;
X
X-- with package P; use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable I : INTEGER;
X	variable R : REAL;
X        variable B : BOOLEAN;
X        variable A : A_ARRAY;
X
X  begin
X	R := R + - R;
X	-- SYNTAX ERROR:  signed operator cannot follow adding operator.
X
X        R := R - - R;
X        -- SYNTAX ERROR:  signed operator cannot follow adding operator.
X
X        A(1 to 2) := A(1) & - A(2);
X
X	R := R * + R;
X	-- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        R := R / - R;
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        I := I mod + I;   
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        R := I rem - I;
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X	R := R ** + I;
X	-- SYNTAX ERROR:  signed operator cannot follow misc. operator.
X
X	R := abs - R;
X	-- SYNTAX ERROR:  signed operator cannot follow misc.  operator.
X
X        B := not - B;
X        -- SYNTAX ERROR:  signed operator cannot follow logical operator.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0006a.vhdl-*-*
echo x - e-07-2-4-0001a.vhdl
sed 's/^X//' >e-07-2-4-0001a.vhdl <<'*-*-END-of-e-07-2-4-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary operators mod and rem are not defined for 
X-- operands of other than integer type.  Check for objects, literals and
X-- function calls.
X-- cases:
X-- try operands of type real, time, character, bit, records with 1 integer
X--	element, 1x1 arrays of integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F1 (A,B : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F1;
X
X	function F2 (A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F2;
X
X	function F3 ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F3;
X
X	function F4 ( A,B : REAL ) return REAL is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F4;
X
X	function F5 ( A,B : TIME ) return TIME is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F5;
X
X	function F6 ( A,B : CHARACTER ) return CHARACTER is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F6;
X
X	function F7 ( A,B : BIT ) return BIT is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F7;
X
Xend P;
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F1 (A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A ;
X	end F1;
X
X	function F2 (A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A ;
X	end F2;
X
X	function F3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A ;
X	end F3;
X
X	function F4 ( A : REAL ) return REAL is
X	begin
X		return A ;
X	end F4;
X
X	function F5 ( A : TIME ) return TIME is
X	begin
X		return A ;
X	end F5;
X
X	function F6 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A ;
X	end F6;
X
X	function F7 ( A : BIT ) return BIT is
X	begin
X		return A ;
X	end F7;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable I : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable R : REAL := 0.0;
X	variable T : TIME := 0 S;
X	variable C : CHARACTER := 'A';
X	variable B : BIT := '0';
Xbegin
X	A := (1=>0);
X	I := (E=>0);
X	A := F1(A) rem A;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	I := F2(I) mod I;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	E := E rem F3(E);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	E := FOUR mod ONE;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	R := R rem F4(R);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	
X	R := 10.0 mod 4.3;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	T := F5(T) mod T;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	T := 100 S rem 1 HR;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	C := C rem F6(C);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	C := 'C' mod 'H';
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	B := F7(B) mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	B := '1' rem '0';
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0001a.vhdl-*-*
echo x - e-07-2-4-0002a.vhdl
sed 's/^X//' >e-07-2-4-0002a.vhdl <<'*-*-END-of-e-07-2-4-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the operands of the binary arithmetic operators * and / cannot be
X-- non-numeric. Check for objects, literals, function calls.
X-- cases:  
X-- 1) enumeration type;
X-- 2) record with one numeric element;
X-- 3) array with one numeric element;
X-- 4) character and boolean literals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A / B;
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X	end H;
X
Xend P;
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A;
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A;
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A,B : SINGLE_NUMERIC_ARRAY;
X	variable R,S : SINGLE_NUMERIC_RECORD;
X	variable E,D : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable BOOL : BOOLEAN;
X  begin
X	A := F(B,A) / F(A,B);
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	R := G(R,S) * G(S,R);
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X
X	E := H(E,D) / H(D,E);
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	E := ONE * TWO;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X
X	C := 'C' / 'D';
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	BOOL := TRUE * TRUE;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0002a.vhdl-*-*
echo x - e-07-2-4-0003a.vhdl
sed 's/^X//' >e-07-2-4-0003a.vhdl <<'*-*-END-of-e-07-2-4-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of the binary arithmetic operators * and / is
X-- floating point the other cannot be an integer. Check for objects, literals,
X-- function calls.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F ( A : REAL; B : INTEGER ) return REAL is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X	end F;
X
X	function G ( A : INTEGER; B : REAL ) return INTEGER is
X	begin
X		return A/B;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X	end G;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	function F ( A : REAL; B : INTEGER ) return REAL is
X	begin
X		return A;
X	end F;
X
X	function G ( A : INTEGER; B : REAL ) return INTEGER is
X	begin
X		return A;
X	end G;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : REAL	:= 0.0;
X	variable B : INTEGER	:= 0;
X  begin
X	A := F(A,B) * G(B,A);
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X
X	A := 1.0 / 10;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0003a.vhdl-*-*
echo x - e-07-2-4-0004a.vhdl
sed 's/^X//' >e-07-2-4-0004a.vhdl <<'*-*-END-of-e-07-2-4-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of * is a physical type, the other must be an
X-- integer or a floating point type. Check for objects, literals, function
X-- calls.
X-- cases:  try for enumeration, 1x1 array of real, 1 element
X--	record of integer, another physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end I;
X
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end I;
X
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable R : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable T : TIME := 1 S;
X	variable D : DISTANCE := 1 FURLONG;
X  begin
X	T := T * 10 S;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := 1 MS * F(A);
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := F(R) * 993 MS;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := F(E) * 1 HR;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := ONE * 1 MIN;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	D := T * 1 FURLONG;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0004a.vhdl-*-*
echo x - e-07-2-4-0005a.vhdl
sed 's/^X//' >e-07-2-4-0005a.vhdl <<'*-*-END-of-e-07-2-4-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the right operand of / is a physical type, the left operand
X-- must be the same type (cannot be an integer or a floating point type). Check
X-- cases:  enumeration, real, integer, a different physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals, function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : REAL ) return REAL is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end F;
X
X	function G ( A : INTEGER ) return INTEGER is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end I;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : REAL ) return REAL is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end F;
X
X	function G ( A : INTEGER ) return INTEGER is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end I;
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : REAL := 0.0;
X	variable R : INTEGER := 0;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable T : TIME := 1 S;
X	variable D : DISTANCE := 1 FURLONG;
X  begin
X	A := T / F(A);
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	R := 1 MS / G(R);
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	E := H(E) / 993 MS;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	T := ONE / T;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	A := 1.0 / 1 MIN;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	A := T / 1 FURLONG;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0005a.vhdl-*-*
echo x - e-07-3-5-0001a.vhdl
sed 's/^X//' >e-07-3-5-0001a.vhdl <<'*-*-END-of-e-07-3-5-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-03-3-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that type conversion cannot occur on an operand of any type
X-- but universal integer or universal real on an operand of any type 
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture BB of E is
Xbegin
XL_X_1: block 
X begin
X process
X  type X1 is range 1.0 to 100.0 ;
X  type X2 is  range 1.0 to 100.0 ;
X  type I1 is  range 1 to 1000000;
X  type I2 is  range  1 to 10000000 ;
X  variable RE1 : X1 ;
X  variable RE2 : X2 ;
X  variable IN1 : I1 ;
X  variable IN2 : I2 ;
X begin
X   RE1 := RE2 + RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X   IN1 := IN2 + IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X   
X   RE1 := RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE2 := RE2 * RE1 ;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN1 * IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE2 := RE1/RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN1/IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN2 - IN1;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE1 := RE2 - RE1;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X  end process;
X end block;
Xend BB;
*-*-END-of-e-07-3-5-0001a.vhdl-*-*
echo x - e-07-4-0-0001a.vhdl
sed 's/^X//' >e-07-4-0-0001a.vhdl <<'*-*-END-of-e-07-4-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the association list must specify exactly one actual part
X-- for each formal part of the corresponding interface list that does not 
X-- have a default expression. Check for the case where one formal part has
X-- more than one actual part. Check for the case where one formal part
X-- that does not have a default value does not have an actual part.
X-- cases:
X-- 1) more than one parameter association is specified for a formal parameter;
X-- 2) a formal parameter without default value does not have a parameter
X--	association;
X-- contexts:
X-- 1) range constraint in a real subtype declaration
X-- 2) signal assignment statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 12 fn;	-- boxafiganewton
X		end units;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_REAL ( A,B,C : REAL; D : REAL := 4.0 ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT : out SNACK) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype R is REAL range REAL'LEFT to F_REAL( 1.0, 2.0, 3.0, B=>4.0 );
X	-- SEMANTIC ERROR:  more than one association specified for
X	--	formal parameter B.  (case 1, context 1)
X  begin
X	PT <= F_SNACK(B=>5);
X	-- SEMANTIC ERROR:  formal parameter without default value does
X	--	not have a parameter association.  (case 2, context 2)
X	return;
X  end process;
X--  end block;
Xen

grout@sunburn (07/14/88)

This is Chapter 07 of a 1076-1987 VHDL test suite which was
translated from an 7.2 VHDL version test suite developed by
Intermetrics under funding by the DoD.  These tests have been
verified todate mainly against a VHDL 'recognizer' so they may
yet have problems with VHDL semantics.  They consist of two
classes of tests,

  ERROR Tests: - names which start with 'e' should result in VHDL errors
   at the spot where there is a comment about error being expected.

  SIMPLE Tests: - names which start with 's' should analyze or compile cleanly.

These tests are being shared back to industry in hopes of getting together
a joint set of tests, checked out and verified, which we can all use to 
make sure our various VHDL CAD tools work correctly.

Your comments and especially constructive criticism is urgently requested
via any way we can get it.  All replies and resulting changes/updates will
be posted back to the same places these tests were originally posted.

Thanks for your support!

--Steve Grout, MCC CAD Program. (512)338-3516, grout@mcc.com


---- Cut Here and unpack ----
#!/bin/sh
#
# This is a 'shar' archive.  Cut out everything above the line
# and unpack them with /bin/sh, i.e., using a command like:
#     % sh < {the contents of this message after cutting}
#
#
echo "--------------------------------------------------"
echo "Starting to extract Chapter 07 of a 1076-1987 VHDL"
echo "    translated DoD/Intermetrics test suite...."
echo "--------------------------------------------------"
echo x - TEST-SYNOPSIS.text
sed 's/^X//' >TEST-SYNOPSIS.text <<'*-*-END-of-TEST-SYNOPSIS.text-*-*'
X------------------------------------------------------------------------
XChapter: 07-Expressions
X------------------------------------------------------------------------
X
X
X------------------------------------------------------------------------
X  Paragraph:  Expressions - 7.1
X------------------------------------------------------------------------
XTest:       e-07-1-0-0001a.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for types and entities.
X-- types can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- 5) function declarative part
X-- 6) function statement part
X-- 7) package
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 5) attribute specification in a function declaration
X-- 6) return statement in a function
X-- 7) default value in formal parameter list of function declaration in package
XTest:       e-07-1-0-0001b.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for entities only.
X-- entities can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
XTest:       e-07-1-0-0001c.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for bodies only.
X-- bodies can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of architecture body statement)
X-- 3) body declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
XTest:       e-07-1-0-0001d.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for component labels only.
X-- component labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
XTest:       e-07-1-0-0001e.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for generate labels only.
X-- generate labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
XTest:       e-07-1-0-0001f.vhdl
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- note:  in this file, tests for loop labels only.
X-- loop labels can be visible in the following scopes:
X-- 1) loop statement (as particular example of beh. body statement)
X-- specific contexts:
X-- 1) exit statement in loop statement
XTest:       s-07-1-0-0001a.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of simple name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architectural body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001b.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of selected name
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001c.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of indexed name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001d.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of slice name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in archit. body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can a slice name be used in these contexts?
XTest:       s-07-1-0-0001e.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of qualified expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001f.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of attribute name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001g.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of literal.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in behavioral body;
X-- 3) return statement in function in package;oop in arch. body;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001h.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of aggregate.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can an aggregate be used as a primary in these contexts?
XTest:       s-07-1-0-0001i.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of function call.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
XTest:       s-07-1-0-0001j.vhdl
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- case of parenthesized expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X
X------------------------------------------------------------------------
X  Paragraph:  Operators - 7.2 
X------------------------------------------------------------------------
XTest:       e-07-2-0-0001a.vhdl
X-- Check that operators have the correct precedence. This is an indirect check
X-- using semantic error processing. The idea is that 'integer + real * real'
X-- should produce an error message stating that the operands of '+' are
X-- incompatible, while 'integer + real * real' should produce an error message
X-- stating that the operands of '*' are incompatible. Check for logical vs.
X-- relational, relational vs. adding, adding vs. multiplying, multiplying vs.
X-- miscellaneous. 
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence. 
X-- cases:
X-- 1) logical and relational operators with boolean literals;
X-- 2) relational and adding operators with boolean and integer literals;
X-- 3) adding and multiplying operators with integer and real literals;
X-- 4) multiplying and miscellaneous operators with integer and real literals.
XTest:       e-07-2-0-0002a.vhdl
X-- Check that operators of the same precedence associate left to right. This is
X-- an indirect check using semantic error processing. The idea is that 'integer
X-- + integer - real' should produce an error message stating that the operands
X-- of '-' are incompatible, while 'integer + real - integer' should produce an
X-- error message stating that the operands of '+' are incompatible (and 
X-- possibly another message about incompatible operands of '-'). Check for 
X-- logical, relational, adding, multiplying. Check when operands are 
X-- function calls.
X-- Questions:  
X-- 1) I don't know how to check when operands are function calls.
X-- 2) It seems that a series of relational expressions is not legal.
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence.  NOTE:  this does NOT allow the check for
X-- function calls.
X-- cases:
X-- 1) logical operators with boolean literals;
X-- 2) relational operators with boolean literals;
X-- 3) adding operators with integer literals;
X-- 4) multiplying with integer literals.
X
X------------------------------------------------------------------------
X  Paragraph:  Logical Operators - 7.2.1
X------------------------------------------------------------------------
XTest:       e-07-2-1-0001a.vhdl
X-- Check that the logical operators (and, or, xor, nor, nand, not) 
X-- are not defined for scalar types other than BOOLEAN or BIT.
X-- cases:  literals and objects of all predefined scalar types
X--	and an enumeration type..
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0002a.vhdl
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for record types. Check for record types with single BOOLEAN or
X-- BIT element.
X-- cases:  aggregate and objects of:
X-- 1) simple record with single boolean element;
X-- 2) simple record with single bit element.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0003a.vhdl
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for multi-dimensional arrays of BOOLEAN or BIT. Check for (1x1)
X-- arrays.
X-- cases:
X-- 1) 1x1 array of bit;
X-- 2) 1x1 array of boolean.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
XTest:       e-07-2-1-0004a.vhdl
X-- Check that the binary logical operators (and, or, xor)
X-- are not defined for arrays of different lengths. Check where one or both 
X-- operands are aggregates or concatenated sequences. 
X-- cases:  objects, aggregates, and concatenated sequences.
X-- contexts:  variable assignment.
XTest:       s-07-2-1-0001a.vhdl
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for any BOOLEAN or BIT type.
X-- cases:  objects, literals, and function calls of types boolean and bit.
X-- contexts:
X-- 1) condition in generation scheme of an if- generation statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
XTest:       s-07-2-1-0002a.vhdl
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for one-dimensional arrays of any BOOLEAN or BIT type (if the arrays
X-- are of the same length), and that the result is an array of the same type.
X-- Check where one or both operands are aggregates or concatenated sequences.
X-- cases:
X-- 1) aggregate and concatenated sequence of BIT
X-- 2) concatenated sequence and array function result of BOOLEAN
X-- 3) two objects of the same length but different index ranges.
X-- contexts:
X-- 1) condition in iteration scheme of an loop_statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
XTest:       s-07-2-1-0003a.vhdl
X-- Check that static expressions formed with the logical operators have the
X-- correct static value.
X-- cases:
X-- 1) bit literal expression
X-- 2) boolean literal expression
X-- contexts:
X-- 1) choice in case statement in a generate loop
X
X------------------------------------------------------------------------
X  Paragraph:  Relational Operators - 7.2.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-0001a.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of record types only.  Others in ...B & ...C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) record with single discrete element;
X-- 2) homogeneous record.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
XTest:       e-07-2-2-0001b.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of multi-dimensional array types only.  Others in  to .A &  to .
X-- cases:  objects, aggregates, and function calls of
X-- multi-dimensional array of discrete type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) if statement (objects);
X-- 3) variable declaration (aggregates);
X-- 4) signal assignment (function calls);
XTest:       e-07-2-2-0001c.vhdl
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of one dimensional arrays only.  Others in  to .A &  to .C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) array of arrays;
X-- 2) array of records;
X-- 3) array of floating point.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
XTest:       s-07-2-2-0001a.vhdl
X-- Check that the relational operators = and /= are defined for all types. 
X-- Check for objects, function calls, literals, aggregates and concatenated
X-- sequences.
X-- cases:  (19)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
X-- record -- objects, function calls, aggregates
XTest:       s-07-2-2-0002a.vhdl
X-- Check that the relational operators <, <=, >, >= are defined for all scalar
X-- types and for all one-dimensional arrays whose elements are of a discrete
X-- type. Check for objects, function calls, literals, aggregates and
X-- concatenated sequences.
X-- cases:  (16)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
XTest:       s-07-2-2-0003a.vhdl
X-- Check that an expression formed with a relational operator is of type
X-- BOOLEAN.
XTest:       s-07-2-2-0004a.vhdl
X-- Check that a static expression formed with a relation operator has the
X-- correct static value.
X-- cases:
X-- All relational operators ( =, /=, <, <=, >, >=) with literals/aggregates 
X-- of all types used in S6212001A ( enumeration type, integer, physical, 
X-- floating point, array, and record type )
X-- contexts in which subtype checking is performed at analysis time:
X-- 1) range constraint in a subtype declaration -- this cannot be used here
X--	since the user cannot define a new boolean type 
X--	(e.g. to be always TRUE).
X-- 2) choices in a case statement
X
X------------------------------------------------------------------------
X  Paragraph:  Adding Operators - 7.2.3
X------------------------------------------------------------------------
XTest:       e-07-2-3-0001a.vhdl
X-- Check that the binary arithmetic operators + and - are not defined for any
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0002a.vhdl
X-- Check that the two operands of the binary arithmetic operators + and - must
X-- be of the same base type. Check for objects, literals, function calls.
X-- cases:
X-- 1) re-defined integer types;
X-- 2) re-defined real types;
X-- 3) re-defined time types.
X-- contexts:
X-- 1) function return statements (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0003a.vhdl
X-- Check that if one operand of the concatenation operator & is an array,
X-- then the other operand must be an array of the same type or an object or
X-- value of the type of the array element. Check that in this case, the result
X-- is the same type as the array operand. Check for objects, literals,
X-- aggregates, function calls.
X-- cases:
X-- 1) array of boolean & array of boolean of different array type;
X-- 2) array of boolean & bit literal;
X-- 3) array of boolean & bit object;
X-- 4) array of integer & object of different integer type;
X-- 5) array of record & aggregate of similiar record type;
X-- 6) array of integer & function call of different integer type.
X-- contexts:  actual parameter association in variable declaration.
XTest:       e-07-2-3-0004a.vhdl
X-- Check that if neither operand of the concatenation operator & is an array,
X-- then they must be objects or values of the same type. Check that in this
X-- case, the result is an array whose element type is the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:
X-- 1) bit & boolean where result should be array of boolean;
X-- 2) integer & re-defined integer where result should be array of integer;
X-- 3) simple record & similiar record where result should be array of simple;
X-- 4) bit & bit where result should be array of boolean.
X-- contexts:  actual parameter association in variable declaration.
XTest:       e-07-2-3-0005a.vhdl
X-- Check that the unary arithmetic operators +, and - are not defined for
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
XTest:       e-07-2-3-0006a.vhdl
X-- Check that a signed operator cannot follow an adding operator or a
X-- multiplying operator or a miscellaneous operator (**, abs) or
X-- the logical operator not.
X-- cases:  expressions involving real and integer objects.
X-- contexts:  variable assignment.
XTest:       s-07-2-3-0001a.vhdl
X-- Check that the binary arithmetic operators + and - are defined for all
X-- numeric types and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a formal generic list;
X-- 2) assertion definition in an interface description;
X-- 3) default value in a parameter specification;
X-- 4) default value in a variable declaration;
X-- 5) range constraint in a integer type definition;
X-- 6) choice in an aggregate;
X-- 7) expression in an aggregate;
X-- 8) index constraint in a constrained array definition;
X-- 9) generate parameter specification in a for generate statement;
X-- 10) return statement in function.
XTest:       s-07-2-3-0002a.vhdl
X-- Check that the concatenation operator & is defined for two 
X-- one_dimensional array operands that have the same type, or for two 
X-- nonarray operands that have the same type, or for one one_dimensional array
X-- operand and one nonarray operand where the nonarray operand is of the same 
X-- type as the array element. Check for objects, literals, aggregates, 
X-- function calls. 
X-- cases:  Three operand cases; for array objects, aggregates, and function
X--	results; for element objects, literals, and function results.
X-- contexts:
X-- 1) function return statement;
X-- 2) variable declaration;
X-- 3) signal assignment.
XTest:       s-07-2-3-0003a.vhdl
X-- Check that the unary arithmetic operators +, -, and abs are defined for any
X-- numeric type and that the type of the result is the same as the type of the
X-- single operand. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a port declaration;
X-- 2) assertion definition in a body;
X-- 3) default value in a signal declaration;
X-- 4) range constraint in a physical type definition;
X-- 5) range constraint in a floating point subtype declaration;
X-- 6) choice in a case statement;
X-- 7) expression in a case statement;
X-- 8) time expression in a signal assignment statement;
X-- 9) return statement in a function.
XTest:       s-07-2-3-0004a.vhdl
X-- Check that static expressions formed with + and - have the correct static
X-- value.
X-- cases:  integer, user-defined physical, real; literals only.
X-- contexts:
X-- 1) choices in case statements.
X
X------------------------------------------------------------------------
X  Paragraph:  Multiplying Operators - 7.2.4
X------------------------------------------------------------------------
XTest:       e-07-2-4-0001a.vhdl
X-- Check that the binary operators mod and rem are not defined for 
X-- operands of other than integer type.  Check for objects, literals and
X-- function calls.
X-- cases:
X-- try operands of type real, time, character, bit, records with 1 integer
X--	element, 1x1 arrays of integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0002a.vhdl
X-- Check that the operands of the binary arithmetic operators * and / cannot be
X-- non-numeric. Check for objects, literals, function calls.
X-- cases:  
X-- 1) enumeration type;
X-- 2) record with one numeric element;
X-- 3) array with one numeric element;
X-- 4) character and boolean literals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls)
XTest:       e-07-2-4-0003a.vhdl
X-- Check that if one operand of the binary arithmetic operators * and / is
X-- floating point the other cannot be an integer. Check for objects, literals,
X-- function calls.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0004a.vhdl
X-- Check that if one operand of * is a physical type, the other must be an
X-- integer or a floating point type. Check for objects, literals, function
X-- calls.
X-- cases:  try for enumeration, 1x1 array of real, 1 element
X--	record of integer, another physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-4-0005a.vhdl
X-- Check that if the right operand of / is a physical type, the left operand
X-- must be the same type (cannot be an integer or a floating point type). Check
X-- cases:  enumeration, real, integer, a different physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals, function calls).
XTest:       s-07-2-4-0001a.vhdl
X-- Check that the binary arithmetic operators mod and rem are defined for any
X-- integer type and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- cases:  predefined and user-defined integer types.
X-- contexts:
X-- 1) range constraint in a physical type definition;
X-- 2) index constraint in a constrained array definition;
X-- 3) choice in a case statement;
X-- 4) generate parameter specification in a for generate statement;
X-- 5) waveform element in a signal assignment statement;
X-- 6) actual parameter association.
XTest:       s-07-2-4-0002a.vhdl
X-- Check that the operands of the binary arithmetic operators * and / may be
X-- both integer or both floating point, and that when the types of the operands
X-- are the same the type of the result is the same as the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:  objects, literals, function calls of re-defined integers and reals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0003a.vhdl
X-- Check that for the binary arithmetic operators * and /, the left
X-- operand may be any physical type and the right operand any integer
X-- type or any floating point type; check that in this case, the result
X-- is the same type as the left operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0004a.vhdl
X-- Check that for the binary arithmetic operator *, the right operand
X-- may be any physical type and the left operand any integer type or any 
X-- floating point type; check that in this case, the result
X-- is the same type as the right operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
XTest:       s-07-2-4-0005a.vhdl
X-- Check that for the binary arithmetic operator /, the left operand may be any
X-- physical type and the right operand may be the same type; check that in this
X-- case, the result is universal integer. Check for objects, literals, function
X-- calls.
X-- cases:  user-defined physical and time, integer.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls);
X-- 5) integer subtype declaration (literals and function calls).
XTest:       s-07-2-4-0006a.vhdl
X-- Check that static expressions formed with the operators mod, rem, *, / have
X-- the correct static value. Check for signs of results of (A rem B) and (A mod
X-- B).
X-- cases:	A	B	A/B	A*B	A rem B	A mod B
X--
X--		10	5	2	50	0	0
X--		-11	5	-2	-55	-1	4
X--		10	-5	-2	-50	0	0
X--		-11	-5	2	55	-1	-1
X-- contexts:  choice in case statement.
X
X------------------------------------------------------------------------
X  Paragraph:  Misc Operators - 7.2.5
X------------------------------------------------------------------------
XTest:       e-07-2-1-5001a.vhdl
X-- Check that the unary operator abs is not defined for non-numeric types.
X-- Check for single-element arrays of numerics.
XTest:       e-07-2-1-5002a.vhdl
X-- Check that the left operand of the binary arithmetic operator ** cannot be
X-- any type other than integer or floating point, and that the right operand
X-- cannot be any type other than integer. Check for objects, literals, function
X-- calls.
X-- cases:  Try on the left:  enumeration type, 1x1 array of real, 
X--	1 element record of integer, time, character, and bit.
X--	On the right:  real, time, 1 element record of integer, 1 element
X--	array of integer, and character.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       e-07-2-1-5003a.vhdl
X-- Check that if the right operand of ** is negative, the left operand must be
X-- a floating point type. Check for static expression.
X-- case:  user-defined integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
XTest:       s-07-2-1-5001a.vhdl
X-- Check that the unary arithmetic operator abs is defined for any
X-- numeric type.  Check for objects, literals, function calls.
XTest:       s-07-2-1-5002a.vhdl
X-- Check that the left operand of the binary arithmetic operator ** may be any
X-- integer or any floating point type, that the right operand may be of integer
X-- type, and that the type of the result is the same as the type of the left
X-- operand. Check for objects, literals, function calls.
X-- cases:  left operand:  re-defined integer and real.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment (objects, literals, and function calls)
X-- 4) signal assignment.
XTest:       s-07-2-1-5003a.vhdl
X-- Check that static expressions formed with the operators abs and ** have the
X-- correct static value.
X-- cases:
X-- 	for "abs":  types integer, real, and physical
X--		with positive, negative, and zero values.
X--	for "**":  types integer and real with positive,
X--		negative, and zero values.  Except: left operand is integer
X--		and right operand is negative.
X
X------------------------------------------------------------------------
X  Paragraph:  Operands - 7.3
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Literal - 7.3.1
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Aggregates - 7.3.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-2001a.vhdl
X-- Check that positional associations must precede any named associations.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
XTest:       e-07-2-2-2002a.vhdl
X-- Check that no association may follow an "others" association.
X-- cases:  1x2 array, 2 element record.
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2003a.vhdl
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases with more than one "others" association in an aggregate.
X--	Other cases in E-07-2-2-2003B.VHD.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2003b.vhdl
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases where "others" is not the only choice in an element 
X--	association.  other cases in E-07-2-2-2003A.VHD.
X-- cases:  1x3 array, 3 element record
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2004a.vhdl
X-- specified using named association (in order to distinguish them from
X-- parenthesized expressions).
X-- contexts:  signal assignment and declaration.
XTest:       e-07-2-2-2005a.vhdl
X-- Check that an element association with a choice that is an element simple
X-- name (and that cannot be interpreted as a simple expression) is only
X-- allowed in a record aggregate.
X-- cases:  1-dimensional array of character.
X-- contexts:  signal declaration and assignment.
XTest:       e-07-2-2-2006a.vhdl
X-- Check that an element association with a choice that is a simple expression
X-- (and that cannot be interpreted as an element simple name) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006B.VHD
X-- note:  only cases where a choice is a simple expression in a 
X--	record aggregate.
X-- cases:  homogeneous 3 element record, only static expressions.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
XTest:       e-07-2-2-2006b.vhdl
X-- Check that an element association with a choice that is a simple expression
X-- ( and that cannot be interpreted as an element simple name ) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006A.VHD
X-- note:  only cases where a choice is a discrete range in a record aggregate.
X-- cases:  homogenous record type;  expressions are all static.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
XTest:       e-07-2-2-2007a.vhdl
X-- Check that the type of an aggregate must be determinable solely from the
X-- context in which the aggregate appears, excluding the aggregate itself, but
X-- using the fact that the type of the aggregate must be a composite type. 
X-- Check that a boolean expression of the form "aggregate = aggregate" is 
X-- illegal. Check that an attribute name of the form "aggregate'LENGTH" is 
X-- illegal.
X-- Questions:  Are these true for qualified aggregates as well?
X-- cases:  simple record and array aggregates.
X-- contexts:
X-- 1) port declaration;
X-- 2) variable assignment;
X-- 3) loop parameter specification.
XTest:       s-07-2-2-2001a.vhdl
X-- Check that both positional association and named association are legal.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
XTest:       s-07-2-2-2002a.vhdl
X-- Check that named associations may appear in any order with respect to
X-- each other
XTest:       s-07-2-2-2003a.vhdl
X-- Check that an "others" association may be the only association.
XTest:       s-07-2-2-2004a.vhdl
X-- Check that an "others" association may occur in a record aggregate or 
X-- in an array aggregate.
XTest:       s-07-2-2-2005a.vhdl
X-- Check that an identifier that could be either a simple expression or
X-- an element simple name can occur as the choice in an element 
X-- association in either a recored aggregate or an array aggregate.
X
X------------------------------------------------------------------------
X  Paragraph:  Record Aggregates - 7.3.2.1
X------------------------------------------------------------------------
XTest:       e-07-2-2-2101a.vhdl
X-- Check that if the type of an aggregate is a record type, the element names
X-- given as choices must denote elements of that record type.
X-- cases:
X-- 1) qualified aggregate where the element name in choice
X--	does not match an element name of the record type but matches an
X--	element name of a similiar record type.
X-- 2) unqualified aggregate, type discernable from context, element name
X--	as in 1).
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
XTest:       e-07-2-2-2102a.vhdl
X-- Check that all of the elements of the record type must be accounted for by
X-- the set of element associations.
X-- cases:
X-- 1) all positional associations with the last element missing.
X-- 2) positional then named associations with the element "in-between" missing.
X-- 3) all named associations with one element given incompletely as in 1).
X-- 4) all positional associations with one element given as in 2).
X-- 5) all named with one element missing.
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
XTest:       e-07-2-2-2103a.vhdl
X-- Check that no element of the record type may appear in more than one choice
X-- in the set of element associations.
X-- cases:
X-- 1) positional then named, with last positional association specified in a
X--	named association;
X-- 2) one element named twice in two "or" choices to have the same value.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2104a.vhdl
X-- Check that there may be no more element associations than there are record
X-- elements.
X-- cases:
X-- 1) all positional associations with one more element.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2105a.vhdl
X-- Check that the choice "others" must represent at least one element.
X-- cases:
X-- 1) all positional associations with an extra "others" choice;
X-- 2) positional then named with an extra "others" choice;
X-- 3) all named with an extra "others" choice;
X-- 4) correct aggregate with one element which is a record incorrectly
X--	specified as in 2).
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2106a.vhdl
X-- Check that an element association with more than one choice or with the
X-- choice "others" is allowed only if the elements specified are all of the 
X-- same type.
X-- cases:
X-- 1) the two elements are of types BIT and BOOLEAN;
X-- 2) the two elements are of types predefined integer and re-defined integer.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
XTest:       e-07-2-2-2107a.vhdl
X-- Check that the expression of an element association must have the type of 
X-- the associated record element. Check for objects, literals, aggregates, 
X-- function calls.
X
X------------------------------------------------------------------------
X  Paragraph:  Array Aggregates - 7.3.2.2
X------------------------------------------------------------------------
XTest:       e-07-2-2-2201a.vhdl
X-- Check that each choice must specify a value of the index type.
X-- cases:
X-- 1) choice is an object of type BIT and the index type is BOOLEAN;
X-- 2) choices are the positional values of the (enumeration) index type;
X-- contexts:
X-- 1) variable assignment;
X-- 2) return statement;
XTest:       e-07-2-2-2202a.vhdl
X-- Check that the expression of each element association of an n-dimensional
X-- array must be an (n-1) dimensional array or array aggregate with
X-- elements of the array element type.
XTest:       e-07-2-2-2203a.vhdl
X-- Check that (aside from a final element association with the single choice
X-- "others") all element associations of an array aggregate must be either all
X-- positional or all named.
X-- cases:
X-- 1) mixed positional and named associations without an "others" association.
X-- contexts:
X-- 1) if statement;
X-- 2) variable assignment;
X-- 3) function return statement;
X-- 4) signal assignment;
X-- 5) port association;
XTest:       e-07-2-2-2204a.vhdl
X-- Check that all choices (including "others") in an aggregate that has more
X-- than one element association or that has more than one choice in an element
X-- association must be static.
X-- cases:
X-- 1) one generic, one "others" choice in different associations for an array
X--	subtype with static index constraint (i.e. "others" choice is static);
X-- 2) two choices, one non-static, in the same association;
X-- 3) same as 1) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 4) same as 2) but with the non-static choice being a formal parameter
X--	of a funtion.
XTest:       e-07-2-2-2205a.vhdl
X-- Check that in an aggregate without an "others" choice, every element in the
X-- array must be accounted for in the set of choices. Check for a positional
X-- aggregate assigned to a signal or variable array object. Check for a named
X-- association aggregate where there are gaps between the lower index bound and
X-- the upper index bound.
X-- cases:
X-- 1) positional aggregate with one missing element;
X-- 2) aggregate with two named associations which specify discrete ranges,
X--	and the two ranges cover the index range but with a gap between them.
X-- contexts:
X-- 1) variable assignment;
X-- 2) signal assignment statement;
X-- 3) function return statement;
X-- 4) if statement;
XTest:       e-07-2-2-2206a.vhdl
X-- Check that in a named association aggregate, no array element may have more
X-- than one associated expression.
X-- cases:
X-- 1) one element named twice in different associations;
X-- 2) one element named twice in different "or" associations;
X-- 3) one element named twice in the same "or" association.
X-- contexts:
X-- 1) assertion definition in an interface description;
X-- 2) return statement in a function;
X-- 3) port association;
X-- 4) signal assignment;
XTest:       e-07-2-2-2207a.vhdl
X-- Check that there may be no more associations than there are elements in the
X-- array (pertains to positional association in contexts requiring fixed size
X-- array aggregates).
X-- cases:
X-- 1) positional aggregate of an array with fixed index type
X--	with an extra element.
X-- contexts:
X-- 1) variable assignment;
XTest:       e-07-2-2-2208a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- actual parameter corresponding to an unconstrained formal parameter.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) actual parameter association;
X-- 2) variable assignment.
XTest:       e-07-2-2-2209a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- return expression for a function returning an unconstrained array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
XTest:       e-07-2-2-2210a.vhdl
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- operand of a qualified expression whose type mark denotes an unconstrained
X-- array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) variable assignment statement;
X-- 2) return statement in function.
XTest:       e-07-2-2-2211a.vhdl
X-- 	Check that the direction of the index subtype of the aggregate
X--      array is the same as the direction of the index subtype of the 
X--      base type of the array.
XTest:       e-07-2-2-2212a.vhdl
X--     Check that in a positional aggragate the leftmost bound
X--     is determined by the applicable index constraint or by
X--     S'LEFT where S is the index subtype of the base type of
X--     the array, and the rightmost bound is determined by the 
X--     direction of the index subtype and the number of elements.
XTest:       s-07-2-2-2201a.vhdl
X-- Check that a string literal or a bit string literal is allowed in a
X-- multi-dimensional aggregate at the place of a one-dimensional array of a
X-- character type.
X-- cases:  string literal and bit string literal, constrained and unconstrained
X--	arrays.
X-- contexts:
X-- 1) return statement of function;
X-- 2) subprogram parameters;
XTest:       s-07-2-2-2202a.vhdl
X-- Check that an aggregate that has a single element association having a 
X-- single choice may have a nonstatic choice.
XTest:       s-07-2-2-2203a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is an actual
X-- parameter associated with a formal parameter of a constrained array subtype.
X-- cases:
X-- 1) "others" as only choice;
X-- 2) "others" not only choice.
XTest:       s-07-2-2-2204a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the result
X-- expression of a function, where the corresponding function result type is a
X-- constrained array subtype.
XTest:       s-07-2-2-2205a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the expression
X-- on the right hand side of a variable assignment statement, and the name on
X-- the left hand side is of a constrained array subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
XTest:       s-07-2-2-2206a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is one of the 
X-- value expressions on the right hand side of a signal assignment statement, 
X-- and the names on the left hand side are all of the same constrained array 
X-- subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
XTest:       s-07-2-2-2207a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is the operand of
X-- a qualified expression whose type mark denotes a constrained array type.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:
X-- 1) parameter specification;
X-- 2) return statement in function;
X-- 3) port declaration;
X-- 4) signal assignment.
XTest:       s-07-2-2-2208a.vhdl
X-- Check that an "others" choice is allowed if the aggregate is a subaggregate
X-- of a multi-dimensional aggregate, and an "others" choice would be allowed
X-- for this multi-dimensional aggregate in this context.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:  those of all "others" cases above.
X-- 1) actual parameter associated with a formal parameter of
X--	a constrained array subtype.
X-- 2) return statement in a function whose return type is a constrained
X--	array subtype.
X-- 3) variable assignment to an object of constrained array subtype.
X-- 4) signal assignment to an object of constrained array subtype.
X-- 5) qualified expression whose type mark denotes a constrained array subtype.
X
X------------------------------------------------------------------------
X  Paragraph:  Function Calls - 7.3.3
X------------------------------------------------------------------------
XTest:       e-07-2-2-3001a.vhdl
X-- Check that the result of a function call is of the type specified in the
X-- definition of the function. Check for error cases here.
X-- cases:
X-- The type expected from the context of the function call is different from
X--	the type specified in the definition of the function, for:
X-- 1) one type "derived" from the other, i.e. a new integer type;
X-- 2) two "similiar" types, i.e. record types whose definitions are identical;
X-- 3) two constrained arrays of the same unconstrained base type.
X-- contexts:
X-- 1) value returned by a function in the body of the function declaration.
X-- 2) boolean condition in if statement.
X-- 3) waveform expression in signal assignment statement.
XTest:       e-07-2-2-3002a.vhdl
X-- Check that in a function call the type of each argument in the argument list
X-- must be compatible with the type of the corresponding input parameter in the
X-- definition of the function. Check for positional inversion of arguments.
XTest:       s-07-2-2-3001a.vhdl
X-- Check that the result of a function call is of the type specified in
X-- the definition of the function. Check for error_free cases here.
XTest:       s-07-2-2-3002a.vhdl
X-- Check that a function call without an actual parameter part is
X-- permitted (for functions with no formal parameters or functions whose
X-- formal parameters all have default values).  As a special case, check
X-- when the prefix of an indexed name is a function call with no actual
X-- parameter part.
X
X------------------------------------------------------------------------
X  Paragraph:  Qualified Expressions - 7.3.4
X------------------------------------------------------------------------
XTest:       e-07-2-2-4001a.vhdl
X-- Check that the operand must have the same type as the base type of the type
X-- mark.
X-- cases:
X-- 1) a boolean expression with type bit;
X-- 2) object of an "identical" record type.
X-- contexts:
X-- 1) function return statement;
X-- 2) port declaration;
X-- 3) signal assignment.
X
X------------------------------------------------------------------------
X  Paragraph: missing section: Type Conversion - 7.3.5
X------------------------------------------------------------------------
XTest:       e-07-3-5-0001a.vhd
X-- Check that type conversion cannot occur on an operand of any type
X-- but universal integer or universal real on an operand of any type 
XTest:       e-07-3-5-0001b.vhd
X-- Check that type conversion cannot occur on an operand of any type but
X-- universal integer or universal real.
XTest:       s-07-3-5-0001a.vhd
X-- Check that type conversion can only occur on an operand of type
X-- universal integer or universal real.
X
X------------------------------------------------------------------------
X  Paragraph: missing section: Allocators - 7.3.6
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Static Expressions - 7.3.1 --> 7.4.0
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Generic Expressions - 7.3.2 --> ?
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Universal Expressions - ???? --> 7.5
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Boolean Expressions -  7.3.3 --> ?
X------------------------------------------------------------------------
X
X------------------------------------------------------------------------
X  Paragraph:  Association Lists - 7.4 --> 4.3.3.2 ( Declarations)
X------------------------------------------------------------------------
XTest:       e-07-4-0-0001a.vhdl
X-- Check that the association list must specify exactly one actual part
X-- for each formal part of the corresponding interface list that does not 
X-- have a default expression. Check for the case where one formal part has
X-- more than one actual part. Check for the case where one formal part
X-- that does not have a default value does not have an actual part.
X-- cases:
X-- 1) more than one parameter association is specified for a formal parameter;
X-- 2) a formal parameter without default value does not have a parameter
X--	association;
X-- contexts:
X-- 1) range constraint in a real subtype declaration
X-- 2) signal assignment statement
XTest:       e-07-4-0-0002a.vhdl
X-- Check that all positional associations must appear before any named
X-- associations.
X-- cases:
X-- 1) named, positional, named, positional, all in the same order as the
X--	parameter specification.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       e-07-4-0-0003a.vhdl
X-- Check that the first n positional associations are taken to correspond to 
X-- the first n formal parts, regardless of whether the
X-- associations are, in principle, optional or obligatory or whether
X-- default values were specified for one or more of these formal parts.
X-- cases:
X-- 1) formal parameters of different types, first has a default value
X--	and does not have a parameter association of the same type.
X-- contexts:
X-- 1) generic association in component instantiation
XTest:       e-07-4-0-0004a.vhdl
X-- Check that the null association element (i.e. commas as place holders) is
X-- not allowed.
X-- cases:
X-- 1) function with formal parameters which all have default values.
X-- contexts:
X-- 1) assignment in variable declaration.
XTest:       e-07-4-0-0005a.vhdl
X-- Check that an empty association list (i.e. empty paired parentheses)
X-- is not allowed, even for a function that has no formal parameters or
X-- an entity whose formal parts all have default values.
X-- cases:
X-- 1) function with no formal parameters;
X-- 2) function whose formal parameters all have default values.
X-- contexts:
X-- 1) next statement;
X-- 2) enumeration subtype declaration.
XTest:       e-07-4-0-0006a.vhdl
X-- Check that if the mode of the formal designator is in, inout, or linkage
X-- and the actual designator is not open then the type of the actual designator
X-- after applying any type conversion function present in the actual must
X-- be the same as the type of the corresponding formal designator.
XTest:       e-07-4-0-0007a.vhdl
X-- Check that if the mode of the formal designator is out, inout, buffer or
X-- linkage and the actual designator is not open then the type of the formal
X-- designator the type of the formal designator after applying any type
X-- conversion function present in the formal part must be the same as the
X-- type of the corresponding actual designator.
XTest:       e-07-4-0-0008a.vhdl
X--   Check that an actual port in a port association list must not be a formal 
X--   port signal name.
XTest:       s-07-4-0-0001a.vhdl
X-- Check that both named and positional association elements can be used
X-- in the same association list.
X-- cases:
X-- 1) positional, positional, named, named, all in the same order as the
X--    parameter specification. 
X--    Note. all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       s-07-4-0-0002a.vhdl
X-- Check that an actual part can be omitted for any formal part for
X-- which a default value was specified in the corresponding interface
X-- list.
X-- cases:
X-- 1) all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
XTest:       s-07-4-0-0003a.vhdl
X-- Check that the subtype of the formal designator is permitted to be 
X-- different from the subtype of the actual designator as long as the 
X-- base types match.
X
*-*-END-of-TEST-SYNOPSIS.text-*-*
echo x - e-07-1-0-0001a.vhdl
sed 's/^X//' >e-07-1-0-0001a.vhdl <<'*-*-END-of-e-07-1-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/13/85
X-- note:  in this file, tests for types and entities.
X-- types can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- 5) function declarative part
X-- 6) function statement part
X-- 7) package
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 5) attribute specification in a function declaration
X-- 6) return statement in a function
X-- 7) default value in formal parameter list of function declaration in package
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X--	<< modified 5/6/88 to 1076. jsgrout>>
Xpackage P is
X	type T is (one,two,three,four);
X	-- attribute A of function is T; -- 7.2
X	attribute A : T ; -- 1076
X	attribute A of all : function is one ;	-- 1076
Xend P;
X
X-- with package P; -- 7.2 - no longer used.
Xuse P.all ; --1076
Xentity E is -- 1076
X    generic ( WHATEVER : T ) ; -- 1076
X    port (PT:BOOLEAN) ; -- 1076
X    begin -- 1076
X        assert WHATEVER < T;
X    	-- SEMANTICS ERROR:  TYPE name used as primary.  (context 4)
X    end E;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
Xentity E is -- 1076
X    generic ( WHATEVER : T ) ; -- 1076
X    port (PT:BOOLEAN) ; -- 1076
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:    block -- 7.2
Xbegin -- 1076
X    begin	
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to T;
X	  -- SEMANTICS ERROR:  Type name used as primary.  (context 3)
X	begin
X	    Y:
X	    -- for I := T to T loop -- 7.2
X	    for I in T to T loop
X		-- Semantics Error : Type name used as primary in iteration
X			--           scheme expression
X			return;
X	    end loop;
X	    return;
X	end process;
X    end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:    block -- 7.2
Xbegin
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X	    S <= T;
X	     -- SEMANTICS ERROR:  type name used as primary (context 1)
X	end generate;
X	process
X	begin
X	    return;
X	end process;
X--    end block;
Xend AB;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
XPackage body P is
X    function F return T is
X	-- for F of function F use T; -- 7.2 .. no longer supported
X        -- SEMANTICS ERROR:  type name used as primary (context 5)
X    begin
X	return T;
X	-- SEMANTICS ERROR:  type name used as primary (context 6)
X    end F;
Xend P ;
X
X-- with package P; -- 7.2
Xuse P.all ; -- 1076
Xpackage body P2 is
X	function F ( A : INTEGER := T ) return INTEGER is
X	-- SEMANTICS ERROR:  type name used as primary (context 7)
X	begin
X		return 0;
X	end F;
Xend P2;
*-*-END-of-e-07-1-0-0001a.vhdl-*-*
echo x - e-07-1-0-0001b.vhdl
sed 's/^X//' >e-07-1-0-0001b.vhdl <<'*-*-END-of-e-07-1-0-0001b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/14/84
X-- note:  in this file, tests for entities only.
X-- entities can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of archit. body statement)
X-- 3) body declarative part
X-- 4) interface declaration declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 4) assertion definition
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type T is (one,two,three,four);
X	attribute A of function is T;
Xend P;
X
X-- with package P;
Xuse P.all;
Xentity E  is ;
Xgeneric ( WHATEVER : T ) ;
X    port (PT:BOOLEAN) ;
Xassert WHATEVER < E;
X	-- SEMANTICS ERROR:  entity name used as primary.  (context 4)
Xend E;
X
X-- with package P;
Xuse P.all;
Xentity E  is ;
Xgeneric ( WHATEVER : T ) ;
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to E;
X	    -- SEMANTICS ERROR:  entity name used as primary.  (context 3)
X	begin
X	    for i in 1 to E loop
X    	   -- SEMANTICS ERROR:  entity name used as primary.  (context 2)
X		return;
X    end loop;
X	return;
X	end process;
X--    end block;
Xend BB;
X
X
Xarchitecture AB of E is
Xbegin
X--L_X_2:    block
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X	    S <= E;
X	    -- SEMANTICS ERROR:  entity name used as primary (context 1)
Xnd generate;
X	process
X        begin
X	    return;
X	end process;
X    end block;
X-- end block ;
Xend AB;
*-*-END-of-e-07-1-0-0001b.vhdl-*-*
echo x - e-07-1-0-0001c.vhdl
sed 's/^X//' >e-07-1-0-0001c.vhdl <<'*-*-END-of-e-07-1-0-0001c.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001C.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for bodies only.
X-- bodies can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- 2) loop statement (as particular example of architecture body statement)
X-- 3) body declarative part
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 2) loop parameter specification in the iteration scheme of a for- loop
X-- 3) range constraint of an integer subtype declaration
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type T is (one,two,three,four);
X	attribute A of function is T;
Xend P;
X
X with package P;
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
Xblock
Xbegin
XL_X_1:    block
X    begin
X	process
X	    subtype NEW_INTEGER is INTEGER range 1 to BB;
X	    -- SEMANTICS ERROR:  body name used as primary.  (context 3)
X        begin
X	    return;
Xend process;
X    end block;
X    end begin;
Xend block ;
Xend BB;
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_2:    block
X	signal S : BOOLEAN;
X    begin
X	if TRUE generate
X		S <= AB;
X		-- SEMANTICS ERROR:  body name used as primary (context 1)
Xend generate;
X    end block;
X    end begin;
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001c.vhdl-*-*
echo x - e-07-1-0-0001d.vhdl
sed 's/^X//' >e-07-1-0-0001d.vhdl <<'*-*-END-of-e-07-1-0-0001d.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001D.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for component labels only.
X-- component labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_1:    block
X	signal S : BOOLEAN;
X	component C port ( CPT1 : in BOOLEAN );
X    begin
X	if TRUE generate
X		NEW_C : C port ( PT );
X		S <= NEW_C;
X		-- SEMANTICS ERROR: component label used as primary (context 1)
X		end generate;
X    end block;
X    end begin
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001d.vhdl-*-*
echo x - e-07-1-0-0001e.vhdl
sed 's/^X//' >e-07-1-0-0001e.vhdl <<'*-*-END-of-e-07-1-0-0001e.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001E.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for generate labels only.
X-- generate labels can be visible in the following scopes:
X-- 1) generate statement (as particular example of arch. body statement)
X-- specific contexts:
X-- 1) waveform element in a signal assignment statement in a generate statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
Xblock
Xbegin
XL_X_1:    block
X	signal S : BOOLEAN;
X    begin
X	DO_IT: if TRUE generate
X		S <= DO_IT;
X		-- SEMANTICS ERROR: generate label used as primary (context 1)
X		end generate;
X    end block;
X    end begin;
Xend block ;
Xend AB;
*-*-END-of-e-07-1-0-0001e.vhdl-*-*
echo x - e-07-1-0-0001f.vhdl
sed 's/^X//' >e-07-1-0-0001f.vhdl <<'*-*-END-of-e-07-1-0-0001f.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-0-0001F.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that types, entities, bodies, and component, generate and loop labels
X-- are not permitted as primaries.
X-- DPS 05/15/85
X-- note:  in this file, tests for loop labels only.
X-- loop labels can be visible in the following scopes:
X-- 1) loop statement (as particular example of beh. body statement)
X-- specific contexts:
X-- 1) exit statement in loop statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture BB of E is
X--   L_X_1:    block
X    begin
X	process
X        begin
X	    DO_LOOP : while TRUE loop
X		exit when DO_LOOP;
X	    end loop;
X	    return;
X	end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-1-0-0001f.vhdl-*-*
echo x - e-07-2-0-0001a.vhdl
sed 's/^X//' >e-07-2-0-0001a.vhdl <<'*-*-END-of-e-07-2-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that operators have the correct precedence. This is an indirect check
X-- using semantic error processing. The idea is that 'integer + real * real'
X-- should produce an error message stating that the operands of '+' are
X-- incompatible, while 'integer + real * real' should produce an error message
X-- stating that the operands of '*' are incompatible. Check for logical vs.
X-- relational, relational vs. adding, adding vs. multiplying, multiplying vs.
X-- miscellaneous. 
X-- DPS 05/14/84
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence. 
X-- cases:
X-- 1) logical and relational operators with boolean literals;
X-- 2) relational and adding operators with boolean and integer literals;
X-- 3) adding and multiplying operators with integer and real literals;
X-- 4) multiplying and miscellaneous operators with integer and real literals.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	subtype ALWAYS_FALSE is boolean range FALSE to FALSE;
Xend P;
X
X-- with package P;
Xuse P.all;
Xpackage body P is
Xfunction F ( PR : ALWAYS_FALSE ) return boolean is
Xbegin
X	case PR is
X		when ( FALSE = FALSE and FALSE = FALSE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( TRUE /= FALSE or TRUE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "/=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( 40 + 10 = 50 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "+" evaluated first.
X		-- WRONG ERROR:  incompatible operands to .
X		-- 10 = 50 becomes FALSE if and only if "=" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( 4.0 < 10.3 - 6.1 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "-" evaluated first.
X		-- WRONG ERROR:  incompatible operands to .
X		-- 4.0 < 10.3 becomes TRUE if and only if "<" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 + 10 * 6 - 3 ) = 62 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "*" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 10.0 + 4.0 / 2.0 - 7.0 ) > 0.1 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "/" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 * 10 ** 2 / 2 ) = 250 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "**" evaluated first.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 100.0 / 10.0 ** 2 * 0.5 ) < 0.6 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if "**" evaluated first.
X		when others => null;
X	end case;
X        return PR;
Xend F;
*-*-END-of-e-07-2-0-0001a.vhdl-*-*
echo x - e-07-2-0-0002a.vhdl
sed 's/^X//' >e-07-2-0-0002a.vhdl <<'*-*-END-of-e-07-2-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that operators of the same precedence associate left to right. This is
X-- an indirect check using semantic error processing. The idea is that 'integer
X-- + integer - real' should produce an error message stating that the operands
X-- of '-' are incompatible, while 'integer + real - integer' should produce an
X-- error message stating that the operands of '+' are incompatible (and 
X-- possibly another message about incompatible operands of '-'). Check for 
X-- logical, relational, adding, multiplying. Check when operands are 
X-- function calls.
X-- DPS 05/14/84
X-- Questions:  
X-- 1) I don't know how to check when operands are function calls.
X-- 2) It seems that a series of relational expressions is not legal.
X-- Approach:  Use case statement to check that the values of static expressions
X-- show the correct precedence.  NOTE:  this does NOT allow the check for
X-- function calls.
X-- cases:
X-- 1) logical operators with boolean literals;
X-- 2) relational operators with boolean literals;
X-- 3) adding operators with integer literals;
X-- 4) multiplying with integer literals.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	subtype ALWAYS_FALSE is boolean range FALSE to FALSE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PR : ALWAYS_FALSE ) return boolean is
Xbegin
X	case PR is
X		when ( TRUE nand FALSE nand FALSE ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( TRUE /= FALSE <= TRUE ) => null;
X		-- SYNTAX ERROR:  cannot have series of relationals!!
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 5 - 10 + 3 ) = -2 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X
X	case PR is
X		when ( ( 10 / 2 * 5 ) = 25 ) => null;
X		-- SEMANTIC ERROR:  value out of subtype bounds.
X		-- TRUE if and only if evaluated left-to-right.
X		when others => null;
X	end case;
X        return TRUE;
Xend F;
*-*-END-of-e-07-2-0-0002a.vhdl-*-*
echo x - e-07-2-1-0001a.vhdl
sed 's/^X//' >e-07-2-1-0001a.vhdl <<'*-*-END-of-e-07-2-1-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, nor, nand, not) 
X-- are not defined for scalar types other than BOOLEAN or BIT.
X-- cases:  literals and objects of all predefined scalar types
X--	and an enumeration type..
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E ( PT : boolean ) is
Xend E;
X
Xarchitecture BB of E is
XL_X_1: block
X begin
X  process
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	variable E1,E2,E3 : ENUM 	:= ONE and TWO;
X	-- SEMANTIC ERROR:  "and" not defined for enumeration type.
X
X	variable C1,C2,C3 : CHARACTER	:= 'a' or 'B';
X	-- SEMANTIC ERROR:  "or" not defined for character type.
X
X	variable I1,I2,I3 : INTEGER	:= -10 xor 859;
X	-- SEMANTIC ERROR:  "xor" not defined for integer type.
X
X	variable R1,R2,R3 : REAL	:= not 3278.4;
X	-- SEMANTIC ERROR:  "not" not defined for real type.
X
X	variable T1,T2,T3 : TIME	:= 1 s and 2 ms;
X	-- SEMANTIC ERROR:  "and" not defined for time type.
X
X        variable R4,R5,R6 : REAL        := 1.6 nor 2.3;
X        -- SEMANTIC ERROR:  "nor" not defined for real type.
X
X        variable T4,T5,T6 : TIME        := 4 ps nand 6ms;
X        -- SEMANTIC ERROR:  "nand" not defined for real type.
X
X	variable B : boolean;
X  begin
X	B  := E1  or E2;
X	-- SEMANTIC ERROR:  "or" not defined for enumeration type.
X
X	B  := C2  xor C3;
X	-- SEMANTICS ERROR:  "xor" not defined for character type.
X
X	B  := not I3;
X	-- SEMANTICS ERROR:  "not" not defined for integer type.
X
X	B  := R2 and R3;
X	-- SEMANTICS ERROR:  "and" not defined for real type.
X
X	B  := T2 or T3;
X	-- SEMANTICS ERROR:  "or" not defined for time type.
X
X	return;
X  end process;
X end block;
Xend BB;
*-*-END-of-e-07-2-1-0001a.vhdl-*-*
echo x - e-07-2-1-0002a.vhdl
sed 's/^X//' >e-07-2-1-0002a.vhdl <<'*-*-END-of-e-07-2-1-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for record types. Check for record types with single BOOLEAN or
X-- BIT element.
X-- cases:  aggregate and objects of:
X-- 1) simple record with single boolean element;
X-- 2) simple record with single bit element.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:  block
X  begin
X   process
X	type A is record	E : BOOLEAN;	end record;
X	type B is record	E : BIT;	end record;
X
X	variable A1 : A;
X
X	variable A2 : A;
X
X	variable B1 : B;
X
X	variable B2 : B;
X
X	variable BOOL : boolean;
X   begin
X	A1 := A'(E=>TRUE) and A'(E=>FALSE);
X	-- SEMANTIC ERROR:  "and" not defined for record types.
X
X	A2 := A'(E=>TRUE)  or A'(E=>FALSE);
X	-- SEMANTIC ERROR:   "or" not defined for record types.
X
X	B1 := B'(E=>'1') xor B'(E=>'0');
X	-- SEMANTIC ERROR:  "xor" not defined for record types.
X
X	B2 := not B'(E=>'0');
X	-- SEMANTIC ERROR:  "not" not defined for record types.
X
X	BOOL := B1 and B2;
X	-- SEMANTIC ERROR:  "and" not defined for record types.
X
X	BOOL := B1 or B2;
X	-- SEMANTIC ERROR:  "or" not defined for record types.
X
X	BOOL := A1 xor A2;
X	-- SEMANTIC ERROR:  "xor" not defined for record types.
X
X	BOOL := not A2;
X	-- SEMANTIC ERROR:  "not" not defined for record types.
X
X        BOOL := A1 nor A2;
X        -- SEMANTIC ERROR:  "nor" not defined for record types.
X
X        BOOL := B'(E=>'1') nand B'(E=>'1');
X        -- SEMANTIC ERROR:  "nand" not defined for record types.
X
X	return;
X   end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-2-1-0002a.vhdl-*-*
echo x - e-07-2-1-0003a.vhdl
sed 's/^X//' >e-07-2-1-0003a.vhdl <<'*-*-END-of-e-07-2-1-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, xor, not, nor, nand) are
X-- not defined for multi-dimensional arrays of BOOLEAN or BIT. Check for (1x1)
X-- arrays.
X-- cases:
X-- 1) 1x1 array of bit;
X-- 2) 1x1 array of boolean.
X-- contexts:
X-- 1) variable declaration;
X-- 2) variable assignment to an object of boolean type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:  block
X  begin
X   process
X	type A is array ( 1 to 1, 1 to 1 ) of boolean;
X	type B is array ( 1 to 1, 1 to 1 ) of bit;
X
X	variable A1 : A;
X
X	variable A2 : A;
X
X	variable B1 : B;
X
X	variable B2 : B;
X
X	variable BOOL : boolean;
Xbegin
X	A1 := A'(1=>(1=>TRUE)) and A'(1=>(1=>FALSE));
X	-- SEMANTIC ERROR:  "and" not defined for multi-dimensional arrays.
X
X	A2 := A'(1=>(1=>TRUE))  or A'(1=>(1=>FALSE));
X	-- SEMANTIC ERROR:   "or" not defined for multi-dimensional arrays.
X
X	B1 := B'(1=>(1=>'1')) xor B'(1=>(1=>'0'));
X	-- SEMANTIC ERROR:  "xor" not defined for multi-dimensional arrays.
X
X	B2 := not B'(1=>(1=>'0'));
X	-- SEMANTIC ERROR:  "not" not defined for multi-dimensional arrays.
X
X        B1 := B'(1=>(1=>'0')) nor B'(1=>(1=>'1'));
X        -- SEMANTIC ERROR:  "nor" not defined for multi-dimensional arrays.
X
X        BOOL := A1 nand A2;
X        -- SEMANTIC ERROR;  "nand" not defined for multi-dimensional arrays.
X        
X	BOOL := B1 and B2;
X	-- SEMANTIC ERROR:  "and" not defined for multi-dimensional arrays.
X
X	BOOL := B1 or B2;
X	-- SEMANTIC ERROR:  "or" not defined for multi-dimensional arrays.
X
X	BOOL := A1 xor A2;
X	-- SEMANTIC ERROR:  "xor" not defined for multi-dimensional arrays.
X
X	BOOL := not A2;
X	-- SEMANTIC ERROR:  "not" not defined for multi-dimensional arrays.
X
X	return;
X   end process;
X--   end block;
Xend BB;
*-*-END-of-e-07-2-1-0003a.vhdl-*-*
echo x - e-07-2-1-0004a.vhdl
sed 's/^X//' >e-07-2-1-0004a.vhdl <<'*-*-END-of-e-07-2-1-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-1004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary logical operators (and, or, xor)
X-- are not defined for arrays of different lengths. Check where one or both 
X-- operands are aggregates or concatenated sequences. 
X-- cases:  objects, aggregates, and concatenated sequences.
X-- contexts:  variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	type A is array ( 1 to 1 ) of boolean;
X	type B is array ( 1 to 2 ) of boolean;
X
X	variable A1 : A;
X	variable B1 : B;
X	variable BOOL : boolean;
Xbegin
X	A1 := A1 and B1;
X	-- SEMANTIC ERROR:  "and" not defined for arrays of different lengths.
X
X	B1 := B1 or A1 & BOOL;
X	-- SEMANTIC ERROR:  "or" not defined for arrays of different lengths.
X
X	A1 := B'(1=>TRUE) xor A1 & BOOL;
X	-- SEMANTIC ERROR:  "xor" not defined for arrays of different lengths.
X
X	B1 := BOOL & B'(TRUE,FALSE) and A1;
X	-- SEMANTIC ERROR:  "and" not defined for arrays of different lengths.
X
X	A1 := A'(1=>FALSE) or B'(FALSE,TRUE);
X	-- SEMANTIC ERROR:  "or" not defined for arrays of different lengths.
X        return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-0004a.vhdl-*-*
echo x - e-07-2-1-5001a.vhdl
sed 's/^X//' >e-07-2-1-5001a.vhdl <<'*-*-END-of-e-07-2-1-5001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary operator abs is not defined for non-numeric types.
X-- Check for single-element arrays of numerics.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E is
Xend E;
X 
Xarchitecture AB of E is
X-- L_X_1: block
X begin
X  process
X    type T1 is (RED,GREEN,YELLOW);
X    variable CH1 : character :='A';
X    variable CH2 : T1;
X    variable BO1 : boolean := true;
X  begin
X   CH1 := abs(CH1);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X   CH2 := ABS(CH2);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X   BO1 := abs ( BO1);
X-- ERROR THE abs UNARY OPERATOR IS NOT DEINED FOR NON-NUMERIC TYPES
X
X
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-1-5001a.vhdl-*-*
echo x - e-07-2-1-5002a.vhdl
sed 's/^X//' >e-07-2-1-5002a.vhdl <<'*-*-END-of-e-07-2-1-5002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the left operand of the binary arithmetic operator ** cannot be
X-- any type other than integer or floating point, and that the right operand
X-- cannot be any type other than integer. Check for objects, literals, function
X-- calls.
X-- cases:  Try on the left:  enumeration type, 1x1 array of real, 
X--	1 element record of integer, time, character, and bit.
X--	On the right:  real, time, 1 element record of integer, 1 element
X--	array of integer, and character.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_REAL_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_INTEGER_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_INTEGER_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function L1 ( A : SINGLE_REAL_ARRAY ) return SINGLE_REAL_ARRAY is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L1;
X
X	function L2 ( A : SINGLE_INTEGER_RECORD) return SINGLE_INTEGER_RECORD is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L2;
X
X	function L3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L3;
X
X	function L4 ( A : TIME ) return TIME is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L4;
X
X	function L5 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L5;
X
X	function L6 ( A : BIT ) return BIT is
X	begin
X		return A ** 2;
X		-- SEMANTICS ERROR:  left operand of "**" must be integer
X		--	or floating point.
X	end L6;
X
X	function R2 ( B : REAL ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R2;
X
X	function R3 ( B : SINGLE_INTEGER_ARRAY ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R3;
X
X	function R4 ( B : SINGLE_INTEGER_RECORD ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R4;
X
X	function R5 ( B : TIME ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R5;
X
X	function R6 ( B : CHARACTER ) return REAL is
X	begin
X		return 1.0 ** B;
X		-- SEMANTICS ERROR:  right operand of "**" must be integer.
X	end R6;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_REAL_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_INTEGER_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_INTEGER_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function L1 ( A : SINGLE_REAL_ARRAY ) return SINGLE_REAL_ARRAY is
X	begin
X		return A;
X	end L1;
X
X	function L2 ( A : SINGLE_INTEGER_RECORD) return SINGLE_INTEGER_RECORD is
X	begin
X		return A;
X	end L2;
X
X	function L3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end L3;
X
X	function L4 ( A : TIME ) return TIME is
X	begin
X		return A;
X	end L4;
X
X	function L5 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A;
X	end L5;
X
X	function L6 ( A : BIT ) return BIT is
X	begin
X		return A;
X	end L6;
X
X	function R2 ( B : REAL ) return REAL is
X	begin
X		return 1.0;
X	end R2;
X
X	function R3 ( B : SINGLE_INTEGER_ARRAY ) return REAL is
X	begin
X		return 1.0;
X	end R3;
X
X	function R4 ( B : SINGLE_INTEGER_RECORD ) return REAL is
X	begin
X		return 1.0;
X	end R4;
X
X	function R5 ( B : TIME ) return REAL is
X	begin
X		return 1.0;
X	end R5;
X
X	function R6 ( B : CHARACTER ) return REAL is
X	begin
X		return 1.0;
X	end R6;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_REAL_ARRAY;
X	variable I : SINGLE_INTEGER_RECORD;
X
X	variable E : ENUMERATION_TYPE := TWO ** 10;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable T : TIME := 1 S ** 3;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable C : CHARACTER := 'C' ** 4;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	variable B : BIT := '1' ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X  begin
X
X	A := (1=>0.0) ** 2;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	I := (E=>0) ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	A := L1(A) ** 128;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	I := L2(I) ** 27;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	E := L3(E) ** 2;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	T := L4(T) ** 5;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	C := L5(C) ** 3;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	B := L6(B) ** 1;
X		-- SEMANTICS ERROR:  left operand must be integer or
X		--	 floating point
X
X	A(1) := 1.0 ** L1(A);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L2(I);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L3(E);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L4(T);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L5(C);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	A(1) := 1.0 ** L6(B);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 1.0;
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** SINGLE_INTEGER_ARRAY'(1=>1);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** SINGLE_INTEGER_RECORD'(E=>1);
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 10 S;
X		-- SEMANTICS ERROR:  right operand must be integer.
X
X	I.E := 1 ** 'C';
X		-- SEMANTICS ERROR:  right operand must be integer.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-5002a.vhdl-*-*
echo x - e-07-2-1-5003a.vhdl
sed 's/^X//' >e-07-2-1-5003a.vhdl <<'*-*-END-of-e-07-2-1-5003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-5003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the right operand of ** is negative, the left operand must be
X-- a floating point type. Check for static expression.
X-- case:  user-defined integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	function F ( A : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return A ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X	end F;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	function F ( A : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return A;
X	end F;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X process
X	variable N : NEW_INTEGER := 10 ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X begin
X
X	N := F(N) ** (-2);
X		-- SEMANTICS ERROR:  if right operand is negative, 
X		-- 	then left operand of "**" must be floating point.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-1-5003a.vhdl-*-*
echo x - e-07-2-2-0001a.vhdl
sed 's/^X//' >e-07-2-2-0001a.vhdl <<'*-*-END-of-e-07-2-2-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of record types only.  Others in ...B & ...C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) record with single discrete element;
X-- 2) homogeneous record.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	type SINGLE is record	E : ENUM;		end record;
X	type SAME is record	E1,E2,E3 : BIT;		end record;
X
X	function F_SINGLE_BOOL ( A,B : SINGLE ) return BOOLEAN is
X	begin
X		return A < B;
X		-- SEMANTIC ERROR:  "<" not defined for record types
X	end F_SINGLE_BOOL;
X
X	function F_SAME_BOOL ( A,B : SAME ) return BOOLEAN is
X	begin
X		return A <= B;
X		-- SEMANTIC ERROR:  "<=" not defined for record types
X	end F_SAME_BOOL;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is (ONE,TWO,THREE,FOUR);
X	type SINGLE is record	E : ENUM;		end record;
X	type SAME is record	E1,E2,E3 : BIT;		end record;
X
X	function F_SINGLE_REC ( A : ENUM ) return SINGLE is
X	begin	return (E=>A);
X	end F_SINGLE_REC;
X
X	function F_SAME_REC ( A : bit ) return SAME is
X	begin	return (others=>A);
X	end F_SAME_REC;
X
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1,PT2 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X
X	variable B1 : boolean := SINGLE'(E=>ONE) < SINGLE'(E=>TWO);
X		-- SEMANTIC ERROR:  "<" not defined for record types
X
X	variable B2 : boolean := SAME'(others=>'1') <= SAME'(others=>'1') ;
X		-- SEMANTIC ERROR:  "<=" not defined for record types
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_SINGLE_REC(ONE) >= F_SINGLE_REC(TWO);
X		-- SEMANTIC ERROR:  ">=" not defined for record types
X
X	PT2 <= F_SAME_REC('1') > F_SAME_REC('0');
X		-- SEMANTIC ERROR:  ">" not defined for record types
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001a.vhdl-*-*
echo x - e-07-2-2-0001b.vhdl
sed 's/^X//' >e-07-2-2-0001b.vhdl <<'*-*-END-of-e-07-2-2-0001b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of multi-dimensional array types only.  Others in  to .A &  to .
X-- cases:  objects, aggregates, and function calls of
X-- multi-dimensional array of discrete type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) if statement (objects);
X-- 3) variable declaration (aggregates);
X-- 4) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all;
Xpackage body P is
X	type MULTI is array (integer range <>, integer range <>) of integer;
X	subtype S_MULTI is MULTI ( 1 to 3, 1 to 2 );
X	function F_BOOL ( A,B : MULTI ) return boolean is
X	begin
X		if A > B then
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X			return A < B;
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X		else
X			return A <= B;
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X		end if;
X	end F_BOOL;
X
X	
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type MULTI is array (integer range <>, integer range <>) of integer;
X	subtype S_MULTI is MULTI ( 1 to 3, 1 to 2 );
X
X        function F_SMULTI ( A : integer ) return S_MULTI is
X	begin	return (others=>(others=>2));
X	end F_SMULTI;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1, PT2 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable B1 : boolean := S_MULTI'(1 to 3=>(1,2)) > S_MULTI'(1 to 3=>(2,3));
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X	variable B2 : boolean := S_MULTI'(1 to 3=>(1,2)) < S_MULTI'(1 to 3=>(2,3));
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_SMULTI(1) >= F_SMULTI(2);
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X
X	PT2 <= F_SMULTI(1) <= F_SMULTI(2);
X		-- SEMANTIC ERROR:  not defined for multi-dimensional arrays
X  end process; 
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001b.vhdl-*-*
echo x - e-07-2-2-0001c.vhdl
sed 's/^X//' >e-07-2-2-0001c.vhdl <<'*-*-END-of-e-07-2-2-0001c.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-2001C.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are not defined for record
X-- types, for multidimensional arrays, or for one-dimensional arrays whose
X-- elements are not of a discrete type. Check for arrays of arrays (as
X-- distinguished from multidimensional arrays), arrays of records, records of
X-- homogeneous discrete types, records with single discrete element, arrays of
X-- floating point.
X-- note:  cases of one dimensional arrays only.  Others in  to .A &  to .C.
X-- cases:  objects, aggregates, and function calls of
X-- 1) array of arrays;
X-- 2) array of records;
X-- 3) array of floating point.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (aggregates);
X-- 3) signal assignment (function calls);
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ARR is array ( 1 to 2 ) of integer;
X	type REC is record	E : boolean;	end record;
X
X	type FLT_ARRAY is array ( 1 to 10 ) of real;
X	type ARR_ARRAY is array ( 1 to 10 ) of ARR;
X	type REC_ARRAY is array ( 1 to 10 ) of REC;
X
X	function F_FLT_BOOL ( A,B : FLT_ARRAY ) return boolean is
X	begin
X		return A < B;
X		-- SEMANTIC ERROR:
X		--	"<" not defined for arrays of nondiscrete elements.
X	end F_FLT_BOOL;
X
X	function F_ARR_BOOL ( A,B : ARR_ARRAY ) return boolean is
X	begin
X		return A <= B;
X		-- SEMANTIC ERROR:
X		--	"<=" not defined for arrays of nondiscrete elements.
X	end F_ARR_BOOL;
X
X	function F_REC_BOOL ( A,B : REC_ARRAY ) return boolean is
X	begin
X		return A > B;
X		-- SEMANTIC ERROR:  
X		--	">" not defined for arrays of nondiscrete elements.
X	end F_REC_BOOL;
X
X	function F_FLT_ARRAY ( A : real ) return FLT_ARRAY is
X	begin	return ( others=>A );
X	end F_FLT_ARRAY;
X
X	function F_ARR_ARRAY ( A : ARR ) return ARR_ARRAY is
X	begin	return ( others=>A );
X	end F_ARR_ARRAY;
X
X	function F_REC_ARRAY ( A : REC ) return REC_ARRAY is
X	begin	return ( others=>A );
X	end F_REC_ARRAY;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type ARR is array ( 1 to 2 ) of integer;
X	type REC is record	E : boolean;	end record;
X
X	type FLT_ARRAY is array ( 1 to 10 ) of real;
X	type ARR_ARRAY is array ( 1 to 10 ) of ARR;
X	type REC_ARRAY is array ( 1 to 10 ) of REC;
X
X	function F_FLT_ARRAY ( A : real ) return FLT_ARRAY is
X	begin	return ( others=>A );
X	end F_FLT_ARRAY;
X
X	function F_ARR_ARRAY ( A : ARR ) return ARR_ARRAY is
X	begin	return ( others=>A );
X	end F_ARR_ARRAY;
X
X	function F_REC_ARRAY ( A : REC ) return REC_ARRAY is
X	begin	return ( others=>A );
X	end F_REC_ARRAY;
Xend P;
X
X
X-- with package P; use P.all;
Xentity E  is
X    port ( PT1,PT2,PT3 : out boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable B1 : boolean := 
X		FLT_ARRAY'(others=>1.0) > FLT_ARRAY'(others=>5.2);
X		-- SEMANTIC ERROR:
X		--	">" not defined for arrays of nondiscrete elements.
X
X	variable B2 : boolean := 
X		ARR_ARRAY'(others=>(others=>1)) < ARR_ARRAY'(others=>(1,2));
X		-- SEMANTIC ERROR:
X		--	"<" not defined for arrays of nondiscrete elements.
X
X	variable B3 : boolean := 
X		REC_ARRAY'(others=>(E=>TRUE)) <= REC_ARRAY'(others=>(E=>TRUE));
X		-- SEMANTIC ERROR:
X		--	"<=" not defined for arrays of nondiscrete elements.
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X begin
X  process
X  begin
X	PT1 <= F_FLT_ARRAY(1.0) >= F_FLT_ARRAY(5.2);
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X
X	PT2 <= F_ARR_ARRAY( (1,0) ) >= F_ARR_ARRAY( (5,2) );
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X
X	PT3 <= F_REC_ARRAY( (E=>TRUE) ) >= F_REC_ARRAY( (E=>FALSE) );
X	-- SEMANTIC ERROR:
X	--	">=" not defined for arrays of nondiscrete elements.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-0001c.vhdl-*-*
echo x - e-07-2-2-2001a.vhdl
sed 's/^X//' >e-07-2-2-2001a.vhdl <<'*-*-END-of-e-07-2-2-2001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that positional associations must precede any named associations.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 2);
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S1 <= (1=>TRUE,TRUE);
X	-- SEMANTIC ERROR:  positional association cannot follow named.
X
X	S2 <= (E1=>FALSE,TRUE);
X	-- SEMANTIC ERROR:  positional association cannot follow named.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2001a.vhdl-*-*
echo x - e-07-2-2-2002a.vhdl
sed 's/^X//' >e-07-2-2-2002a.vhdl <<'*-*-END-of-e-07-2-2-2002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that no association may follow an "others" association.
X-- cases:  1x2 array, 2 element record.
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 2) ;
X
X	signal S2 : RECORD_TYPE ;
X begin
X  process
X  begin
X	S1 <= (others=>TRUE,TRUE);
X	-- SEMANTIC ERROR:  association cannot follow "others" association.
X
X	S2 <= (others=>FALSE,TRUE);
X	-- SEMANTIC ERROR:  association cannot follow "others" association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2002a.vhdl-*-*
echo x - e-07-2-2-2003a.vhdl
sed 's/^X//' >e-07-2-2-2003a.vhdl <<'*-*-END-of-e-07-2-2-2003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases with more than one "others" association in an aggregate.
X--	Other cases in E-07-2-2-2003B.VHD.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S2 <= (others=>TRUE,others=>FALSE);
X	-- SEMANTIC ERROR:  more than one "others" association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2003a.vhdl-*-*
echo x - e-07-2-2-2003b.vhdl
sed 's/^X//' >e-07-2-2-2003b.vhdl <<'*-*-END-of-e-07-2-2-2003b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2003B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that only one "others" association is allowed per aggregate, and that
X-- "others" can be the only choice in the element association in which it
X-- occurs.
X-- note:  only cases where "others" is not the only choice in an element 
X--	association.  other cases in E-07-2-2-2003A.VHD.
X-- cases:  1x3 array, 3 element record
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X
X	signal S2 : RECORD_TYPE;
X begin
X  process
X  begin
X	S2 <= (E2 => TRUE, others | E1 => FALSE);
X	-- SEMANTIC ERROR:  "others" must be only choice in an association.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2003b.vhdl-*-*
echo x - e-07-2-2-2004a.vhdl
sed 's/^X//' >e-07-2-2-2004a.vhdl <<'*-*-END-of-e-07-2-2-2004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- specified using named association (in order to distinguish them from
X-- parenthesized expressions).
X-- contexts:  signal assignment and declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X        
X	type SINGLE_ELEMENT_RECORD is record
X			E : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : SINGLE_ELEMENT_RECORD ;
X begin
X  process
X  begin
X	S <= (E => TRUE);
X
X	S <= (TRUE);
X		-- SEMANTIC ERROR:  single element record must be specified
X		--	using named association.
X  end process;
X--  end block;
Xend AB;
X
*-*-END-of-e-07-2-2-2004a.vhdl-*-*
echo x - e-07-2-2-2005a.vhdl
sed 's/^X//' >e-07-2-2-2005a.vhdl <<'*-*-END-of-e-07-2-2-2005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is an element simple
X-- name (and that cannot be interpreted as a simple expression) is only
X-- allowed in a record aggregate.
X-- cases:  1-dimensional array of character.
X-- contexts:  signal declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	type ARRAY_TYPE is array (INTEGER range <>) of CHARACTER;
X	function F return INTEGER is
X	begin
X		return 1;
X	end F;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block 
X	signal S : ARRAY_TYPE(1 to 5) ;
X begin
X  process
X  begin
X	S <= (F=>' ', others=>'x');
X		-- SEMANTIC ERROR:  choice which is a simple name
X		--	can only occur in a record aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process
X	variable V : ARRAY_TYPE(1 to 5);
X	variable C : INTEGER := 1;
X  begin
X	V := ( C=>'C', others=>' ' );
X		-- SEMANTIC ERROR:  choice which is a simple name
X		--	can only occur in a record aggregate.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2005a.vhdl-*-*
echo x - e-07-2-2-2006a.vhdl
sed 's/^X//' >e-07-2-2-2006a.vhdl <<'*-*-END-of-e-07-2-2-2006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is a simple expression
X-- (and that cannot be interpreted as an element simple name) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006B.VHD
X-- note:  only cases where a choice is a simple expression in a 
X--	record aggregate.
X-- cases:  homogeneous 3 element record, only static expressions.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : RECORD_TYPE ;
X begin
X  process
X  begin
X	S <= ( (1+2)=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process
X	variable V : RECORD_TYPE;
X	constant C : INTEGER := 1;
X  begin
X	V := ( TRUE, TRUE, (3*1)=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X
X	V := ( C=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are expressions
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend BB;
X
*-*-END-of-e-07-2-2-2006a.vhdl-*-*
echo x - e-07-2-2-2006b.vhdl
sed 's/^X//' >e-07-2-2-2006b.vhdl <<'*-*-END-of-e-07-2-2-2006b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2006B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with a choice that is a simple expression
X-- ( and that cannot be interpreted as an element simple name ) or a
X-- discrete range is not allowed in a record aggregate.
X-- 	see also E-07-2-2-2006A.VHD
X-- note:  only cases where a choice is a discrete range in a record aggregate.
X-- cases:  homogenous record type;  expressions are all static.
X-- contexts:
X-- 1) signal declaration and assignment;
X-- 2) variable declaration and assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type RECORD_TYPE is record
X			E1,E2,E3 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  use P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S : RECORD_TYPE ;
X begin
X  process
X  begin
X	S <= ( E1 to E3 => FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend AB;
X
Xarchitecture BB of E is
X-- L_X_2: block
X begin
X  process 
X	constant C : INTEGER := 1;
X	variable V : RECORD_TYPE;
X  begin
X	V := ( 1 to C=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X
X	V := ( E1 to E2=>TRUE, others=>FALSE );
X		-- SEMANTICS ERROR:  choices which are discrete ranges
X		--	can only occur in an array aggregate.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2006b.vhdl-*-*
echo x - e-07-2-2-2007a.vhdl
sed 's/^X//' >e-07-2-2-2007a.vhdl <<'*-*-END-of-e-07-2-2-2007a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2007A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the type of an aggregate must be determinable solely from the
X-- context in which the aggregate appears, excluding the aggregate itself, but
X-- using the fact that the type of the aggregate must be a composite type. 
X-- Check that a boolean expression of the form "aggregate = aggregate" is 
X-- illegal. Check that an attribute name of the form "aggregate'LENGTH" is 
X-- illegal.
X-- Questions:  Are these true for qualified aggregates as well?
X-- cases:  simple record and array aggregates.
X-- contexts:
X-- 1) port declaration;
X-- 2) variable assignment;
X-- 3) loop parameter specification.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type SIMPLE_ARR is array ( 1 to 3 ) of boolean;
X	type SIMPLE_REC is record
X			E1,E2,E3 : integer;
X		end record;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E is
X port ( PT : boolean := 
X    (E1=>1,E2=>2,E3=>3) = (E1=>0,E2=>1,E3=>2) ) ;
X-- SEMANTIC ERROR:  type of aggregate must be determinable from context.
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E is
X   port ( PT : boolean ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X    variable I : integer := 0;
X    variable B : boolean;
X  begin
X	while (1 to 3=>TRUE) = (1 to 3 =>FALSE) loop
X	-- SEMANTIC ERROR:  type of aggregate must be determinable 
X	--	from context.
X
X                I := I + 1;
X
X		B := (E1=>I,E2=>I,E3=>I) = (E1=>0,others=>2);
X		-- SEMANTIC ERROR:  type of aggregate must be determinable 
X		--	from context.
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2007a.vhdl-*-*
echo x - e-07-2-2-2101a.vhdl
sed 's/^X//' >e-07-2-2-2101a.vhdl <<'*-*-END-of-e-07-2-2-2101a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2101A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the type of an aggregate is a record type, the element names
X-- given as choices must denote elements of that record type.
X-- cases:
X-- 1) qualified aggregate where the element name in choice
X--	does not match an element name of the record type but matches an
X--	element name of a similiar record type.
X-- 2) unqualified aggregate, type discernable from context, element name
X--	as in 1).
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	type NEW_INTEGER is range INTEGER'RIGHT downto INTEGER'LEFT;
X
X	type A_RECORD is record
X			A : CHARACTER;
X		end record;
X
X	type B_RECORD is record
X			B : CHARACTER;
X		end record;
X
X	type C_RECORD is record
X			C1, C2, C3 : INTEGER;
X		end record;
X
X	type D_RECORD is record
X			D1 : NEW_INTEGER;
X			D2 : INTEGER;
X			D3 : C_RECORD;
X		end record;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : A_RECORD;
X	variable B : B_RECORD;
X begin
X	A := A_RECORD'(B=>'E');
X	-- SEMANTICS ERROR:  choice does not denote record element (case 2)
X
X	B := (A=>'F');
X	-- SEMANTICS ERROR:  choice does not denote record element (case 1)
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2101a.vhdl-*-*
echo x - e-07-2-2-2102a.vhdl
sed 's/^X//' >e-07-2-2-2102a.vhdl <<'*-*-END-of-e-07-2-2-2102a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2102A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that all of the elements of the record type must be accounted for by
X-- the set of element associations.
X-- cases:
X-- 1) all positional associations with the last element missing.
X-- 2) positional then named associations with the element "in-between" missing.
X-- 3) all named associations with one element given incompletely as in 1).
X-- 4) all positional associations with one element given as in 2).
X-- 5) all named with one element missing.
X-- contexts:
X-- 1) variable assignment statement in behavioral body
X-- 2) variable initialization during declaration in behavioral body
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record
X			A : CHARACTER;
X		end record;
X
X	type B_RECORD is record
X			B : CHARACTER;
X		end record;
X
X	type C_RECORD is record
X			C1, C2, C3 : INTEGER;
X		end record;
X
X	type D_RECORD is record
X			D1 : NEW_INTEGER;
X			D2 : INTEGER;
X			D3 : C_RECORD;
X		end record;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable C1 : C_RECORD;
X	variable C2 : C_RECORD;
X	variable D1 : D_RECORD;
X	variable D2 : D_RECORD;
X  begin
X	C1 := ( -1001, 32767 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 1)
X
X	C2 := ( 2, C3=> 100 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 2)
X
X        D1 := ( D1=>-101, D2=>-855, D3=>(0,0) );
X	-- SEMANTICS ERROR:  record element unaccountable (case 3)
X
X	D2 := ( 63, -63, ( 357, C3=> 3400 ) );
X	-- SEMANTICS ERROR:  record element unaccountable (case 4)
X
X        C2 := ( C1=>1,C2=>4 );
X	-- SEMANTICS ERROR:  record element unaccountable (case 5)
X
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2102a.vhdl-*-*
echo x - e-07-2-2-2103a.vhdl
sed 's/^X//' >e-07-2-2-2103a.vhdl <<'*-*-END-of-e-07-2-2-2103a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2103A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that no element of the record type may appear in more than one choice
X-- in the set of element associations.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) positional then named, with last positional association specified in a
X--	named association;
X-- 2) one element named twice in two "or" choices to have the same value.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record		A : CHARACTER;		end record;
X	type B_RECORD is record		B : CHARACTER;		end record;
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	type F_RECORD is record		F : A_RECORD;		end record;
X
X        attribute C_ATTR of body,entity,function is C_RECORD ;
X
X  
X	function A_FUN ( PAR : A_RECORD ) return A_RECORD is
X	begin
X		return ( A => PAR.A, A => PAR.A );
X		-- SEMANTICS ERROR:  element A named in more than one choice.
X	end A_FUN;
X
X	function B_FUN ( PAR : B_RECORD ) return B_RECORD is
X	begin
X		return ( B => PAR.B, B => PAR.B );
X		-- SEMANTICS ERROR:  element B named in more than one choice.
X	end B_FUN;
X
X	function C_FUN ( PAR : C_RECORD ) return C_RECORD is
X                variable C_VAR : C_RECORD;
X	begin
X
X                C_VAR := ( 1, 2, 3, C1=>4);
X                -- SEMANTICS ERROR:  element C1 has two associations.
X
X		return ( C1=>PAR.C1, C2=>PAR.C2, C3 | C2 =>PAR.C2 );
X		-- SEMANTICS ERROR:  element C2 named in more than one choice.
X	end C_FUN;
X
X	function D_FUN ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return ( D1=>1, D2=>PAR.D2, D3=>PAR.D3, D2=>PAR.D2 );
X		-- SEMANTICS ERROR:  element D2 named in more than one choice.
X	end D_FUN;
X
X	function E_FUN ( PAR : E_RECORD  ) return E_RECORD is
X	begin
X		return ( E1=>PAR.E1, E2=>PAR.E2, E1=>PAR.E1 );
X		-- SEMANTICS ERROR:  element E1 named in more than one choice.
X	end E_FUN;
X
X	function F_FUN ( PAR : F_RECORD ) return F_RECORD is
X	begin
X		return ( F => PAR.F, F => PAR.F );
X		-- SEMANTICS ERROR:  element F named in more than one choice.
X	end F_FUN;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type A_RECORD is record		A : CHARACTER;		end record;
X	type B_RECORD is record		B : CHARACTER;		end record;
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	type F_RECORD is record		F : A_RECORD;		end record;
X
X  
X        attribute C_ATTR of body,entity,function is C_RECORD ;
X
X	function A_FUN ( PAR : A_RECORD ) return A_RECORD is
X	begin
X		return PAR;
X	end A_FUN;
X
X	function B_FUN ( PAR : B_RECORD ) return B_RECORD is
X	begin
X		return PAR;
X	end B_FUN;
X
X	function C_FUN ( PAR : C_RECORD ) return C_RECORD is
X	begin
X		return PAR;
X	end C_FUN;
X
X	function D_FUN ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return PAR;
X	end D_FUN;
X
X	function E_FUN ( PAR : E_RECORD ) 
X		return E_RECORD is
X	begin
X		return PAR;
X	end E_FUN;
X
X	function F_FUN ( PAR : F_RECORD ) return F_RECORD is
X	begin
X		return PAR;
X	end F_FUN;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric ( 	G_CHAR : CHARACTER;	G_INT : INTEGER;
X		G_NINT : NEW_INTEGER;	G_BIT : BIT;
X		G_BOOL : BOOLEAN			)
X  ;
X    port (
X	A_PT_IN : in A_RECORD;	B_PT_IN : in B_RECORD;
X	C_PT_IN : in C_RECORD;	D_PT_IN : in D_RECORD;
X	E_PT_IN : in E_RECORD;	F_PT_IN : in F_RECORD;
X	A_PT_OUT : out A_RECORD;
X	C_PT_OUT : out C_RECORD;
X	D_PT_OUT : out D_RECORD;
X	E_PT_OUT : out E_RECORD;
X	F_PT_OUT : out F_RECORD
X	) ;
X
X      
Xassert
X	C_RECORD'( (C1=>G_INT, C2|C3|C1=>G_INT) ) /= C_PT_IN;
X	-- SEMANTICS ERROR:  element C1 named in more than one choice.
Xend E;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric ( 	G_CHAR : CHARACTER;	G_INT : INTEGER;
X		G_NINT : NEW_INTEGER;	G_BIT : BIT;
X		G_BOOL : BOOLEAN			)
X  ;
X    port (
X	A_PT_IN : in A_RECORD;	B_PT_IN : in B_RECORD;
X	C_PT_IN : in C_RECORD;	D_PT_IN : in D_RECORD;
X	E_PT_IN : in E_RECORD;	F_PT_IN : in F_RECORD;
X	A_PT_OUT : out A_RECORD;
X	C_PT_OUT : out C_RECORD;
X	D_PT_OUT : out D_RECORD;
X	E_PT_OUT : out E_RECORD;
X	F_PT_OUT : out F_RECORD
X	) ;
X
X      
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : D_RECORD;
X
X begin
X	V := ( D1=>D_PT_IN.D1, D2=>G_INT, D3=>(1,2,3), D2=>2 );
X	-- SEMANTICS ERROR:  element D2 named in more than one choice.
X
X	if A_PT_IN = (A=>'a', A=>G_CHAR) then
X	-- SEMANTICS ERROR:  element A named in more than one choice.
X
X		while C_FUN( (C1=>V.D2, C2=>V.D2, C1|C3=>V.D2) ).C1 < 5 loop
X		-- SEMANTICS ERROR:  element C1 named in more than one choice.
X
X			V := ( V.D1+1, V.D2+1, D3=>V.D3, D3=>V.D3 );
X		-- SEMANTICS ERROR:  element D3 named in more than one choice.
X
X		end loop;
X	end if;
X
X	F_PT_OUT <= ( F=>(A=>G_CHAR), F=>(A=>G_CHAR) );
X	-- SEMANTICS ERROR:  element F named in more than one choice.
X
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : A_RECORD ;
X
X	component C port( PT_IN : in E_RECORD;
X                          PT_OUT : out E_RECORD );
X        end component ;
X begin
X	C_1: C port map( 
X                    E_FUN(('1',E2=>TRUE,E2=>TRUE)),
X                    E_PT_OUT );
X	-- SEMANTICS ERROR:  element E2 named in more than one choice.
X
X	S <= ( A=>A_FUN((A=>'a')).A, A=>'b' );
X	-- SEMANTICS ERROR:  element A named in more than one choice.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2103a.vhdl-*-*
echo x - e-07-2-2-2104a.vhdl
sed 's/^X//' >e-07-2-2-2104a.vhdl <<'*-*-END-of-e-07-2-2-2104a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2104A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that there may be no more element associations than there are record
X-- elements.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) all positional associations with one more element.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X	variable V : E_RECORD;
X
Xbegin
X	V := ( '0', F_TRUE, F_TRUE );
X		-- SEMANTICS ERROR:  more associations than elements.
X
X	if PAR /= ( F_INT, F_INT*2, 3, -100 ) then
X		-- SEMANTICS ERROR:  more associations than elements.
X
X		return ( PAR.C1, PAR.C2, PAR.C3, PAR.C4 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	else
X		return ( F_INT, PAR.C1, PAR.C2, PAR.C3 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	end if;
X   end F;
Xend P ;
X
X-- with package P; use P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X  begin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
Xgeneric ( G_BIT : BIT;  
X          G_BOOL : BOOLEAN;  
X          G_INT : INTEGER ) ;
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X    assert
X	PT_IN /= ('1',TRUE,TRUE);
X	-- SEMANTICS ERROR:  more associations than elements.
Xend E;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
X    generic ( G_BIT : BIT;  
X              G_BOOL : BOOLEAN;  
X              G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X 	variable V : C_RECORD;
X  begin
X	while F(V) /= (G_INT,2,3,4) loop
X		-- SEMANTICS ERROR:  more associations than elements.
X		V := ( V.C1+1, V.C2+2, 3, 3 );
X		-- SEMANTICS ERROR:  more associations than elements.
X	end loop;
X
X	PT_OUT <= (G_BIT,G_BOOL,F_TRUE);
X		-- SEMANTICS ERROR:  more associations than elements.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port( PT_IN : in E_RECORD; 
X			  PT_OUT : out E_RECORD );
X 	end component ;
X begin
X--	C_1: C port ( ('1',G_BOOL,F_TRUE), PT_OUT );
X	C_1: C port map ( G_BOOL,F_TRUE, PT_OUT );
X	-- SEMANTICS ERROR:  more associations than elements.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2104a.vhdl-*-*
echo x - e-07-2-2-2105a.vhdl
sed 's/^X//' >e-07-2-2-2105a.vhdl <<'*-*-END-of-e-07-2-2-2105a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2105A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the choice "others" must represent at least one element.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) all positional associations with an extra "others" choice;
X-- 2) positional then named with an extra "others" choice;
X-- 3) all named with an extra "others" choice;
X-- 4) correct aggregate with one element which is a record incorrectly
X--	specified as in 2).
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute C_ATTR of function is C_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
X
X	function F_D_REC ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return ( 1, 2, ( 1, C2=>F_INT, C3=>10, others=>20 ) );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end F_D_REC;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute C_ATTR of function is C_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
X
X	function F_D_REC ( PAR : D_RECORD ) return D_RECORD is
X	begin
X		return PAR;
X	end F_D_REC;
Xend P;
X
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X
X	variable V : E_RECORD ;
X
X  begin
X	if PAR /= ( F_INT, F_INT*2, 3, others=>-100 ) then
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X
X		return ( PAR.C1, PAR.C2, PAR.C3, others=>PAR.C3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	else
X		return ( F_INT, PAR.C1, PAR.C2, others=>PAR.C3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
X  begin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
X    generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN;  
X		G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X    assert
X	PT_IN /= ('1',TRUE,others=>TRUE);
X -- SEMANTICS ERROR:  "others" does not represent any elements.
Xend E;
X
X-- with package P; 
Xuse P.F;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  
X  	G_BOOL : BOOLEAN;  
X	G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : C_RECORD ;
Xbegin
X	while F(V) /= (G_INT,2,3,others=>4) loop
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X		V := ( V.C1+1, V.C2+2, 3, others=>3 );
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	end loop;
X
X	PT_OUT <= (G_BIT,G_BOOL,others=>F_TRUE);
X		-- SEMANTICS ERROR:  "others" does not represent any elements.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port( PT_IN : 
X			in E_RECORD; 
X			PT_OUT : 
X			out E_RECORD );
X	end component ;
X begin
X--        C_1: C port  ( ('1',G_BOOL,others=>F_TRUE), PT_OUT ) ;
X        C_1: C port map  ( G_BOOL,others=>F_TRUE, PT_OUT ) ;
X-- SEMANTICS ERROR: "others" does not represent any elements.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2105a.vhdl-*-*
echo x - e-07-2-2-2106a.vhdl
sed 's/^X//' >e-07-2-2-2106a.vhdl <<'*-*-END-of-e-07-2-2-2106a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2106A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an element association with more than one choice or with the
X-- choice "others" is allowed only if the elements specified are all of the 
X-- same type.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) the two elements are of types BIT and BOOLEAN;
X-- 2) the two elements are of types predefined integer and re-defined integer.
X-- contexts:
X-- 1) if statement;
X-- 2) while loop;
X-- 3) variable assignment;
X-- 4) function return statement;
X-- 5) assertion definition;
X-- 6) signal assignment;
X-- 7) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X
X	type C_RECORD is record		C1, C2, C3 : INTEGER;	end record;
X	type D_RECORD is record		D1 : NEW_INTEGER;
X					D2 : INTEGER;
X					D3 : C_RECORD;		end record;
X	type E_RECORD is record		E1 : BIT;
X					E2 : BOOLEAN;		end record;
X
X-- ?	attribute D_ATTR of function is D_RECORD ;
X
X-- ?	attribute E_ATTR of function is E_RECORD ;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : D_RECORD ) return D_RECORD is
X
X	variable V : E_RECORD ;
X
Xbegin
X	if PAR /= ( D1|D2=>F_INT, D3=>(1,2,3) ) then
X		-- SEMANTICS ERROR:  elements specified are of different types.
X
X		return ( D3=>(4,4,4), others=>PAR.D1 );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	else
X		return ( D3=>(-1,-1,-1), D1|D2=>F_INT );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	end if;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : D_RECORD ) return D_RECORD is
Xbegin
X	return PAR;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  G_BOOL : BOOLEAN;  G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xbegin
X   assert
X	PT_IN /= (others=>TRUE);
X	-- SEMANTICS ERROR:  elements specified are of different types.
Xend E;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_BIT : BIT;  G_BOOL : BOOLEAN;  G_INT : INTEGER );
X    port ( PT_IN : in E_RECORD; 
X	PT_OUT : out E_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : D_RECORD ;
X  begin
X	while F(V) /= ( D3=>(G_INT,2,3),others=>4) loop
X		-- SEMANTICS ERROR:  elements specified are of different types.
X		V := ( D3=>(1,1,1), others=>V.D1+1 );
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	end loop;
X
X	PT_OUT <= (others=>F_TRUE);
X		-- SEMANTICS ERROR:  elements specified are of different types.
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X
X	component C port  ( PT_IN : in E_RECORD; PT_OUT : out E_RECORD );
X	end component ;
X begin
X	C_1: C port map  ( others=>F_TRUE, PT_OUT ) ;
X	-- SEMANTICS ERROR:  elements specified are of different types.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2106a.vhdl-*-*
echo x - e-07-2-2-2107a.vhdl
sed 's/^X//' >e-07-2-2-2107a.vhdl <<'*-*-END-of-e-07-2-2-2107a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2107A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the expression of an element association must have the type of 
X-- the associated record element. Check for objects, literals, aggregates, 
X-- function calls.
X-- PS  7/21/84
X-- DB 7/22/85,9/5/85
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type A_RECORD is record	A : NEW_INT; end record;
X	type B_RECORD is record	B : NEW_INT; end record;
X	type C_RECORD is record	C : A_RECORD; end record;
X	type D_RECORD is record	D : BIT; end record;
X-- ?	attribute D_ATTR of entity,function is D_RECORD;
X-- ?	attribute A_ATTR of entity,function is A_RECORD;
X
X	function F_INT return INTEGER is
X	begin
X		return 1;
X	end F_INT;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
X  function F ( PAR : C_RECORD ) return C_RECORD is
X	variable V : A_RECORD ;
X  begin
X	if PAR /= (C=>(B=>10)) then
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X            return (C=>(B_RECORD'(B=>INTEGER'LOW)));
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X	else
X            return (others=>(B_RECORD'(B=>F_INT)));
X		-- SEMANTICS ERROR:  element C is of type A_RECORD.
X	end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : C_RECORD ) return C_RECORD is
Xbegin
X	return PAR;
Xend F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
X         generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN; 
X		G_INT : INTEGER ) ;
X    port ( PT_IN : in D_RECORD; 
X           PT_OUT : out D_RECORD ) ;
Xbegin
X assert
X    PT_IN /= (others=>TRUE);
X    -- SEMANTICS ERROR:  element D is of type BIT.
Xend E;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
X         generic ( G_BIT : BIT;  
X		G_BOOL : BOOLEAN;  
X		G_INT : INTEGER ) ;
X    port ( PT_IN : in D_RECORD; 
X           PT_OUT : out D_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1:block
Xbegin
X process
X    variable V : C_RECORD;
X begin
X    V := F( (others=>(B=>10)) );
X    -- SEMANTICS ERROR:  element specified is of type A_RECORD.
X  while F(V) /= (C=>B_RECORD'(B=>1)) loop
X  -- SEMANTICS ERROR:  element C is of type A_RECORD.
X    V := ( F( (C=>(B=>1)) ) );
X    -- SEMANTICS ERROR:  element C is of type A_RECORD.
X  end loop;
X  PT_OUT <= (others=>F_TRUE);
X  -- SEMANTICS ERROR:  element specified is of type BIT.
X end process;
X-- end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:block
X  signal S : A_RECORD;
X  component C port ( PT_IN : in D_RECORD; PT_OUT : out D_RECORD );
X	end component ;
Xbegin
X  C_1: C port map ( others=>F_TRUE, PT_OUT ) ;
X    -- SEMANTICS ERROR:  element specified is of type BIT.
X  process
X  begin
X    S <= ( others=>G_INT );
X    -- SEMANTICS ERROR:  element specified is of type NEW_INT.
X  end process;
X-- end block;
Xend AB;
*-*-END-of-e-07-2-2-2107a.vhdl-*-*
echo x - e-07-2-2-2201a.vhdl
sed 's/^X//' >e-07-2-2-2201a.vhdl <<'*-*-END-of-e-07-2-2-2201a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2201A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each choice must specify a value of the index type.
X-- cases:
X-- 1) choice is an object of type BIT and the index type is BOOLEAN;
X-- 2) choices are the positional values of the (enumeration) index type;
X-- contexts:
X-- 1) variable assignment;
X-- 2) return statement;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X
X
X    function F return A_ARRAY is
X	variable V : B_ARRAY;
X    begin
X	V := ( 1=>550.0, others => 0.0 );
X	-- SEMANTICS ERROR:  choice is of type integer, index type is ENUM.
X	return A_ARRAY'( ('0' => 4, '1' => -10) );
X	-- SEMANTICS ERROR:  choice is of type Bit, index type is boolean.
X    end F;
X
Xend P;
*-*-END-of-e-07-2-2-2201a.vhdl-*-*
echo x - e-07-2-2-2202a.vhdl
sed 's/^X//' >e-07-2-2-2202a.vhdl <<'*-*-END-of-e-07-2-2-2202a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2202A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the expression of each element association of an n-dimensional
X-- array must be an (n-1) dimensional array or array aggregate with
X-- elements of the array element type.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X    type A_ARRAY is array ( boolean range <>,integer range <>) of integer;
X    type B_ARRAY is array ( ENUM range <>, ENUM range <> ) of real;
X    type C_ARRAY is array ( integer range <>, integer range <>, 
X                   integer range <>, integer range <>) of character;
X 
X    subtype A_CON is A_ARRAY (FALSE to TRUE, 1 to 2);
X    subtype B_CON is B_ARRAY (ONE to TWO, FIVE to FIVE);
X    subtype C_CON is C_ARRAY ( 1 to 1, 2 to 2, 3 to 3, 4 to 4);             
X	
Xend P;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F(I : INTEGER) return A_CON is
X
Xbegin
X   if I = 1 then
X      return ( others => 3 );
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X   elsif I = 2 then
X      return ( FALSE => 
X                      ( 1 => 
X                           B_ARRAY'( ONE => 
X                                         ( FIVE => 2.0), 
X                                     TWO => 
X                                          (FIVE => 3.0)
X                                    ),
X                        2 => 
X                           B_ARRAY'( ONE => 
X                                         ( FIVE => 2.0), 
X                                     TWO => 
X                                          (FIVE => 3.0)
X                                    )
X                       )
X             );
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X   end if;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xprocedure PP is
X  variable AA : C_CON;
Xbegin
X  AA := ( 1 => "THIS IS A STRING");
X   -- ERROR : Each element association must be an n-1 dimensional array agg
X  end PP;
Xend P ;
*-*-END-of-e-07-2-2-2202a.vhdl-*-*
echo x - e-07-2-2-2203a.vhdl
sed 's/^X//' >e-07-2-2-2203a.vhdl <<'*-*-END-of-e-07-2-2-2203a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2203A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that (aside from a final element association with the single choice
X-- "others") all element associations of an array aggregate must be either all
X-- positional or all named.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) mixed positional and named associations without an "others" association.
X-- contexts:
X-- 1) if statement;
X-- 2) variable assignment;
X-- 3) function return statement;
X-- 4) signal assignment;
X-- 5) port association;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X	
X-- ?	attribute B_ATTR of function is B_ARRAY ;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
X
X	function to_integer(f : REAL) return INTEGER is
X	 begin
X		return 0;
X	end to_integer;
X
X	function to_real (i : INTEGER) return REAL is
X	 begin
X		return 0.0;
X	end to_real;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
X	variable V : B_ARRAY ;
Xbegin
X	if PAR /= (F_INT,TRUE=>F_INT) then
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X
X		V := (1.0,2.0,3.0,4.0,FIVE=>F_REAL);
X		-- SEMANTIC ERROR:  mixed positional and named associations.
X	end if;
X
X	return ( to_integer(V(ONE)), TRUE=> to_integer(V(TWO)) );
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X  end F;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
Xbegin
X	return PAR;
X  end F;
Xend P ;
X
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X          PT_OUT : out B_ARRAY ) ;
X
Xend E;
X 
X-- with package P; 
Xuse P.F ;
X-- with function F;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X	PT_OUT : out B_ARRAY ) ;
X
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : A_ARRAY;
Xbegin
X	V := F(( G_INT, TRUE=>G_INT ));
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X	PT_OUT <= (F_REAL, TWO|THREE|FOUR|FIVE=>G_REAL);
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X
X	return;
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port ( PT_IN : in B_ARRAY; PT_OUT : out B_ARRAY );
X	end component ;
X begin
X	C_1: C port map (
X	 1.0, FIVE=>5.0, THREE|TWO|FOUR=>0.0, PT_OUT );
X	-- SEMANTIC ERROR:  mixed positional and named associations.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2203a.vhdl-*-*
echo x - e-07-2-2-2204a.vhdl
sed 's/^X//' >e-07-2-2-2204a.vhdl <<'*-*-END-of-e-07-2-2-2204a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2204A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that all choices (including "others") in an aggregate that has more
X-- than one element association or that has more than one choice in an element
X-- association must be static.
X-- PS  7/21/84
X-- DB 7/23/85
X-- cases:
X-- 1) one generic, one "others" choice in different associations for an array
X--	subtype with static index constraint (i.e. "others" choice is static);
X-- 2) two choices, one non-static, in the same association;
X-- 3) same as 1) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 4) same as 2) but with the non-static choice being a formal parameter
X--	of a funtion.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range 1 to 10;
X        type NEW_IX is range 1 to 9;
X	type ARR is array ( NEW_INT'LEFT to NEW_INT'RIGHT ) of INTEGER;
X
X	function F( A : NEW_INT ) return ARR is
X          variable X : ARR;
X	begin
X          X := ( A=>999, others=>-1 );
X          --ERROR: nonstatic(formal) choice in multi-association array aggregate
X          return ( A|1|3=>1, others=>0 );
X          --ERROR: nonstatic(formal) choice in multi-choice array aggregate.
X	end F;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range 1 to 10;
X        type NEW_IX is range 1 to 9;
X	type ARR is array ( NEW_INT'LEFT to NEW_INT'RIGHT ) of INTEGER;
X
X	function F( A : NEW_INT ) return ARR is
X          variable X : ARR;
X	begin
X          X := ( others=>-1 );
X          return X;
X	end F;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric (A:NEW_INT) ;
X    port (PT:ARR) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X  signal S1: ARR;
X begin
X  process
X    variable X: ARR;
X  begin
X        S1 <= ( A|1|3=>1, 5=>2, others=>3);
X        --ERROR: nonstatic(dynamic) choice in multi-association array aggregate.
X        S1 <= ( A=>-5, others=>5 );
X        --ERROR: nonstatic(generic) choice in multi-association array aggregate.
X	S1 <= ( ARR'LEFT to NEW_IX'RIGHT|NEW_INT'RIGHT=>1 );
X	--ERROR: nonstatic(dynamic) choice in multi-choice array aggregate.
X        while X<=( A|1|3=>5, others=>1 ) loop
X        --ERROR: nonstatic(generic) choice in multi-choice array aggregate.
X          null;
X        end loop;
X    end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2204a.vhdl-*-*
echo x - e-07-2-2-2205a.vhdl
sed 's/^X//' >e-07-2-2-2205a.vhdl <<'*-*-END-of-e-07-2-2-2205a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2205A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in an aggregate without an "others" choice, every element in the
X-- array must be accounted for in the set of choices. Check for a positional
X-- aggregate assigned to a signal or variable array object. Check for a named
X-- association aggregate where there are gaps between the lower index bound and
X-- the upper index bound.
X-- cases:
X-- 1) positional aggregate with one missing element;
X-- 2) aggregate with two named associations which specify discrete ranges,
X--	and the two ranges cover the index range but with a gap between them.
X-- contexts:
X-- 1) variable assignment;
X-- 2) signal assignment statement;
X-- 3) function return statement;
X-- 4) if statement;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type B_ARRAY is array ( ENUM ) of real;
X	
X-- ?	attribute B_ATTR of function is B_ARRAY ;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F( PAR : B_ARRAY ) return B_ARRAY is
X
X        variable V : B_ARRAY ;
X
X   begin
X         if PAR /= (F_REAL,1.0,F_REAL,2.0 ) then
X        -- SEMANTIC ERROR : all elements not specified.
X
X             V := (1.0,2.0,4.0,5.0);
X              -- SEMANTIC ERROR : all elements not specified.
X
X        end if;
X
X        return (F_REAL,1.0,F_REAL,1.0);
X        -- SEMANTIC ERROR : all elements not specified.
X   
X   end F;
Xend P ;
X     
X-- with package P; 
Xuse P.all;
Xentity E  is
Xgeneric ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY; 
X 	PT_OUT : out B_ARRAY ) ;
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X  generic ( G_INT : integer;  G_REAL : real ) ;
X    port ( PT_IN : in B_ARRAY;
X           PT_OUT : out B_ARRAY) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : B_ARRAY ;
X  begin
X	V := ( F_REAL, F_REAL, 5.332, G_REAL );
X	-- SEMANTIC ERROR:  last element not specified.
X
X	PT_OUT <= ( G_REAL, THREE to FIVE=> G_REAL );
X	-- SEMANTIC ERROR:  element TWO not specified.
X
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2205a.vhdl-*-*
echo x - e-07-2-2-2206a.vhdl
sed 's/^X//' >e-07-2-2-2206a.vhdl <<'*-*-END-of-e-07-2-2-2206a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2206A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a named association aggregate, no array element may have more
X-- than one associated expression.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) one element named twice in different associations;
X-- 2) one element named twice in different "or" associations;
X-- 3) one element named twice in the same "or" association.
X-- contexts:
X-- 1) assertion definition in an interface description;
X-- 2) return statement in a function;
X-- 3) port association;
X-- 4) signal assignment;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type A_ARRAY is array ( boolean ) of integer;
X	type B_ARRAY is array ( ENUM ) of real;
X        type C_ARRAY is array ( ENUM ) of integer;  
X	
X        constant MININT : INTEGER := INTEGER'LOW;
X
X	function F_REAL return real is
X	begin	return 0.0;	end F_REAL;
X
X	function F_INT return integer is
X	begin	return 0;	end F_INT;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( PAR : A_ARRAY ) return A_ARRAY is
Xbegin
X	return ( TRUE|TRUE=>F_INT, FALSE=>-27 );
X	-- SEMANTIC ERROR:  element TRUE specified twice.
X  end F;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xentity C  is
Xgeneric ( G_INT : integer;  G_REAL : real;
X	G_B_ARRAY : B_ARRAY  ) ;
X    port ( PT_IN : in A_ARRAY; PT_OUT : out B_ARRAY ) ;
Xend C;
X
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT_IN : in C_ARRAY; 
X	PT_OUT : out B_ARRAY ) ;
Xbegin
X   assert	PT_IN > ( ONE to FOUR=>MININT, THREE to FIVE=>MININT );
X	-- SEMANTIC ERROR:  elements THREE and FOUR specified twice.
Xend E;
X
X-- with package P; 
Xuse P.all;
Xentity E is
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X        signal S : B_ARRAY;
X	component C port ( PT_IN : in A_ARRAY; PT_OUT : out B_ARRAY );
X	end component ;
Xbegin
X	for I in 1 to 5 generate
XL_X_2: 	     block
X             begin
X		C_1: C port map ( FALSE|TRUE=>I,FALSE=>I,
X				PT_OUT );
X	-- SEMANTIC ERROR:  element FALSE specified twice.
X	     end block;
X	end generate;
X  process
X  begin
X	S <= ( ONE=>0.4, TWO=>4.4, ONE=>0.4, others=>25.5 );
X	-- SEMANTIC ERROR:  element ONE specified twice.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-2206a.vhdl-*-*
echo x - e-07-2-2-2207a.vhdl
sed 's/^X//' >e-07-2-2-2207a.vhdl <<'*-*-END-of-e-07-2-2-2207a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2207A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that there may be no more associations than there are elements in the
X-- array (pertains to positional association in contexts requiring fixed size
X-- array aggregates).
X-- cases:
X-- 1) positional aggregate of an array with fixed index type
X--	with an extra element.
X-- contexts:
X-- 1) variable assignment;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X
X	type B_ARRAY is array ( ENUM ) of real;
X	
X	function F_REAL( PAR : real ) return real is
X		variable V : B_ARRAY ;
X	begin
X		V := ( PAR, 0.0, PAR, 0.0, PAR, 0.0 );
X		-- SEMANTIC ERROR:  more associations than elements.
X		return 0.0;
X	end F_REAL;
Xend P;
*-*-END-of-e-07-2-2-2207a.vhdl-*-*
echo x - e-07-2-2-2208a.vhdl
sed 's/^X//' >e-07-2-2-2208a.vhdl <<'*-*-END-of-e-07-2-2-2208a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2208A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- actual parameter corresponding to an unconstrained formal parameter.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) actual parameter association;
X-- 2) variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	subtype A_CON is A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_ARRAY ) return A_CON is
X	begin	return (1,2,3,4);	end F_A;
X
X	function F_B ( PAR : B_ARRAY ) return B_CON is
X	begin	return (1.0, 2.0);	end F_B;
X
X	function F_C ( PAR : C_ARRAY ) return C_CON is
X	begin	return (ONE=>(ONE=>'0'));	        end F_C;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X
X	variable V_A : A_CON ;
X	variable V_B : B_CON ;
X	variable V_C : C_CON ;
X  begin
X	V_A := F_A( F_A( (1,2,others=>3) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X
X	V_B := F_B( F_B( (1.0,others=>2.0) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X
X	V_C := F_C( F_C( (ONE=>('1',others=>'0')) ) );
X	-- SEMANTIC ERROR:  "others" used in aggregate which corresponds to
X	--	an unconstrained formal parameter.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2208a.vhdl-*-*
echo x - e-07-2-2-2209a.vhdl
sed 's/^X//' >e-07-2-2-2209a.vhdl <<'*-*-END-of-e-07-2-2-2209a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2209A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- return expression for a function returning an unconstrained array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	function F_A ( PAR : A_ARRAY ) return A_ARRAY is
X	begin	
X		return (1,2,3,others=>4);
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_A;
X
X	function F_B ( PAR : B_ARRAY ) return B_ARRAY is
X	begin	
X		return (others=>2.0);
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_B;
X
X	function F_C ( PAR : C_ARRAY ) return C_ARRAY is
X	begin	
X		return (others=>(ONE=>'0'));
X		-- SEMANTIC ERROR:  "others" used in unconstrained aggregate.
X	end F_C;
Xend P;
*-*-END-of-e-07-2-2-2209a.vhdl-*-*
echo x - e-07-2-2-2210a.vhdl
sed 's/^X//' >e-07-2-2-2210a.vhdl <<'*-*-END-of-e-07-2-2-2210a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2210A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is not allowed in an aggregate that is the
X-- operand of a qualified expression whose type mark denotes an unconstrained
X-- array type.
X-- cases:
X-- 1) one-dimensional array with index type integer;
X-- 2) one-dimensional array with index type boolean;
X-- 3) multi-dimensional array with enumeration index type which has only
X--	one possible value.
X-- contexts:
X-- 1) variable assignment statement;
X-- 2) return statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	
X
X	SUBTYPE A_CON IS A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_CON ) return A_CON is
X	begin	
X		return A_ARRAY'(1,2,3,others=>4);
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_A;
X
X	function F_B ( PAR : B_CON ) return B_CON is
X	begin
X		return B_ARRAY'(1.0,others=>2.0);
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_B;
X
X	function F_C ( PAR : C_CON ) return C_CON is
X	begin
X		return C_ARRAY'(others=>(ONE=>'0'));
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X	end F_C;
Xend P;
X
Xuse P2.all ;
Xpackage body P2 is
X	type ENUM is ( ONE );
X
X	type A_ARRAY is array ( integer range <> ) of integer;
X	type B_ARRAY is array ( boolean range <> ) of real;
X	type C_ARRAY is array ( ENUM range <>, ENUM range <> ) of bit;
X
X	subtype A_CON is A_ARRAY ( 1 to 4 );
X	subtype B_CON is B_ARRAY ( FALSE to TRUE );
X	subtype C_CON is C_ARRAY ( ONE to ONE, ONE to ONE );
X
X	function F_A ( PAR : A_CON ) return A_CON is
X	begin	
X		return (1,2,3,4);
X	end F_A;
X
X	function F_B ( PAR : B_CON ) return B_CON is
X	begin
X		return (1.0,2.0);
X	end F_B;
X
X	function F_C ( PAR : C_CON ) return C_CON is
X	begin
X		return (ONE=>(ONE=>'0'));
X	end F_C;
Xend P2;
X
X
X-- with package P2;  
Xuse P2.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V_A : A_CON ;
X	variable V_B : B_CON ;
X	variable V_C : C_CON ;
X  begin
X	V_A := F_A( A_ARRAY'(1,2,others=>3) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X
X	V_B := F_B( B_ARRAY'(1.0,others=>2.0) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X
X	V_C := F_C( C_ARRAY'(ONE=>('1',others=>'0')) );
X	-- SEMANTIC ERROR:  "others" used in aggregate in qualified expression
X	--	whose type mark denotes an unconstrained array type.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-2210a.vhdl-*-*
echo x - e-07-2-2-2211a.vhdl
sed 's/^X//' >e-07-2-2-2211a.vhdl <<'*-*-END-of-e-07-2-2-2211a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2211A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- 	Check that the direction of the index subtype of the aggregate
X--      array is the same as the direction of the index subtype of the 
X--      base type of the array.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CA_UP is UNCONSTRAINED_ARRAY ( 1 to 10 );
X        subtype CA_DOWN is UNCONSTRAINED_ARRAY (10 downto 1);
X
X	function F_ok (C1 : CA_UP) return CA_UP IS
X	    begin
X		 return CA_UP'((1 to 10 => 'B'));
X	end F_ok;
X
Xend P;
X
X-- with package P; 
X
Xuse P.all;
Xpackage body  P is
Xfunction F_bad (C : CA_UP) return CA_UP IS
X    begin
X	 return CA_DOWN'((1 to 10 => 'B'));
X	-- SEManTic ERRor : descending discrete range of 
X	--  aggragate conflicts with ascending range of return type
Xend F_bad;
X
*-*-END-of-e-07-2-2-2211a.vhdl-*-*
echo x - e-07-2-2-2212a.vhdl
sed 's/^X//' >e-07-2-2-2212a.vhdl <<'*-*-END-of-e-07-2-2-2212a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-2212A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X--     Check that in a positional aggragate the leftmost bound
X--     is determined by the applicable index constraint or by
X--     S'LEFT where S is the index subtype of the base type of
X--     the array, and the rightmost bound is determined by the 
X--     direction of the index subtype and the number of elements.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse pp.all ;
Xpackage body pp is
X	type index_values is (one, two, three);
X	type ucarr is array (index_values range <>) of Boolean;
X	subtype carr is ucarr (index_values'low to index_values'high);
X
X	function f1 (i : integer) return carr is
X	begin
X	     return (True, index_values'LOW => TRUE, others => False);	
X		-- SEMANTIC ERROR : First element association specifies
X		--  index which is out of bounds for the array.
X        end f1;
X
X
X	function f2 (i : integer) return carr is
X	begin
X	     return (True, True, TRUE, False);
X		-- SEMANTIC ERROR : Last element association specifies
X		--  index which is out of bounds for the array.
X        end f2;
Xend pp;
X
X
*-*-END-of-e-07-2-2-2212a.vhdl-*-*
echo x - e-07-2-2-3001a.vhdl
sed 's/^X//' >e-07-2-2-3001a.vhdl <<'*-*-END-of-e-07-2-2-3001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the result of a function call is of the type specified in the
X-- definition of the function. Check for error cases here.
X-- JB  (DB 7/18/85)
X-- cases:
X-- The type expected from the context of the function call is different from
X--	the type specified in the definition of the function, for:
X-- 1) one type "derived" from the other, i.e. a new integer type;
X-- 2) two "similiar" types, i.e. record types whose definitions are identical;
X-- 3) two constrained arrays of the same unconstrained base type.
X-- contexts:
X-- 1) value returned by a function in the body of the function declaration.
X-- 2) boolean condition in if statement.
X-- 3) waveform expression in signal assignment statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 12 fn;	-- boxafiganewton
X		end units;
X	type UN_ARRAY is array ( ENUM range <> ) of CHARACTER;
X	subtype SMALL_ARRAY is UN_ARRAY ( TWO to THREE );
X	subtype LARGE_ARRAY is UN_ARRAY ( TWO to FOUR );
X	type A_RECORD is record
X			E : BIT;
X		end record;
X	type B_RECORD is record
X			E : BIT;
X		end record;
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
X	function F_NEW (	A : INTEGER; 
X				B : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return B;
X	end F_NEW;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : NEW_INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_UN (		A : UN_ARRAY;
X				B : CHARACTER ) return UN_ARRAY is
X	begin
X		return ( A'LEFT to A'RIGHT => ' ' );
X	end F_UN;
X
X	function F_SMALL (	A : SMALL_ARRAY ) return SMALL_ARRAY is
X	begin
X		return A;
X	end F_SMALL;
X
X	function F_AREC (	A : A_RECORD;
X				B : B_RECORD ) return A_RECORD is
X	begin
X		return A;
X	end F_AREC;
X
X        function F_BREC ( A : A_RECORD;
X                          B : B_RECORD  ) return B_RECORD is
X        begin
X            return B;
X        end F_BREC;
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xfunction F_WHATEVER ( A : INTEGER ) return INTEGER is
X    variable N : NEW_INTEGER;
Xbegin
X    N := F_NEW(1,42);
X    return F_NEW(1,1);  -- SEMANTIC ERROR:  Type of value returned by
X                        -- function call does not match expected type;
X                        -- context requires value of type INTEGER.
Xend F_WHATEVER;
Xend P ;
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xprocedure PROC (EL : inout ENUM; N : inout NEW_INTEGER) is
X    variable I : INTEGER;
X    variable X : REAL;
X    variable S : SNACK;
X    variable A : UN_ARRAY(ONE to FOUR);
Xbegin
X   EL := F_ENUM(ONE, THREE);
X   N := F_NEW(I, N);
X   S := F_SNACK(X, N, S);
X   A := F_UN(A, 'A');
X   X := F_REAL(X, X, X, X);
X
X   I := F_NEW(I, N);  -- SEMANTIC ERROR:  Type of value returned by function
X                      --   call on right-hand side of assignment does not
X                      --   match type of object on left-hand side.
X   if X = F_ENUM(THREE, FOUR) then
X        -- SEMANTIC ERROR:  Type of value returned by function call on
X        --   right-hand side of Boolean expression does not match
X        --   type of object on left-hand side.
X        return;
X    end if;
X  end PROC;
Xend P ;
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT : out B_RECORD) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : LARGE_ARRAY;
X  begin	
X         V := ( 'a', 'b', 'c' );
X	 if V = F_SMALL( ('A','B') ) then
X              return;
X         end if;
X
X         V := F_SMALL( ('A','B') );  -- SEMANTIC ERROR: Type of value returned
X                                     --   by the funciton call is of the same
X                                     --   base type as the variable on the
X                                     --   left-hand side of the assignment;
X                                     --   however, the arrays are not of the
X                                     --   same length.
X  end process;
X--  end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:  block
X  begin
X   process
X   begin
X        PT <= F_BREC((E=>'1'),(E=>'0'));
X
X	PT <= F_AREC((E=>'1'),(E=>'0'));
X	-- SEMANTIC ERROR:  Type of value returned by function
X        --   call does not match expected type;
X	--   context requires value of type B_RECORD.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-3001a.vhdl-*-*
echo x - e-07-2-2-3002a.vhdl
sed 's/^X//' >e-07-2-2-3002a.vhdl <<'*-*-END-of-e-07-2-2-3002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a function call the type of each argument in the argument list
X-- must be compatible with the type of the corresponding input parameter in the
X-- definition of the function. Check for positional inversion of arguments.
X-- JB  (DB 7/18/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type NEW_INTEGER is range INTEGER'low to INTEGER'high;
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 144 fn;	-- boxafiganewton
X		end units;
X	type UN_ARRAY is array ( ENUM range <> ) of CHARACTER;
X	subtype SMALL_ARRAY is UN_ARRAY ( TWO to THREE );
X	subtype LARGE_ARRAY is UN_ARRAY ( TWO to FOUR );
X	type A_RECORD is record
X			E : BIT;
X		end record;
X	type B_RECORD is record
X			E : BIT;
X		end record;
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
X	function F_NEW (	A : INTEGER; 
X				B : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return B;
X	end F_NEW;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : NEW_INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_UN (		A : UN_ARRAY;
X				B : CHARACTER ) return UN_ARRAY is
X	begin
X		return ( A'LEFT to A'RIGHT => ' ' );
X	end F_UN;
X
X	function F_SMALL (	A : SMALL_ARRAY ) return SMALL_ARRAY is
X	begin
X		return A;
X	end F_SMALL;
X
X	function F_AREC (	A : A_RECORD ) return A_RECORD is
X	begin
X		return A;
X	end F_AREC;
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xpackage P2 is
X	subtype NEW_ARRAY is 
X		UN_ARRAY( F_NEW(A=>NEW_INTEGER'(1),B=>INTEGER'(2)) to FOUR );
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
Xend P2;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction WHATEVER ( A,B : INTEGER ) return INTEGER is
Xbegin
X	return F_NEW(A,B);
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
X  end WHATEVER;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xentity E  is
X    port ( PT1 : in A_RECORD; PT2 : out A_RECORD ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SMALL_ARRAY;
X     begin
X        A := ('a', 'b');
X     
X	for CHAR in CHARACTER'LEFT to CHARACTER'RIGHT loop
X		exit when F_UN( CHAR, A ) /= A;
X		-- SEMANTIC ERROR:  types of arguments incompatible with
X		--	types of parameters.
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X-- with package P; 
Xuse P.all;
Xentity C  is
X    port ( PT1 : in A_RECORD; PT2 : in B_RECORD ) ;
Xend C;
X
X
Xarchitecture AB of C is
X-- L_X_2: block
X   component C port  (X, Y : A_RECORD);
X	end component ;
X begin
X	NEW_COMP : C port map ( F_AREC(PT1), F_AREC(PT2) );
X	-- SEMANTIC ERROR:  types of arguments incompatible with types of
X	--	parameters.
X--  end block;
Xend AB;
*-*-END-of-e-07-2-2-3002a.vhdl-*-*
echo x - e-07-2-2-4001a.vhdl
sed 's/^X//' >e-07-2-2-4001a.vhdl <<'*-*-END-of-e-07-2-2-4001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-2-4001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the operand must have the same type as the base type of the type
X-- mark.
X-- cases:
X-- 1) a boolean expression with type bit;
X-- 2) object of an "identical" record type.
X-- contexts:
X-- 1) function return statement;
X-- 2) port declaration;
X-- 3) signal assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type A_REC is record	E : integer;	end record;
X	type B_REC is record	E : integer;	end record;
Xend P;
X
Xuse P.all ;
Xpackage body P is
Xfunction F1 ( PARAM : bit ) return boolean is
Xbegin
X	return boolean'(PARAM);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
Xend F1;
Xend P ;
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F2 ( PARAM : A_REC ) return B_REC is
Xbegin
X	return B_REC'(PARAM);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
Xend F2;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X  generic ( G_BOOL : boolean; G_BREC : B_REC ) ;
X    port ( OUT_BIT : out bit ;  OUT_A : out A_REC ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	OUT_BIT <= bit'(G_BOOL);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
X
X	OUT_A <= A_REC'(G_BREC);
X	-- SEMANTIC ERROR:  type of expression does not match type mark.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-2-4001a.vhdl-*-*
echo x - e-07-2-3-0001a.vhdl
sed 's/^X//' >e-07-2-3-0001a.vhdl <<'*-*-END-of-e-07-2-3-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary arithmetic operators + and - are not defined for any
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A + B;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A - B;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A + B;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end H;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return B;
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return B;
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package  P;  use P.all;
Xentity E is
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A,B : SINGLE_NUMERIC_ARRAY;
X	variable R,S : SINGLE_NUMERIC_RECORD;
X	variable E,D : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable BB : BOOLEAN;
X  begin
X	A := F(B,A) - F(A,B);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	R := G(R,S) + G(S,R);
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	E := H(E,D) - H(D,E);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	E := ONE + TWO;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	C := 'C' - 'D';
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	BB := TRUE + TRUE;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X        return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0001a.vhdl-*-*
echo x - e-07-2-3-0002a.vhdl
sed 's/^X//' >e-07-2-3-0002a.vhdl <<'*-*-END-of-e-07-2-3-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the two operands of the binary arithmetic operators + and - must
X-- be of the same base type. Check for objects, literals, function calls.
X-- cases:
X-- 1) re-defined integer types;
X-- 2) re-defined real types;
X-- 3) re-defined time types.
X-- contexts:
X-- 1) function return statements (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INT_1 is range integer'left to integer'right;
X	type NEW_INT_2 is range integer'left to integer'right;
X
X	type NEW_REAL_1 is range real'left to real'right;
X	type NEW_REAL_2 is range real'left to real'right;
X
X	type NEW_TIME_1 is range 1 to 1E20
X		units
X			FS;
X			PS = 1000 FS;
X			NS = 1000 PS;
X			US = 1000 NS;
X			MS = 1000 US;
X			S  = 1000 MS;
X			MIN = 60 S;
X			HR = 60 MIN;
X		end units;
X
X	function F_INT ( A : integer; B : NEW_INT_1 ) return integer is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_INT;
X
X	function F_NINT_1 ( A : NEW_INT_1; B : NEW_INT_2 ) return NEW_INT_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NINT_1;
X
X	function F_REAL ( A : REAL; B : NEW_REAL_1 ) return REAL is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_REAL;
X
X	function F_NREAL_1 ( A:NEW_REAL_1; B:NEW_REAL_2 ) return NEW_REAL_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NREAL_1;
X
X	function F_TIME ( A : time; B : NEW_TIME_1 ) return time is
X	begin
X		return A + B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_TIME;
X
X	function F_NTIME_1 ( A:NEW_TIME_1; B:TIME ) return NEW_TIME_1 is
X	begin
X		return A - B;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	end F_NTIME_1;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INT_1 is range integer'left to integer'right;
X	type NEW_INT_2 is range integer'left to integer'right;
X
X	type NEW_REAL_1 is range real'left to real'right;
X	type NEW_REAL_2 is range real'left to real'right;
X
X	type NEW_TIME_1 is range 1 to 1E20
X		units
X			FS;
X			PS = 1000 FS;
X			NS = 1000 PS;
X			US = 1000 NS;
X			MS = 1000 US;
X			S  = 1000 MS;
X			MIN = 60 S;
X			HR = 60 MIN;
X		end units;
X
X	function F_INT ( A : integer; B : NEW_INT_1 ) return integer is
X	begin
X		return A;
X	end F_INT;
X
X	function F_NINT_1 ( A : NEW_INT_1; B : NEW_INT_2 ) return NEW_INT_1 is
X	begin
X		return A;
X	end F_NINT_1;
X
X	function F_REAL ( A : REAL; B : NEW_REAL_1 ) return REAL is
X	begin
X		return A;
X	end F_REAL;
X
X	function F_NREAL_1 ( A:NEW_REAL_1; B:NEW_REAL_2 ) return NEW_REAL_1 is
X	begin
X		return A;
X	end F_NREAL_1;
X
X	function F_TIME ( A : time; B : NEW_TIME_1 ) return time is
X	begin
X		return A;
X	end F_TIME;
X
X	function F_NTIME_1 ( A:NEW_TIME_1; B:TIME ) return NEW_TIME_1 is
X	begin
X		return A;
X	end F_NTIME_1;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : INTEGER	:= 1 + 1.0;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable B : NEW_INT_1	:= 1 + 1 P.S;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable C : NEW_INT_2	:= 1 - 8.34;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X
X	variable I : REAL	:= 0.0 - 1;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable J : NEW_REAL_1	:= 0.0 + 35 P.MS;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable K : NEW_REAL_2	:= 0.0 - 5 STANDARD.HR;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X
X	variable Q : TIME	:= 0 STANDARD.S + 5.3;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable R : NEW_TIME_1	:= 0  - 8033;
X		--SEMANTIC ERROR:  operands must be of the same base type.
X	variable X : TIME	:= 0 P.S + 'C';
X		--SEMANTIC ERROR:  operands must be of the same base type.
X  begin
X	A := A + C;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	A := F_INT(A,B) - F_NINT_1(B,C);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	C := B - C;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X
X	I := I + K;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	I := F_REAL(I,J) - F_NREAL_1(J,K);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	K := J - K;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X
X	Q := Q + X;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	Q := F_TIME(Q,R) - F_NTIME_1(R,X);
X		-- SEMANTIC ERROR:  operands must be of the same base type
X	X := R - X;
X		-- SEMANTIC ERROR:  operands must be of the same base type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0002a.vhdl-*-*
echo x - e-07-2-3-0003a.vhdl
sed 's/^X//' >e-07-2-3-0003a.vhdl <<'*-*-END-of-e-07-2-3-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of the concatenation operator & is an array,
X-- then the other operand must be an array of the same type or an object or
X-- value of the type of the array element. Check that in this case, the result
X-- is the same type as the array operand. Check for objects, literals,
X-- aggregates, function calls.
X-- cases:
X-- 1) array of boolean & array of boolean of different array type;
X-- 2) array of boolean & bit literal;
X-- 3) array of boolean & bit object;
X-- 4) array of integer & object of different integer type;
X-- 5) array of record & aggregate of similiar record type;
X-- 6) array of integer & function call of different integer type.
X-- contexts:  actual parameter association in variable declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type REC is record	E1,E2 : boolean;	end record;
X	type REC1 is record	E1,E2 : bit;		end record;
X
X	type A_ARRAY is array ( integer range <> ) of boolean;
X	type B_ARRAY is array ( integer range <> ) of integer;
X	type C_ARRAY is array ( integer range <> ) of REC;
X	type D_ARRAY is array ( integer range <> ) of boolean;
X
X	function F_INT return NEW_INT is
X	begin	return 1;
X	end F_INT;
X
X	function F_A ( PARAM : A_ARRAY ) return boolean is
X	begin
X		return TRUE;
X	end F_A;
X
X	function F_B ( PARAM : B_ARRAY ) return integer is
X	begin
X		return 0;
X	end F_B;
X
X	function F_C ( PARAM : C_ARRAY ) return REC is
X	begin
X		return ( TRUE, FALSE );
X	end F_C;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : A_ARRAY(1 to 5);
X	variable B : B_ARRAY(0 to 2);
X	variable C : C_ARRAY(-1 to 0);
X	variable D : D_ARRAY(1 to 5);
X
X	constant X : bit := '0';
X	constant Y : NEW_INT := 1;
X
X	variable V1 : boolean;
X	variable V2 : boolean;
X	variable V3 : boolean;
X	variable V4 : integer;
X	variable V5 : REC;
X	variable V6 : integer;
X  begin
X	V1 := F_A( A & D );
X	-- SEMANTIC ERROR:  A and D are of different array types.
X
X	V2 := F_A( '1' & A );
X	-- SEMANTIC ERROR:  '1' is not of the element type of A.
X
X	V3 := F_A( A & X );
X	-- SEMANTIC ERROR:  X is not of the element type of A.
X
X	V4 := F_B( B & Y );
X	-- SEMANTIC ERROR:  Y is not of the element type of B.
X
X	V5 := F_C( (E1=>'1',E2=>'0') & C );
X	-- SEMANTIC ERROR:  aggregate is not of the element type of C.
X
X	V6 := F_B( F_INT & B );
X	-- SEMANTIC ERROR:  F_INT is not of the element type of B.
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0003a.vhdl-*-*
echo x - e-07-2-3-0004a.vhdl
sed 's/^X//' >e-07-2-3-0004a.vhdl <<'*-*-END-of-e-07-2-3-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if neither operand of the concatenation operator & is an array,
X-- then they must be objects or values of the same type. Check that in this
X-- case, the result is an array whose element type is the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:
X-- 1) bit & boolean where result should be array of boolean;
X-- 2) integer & re-defined integer where result should be array of integer;
X-- 3) simple record & similiar record where result should be array of simple;
X-- 4) bit & bit where result should be array of boolean.
X-- contexts:  actual parameter association in variable declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type REC1 is record	E1,E2 : boolean;	end record;
X	type REC2 is record	E1,E2 : bit;		end record;
X
X	type A_ARRAY is array ( integer range <> ) of boolean;
X	type B_ARRAY is array ( integer range <> ) of integer;
X	type C_ARRAY is array ( integer range <> ) of REC1;
X  
X	function F_INT return integer is
X	begin	return 1;	end F_INT;
X
X	function F_A ( PARAM : A_ARRAY ) return boolean is
X	begin
X		return TRUE;
X	end F_A;
X
X	function F_B ( PARAM : B_ARRAY ) return integer is
X	begin
X		return 0;
X	end F_B;
X
X	function F_C ( PARAM : C_ARRAY ) return REC1 is
X	begin
X		return ( TRUE, FALSE );
X	end F_C;
Xend P;
X
X
X-- with package P;  use P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	constant X : bit := '0';
X	constant Y : NEW_INT := 1;
X
X	variable V1 : boolean := F_A( TRUE & X );
X	-- SEMANTIC ERROR:  TRUE and X are of different types.
X
X	variable V2 : boolean := F_A( F_INT & Y );
X	-- SEMANTIC ERROR:  F_INT and Y are of different types.
X
X	variable V5 : REC1;
X
X	variable V6 : integer := F_A( X & '0' );
X	-- SEMANTIC ERROR:  boolean array expected.
X  begin
X	V5 := F_C(REC2'(E1=>'1',E2=>'0') & REC1'(E1|E2=>TRUE) );
X	-- SEMANTIC ERROR:  aggregates are of different types.
X
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0004a.vhdl-*-*
echo x - e-07-2-3-0005a.vhdl
sed 's/^X//' >e-07-2-3-0005a.vhdl <<'*-*-END-of-e-07-2-3-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary arithmetic operators +, and - are not defined for
X-- non-numeric types. Check for single-element arrays of numerics, records with
X-- single numeric element. Check for objects, literals, function calls.
X-- cases:
X-- 1) 1-dim 1 element array of real;
X-- 2) single element record of integer;
X-- 3) enumeration type;
X-- 4) character;
X-- 5) boolean.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (function calls and literals).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return -A;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return +A;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X	end H;
X
Xend P;
X
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A;
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable R : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable B : BOOLEAN;
X  begin
X	A := (1=>0.0);
X	R := (E=>0);
X	A := +F(A);
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	E := -H(E);
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X
X	E := +ONE;
X		-- SEMANTICS ERROR:  "+" not defined for non-numeric type
X
X	B := -TRUE;
X		-- SEMANTICS ERROR:  "-" not defined for non-numeric type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0005a.vhdl-*-*
echo x - e-07-2-3-0006a.vhdl
sed 's/^X//' >e-07-2-3-0006a.vhdl <<'*-*-END-of-e-07-2-3-0006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-3006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a signed operator cannot follow an adding operator or a
X-- multiplying operator or a miscellaneous operator (**, abs) or
X-- the logical operator not.
X-- cases:  expressions involving real and integer objects.
X-- contexts:  variable assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X  
X        type A_ARRAY is array (1 to 2) of CHARACTER;
X
Xend P;
X
X-- with package P; use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable I : INTEGER;
X	variable R : REAL;
X        variable B : BOOLEAN;
X        variable A : A_ARRAY;
X
X  begin
X	R := R + - R;
X	-- SYNTAX ERROR:  signed operator cannot follow adding operator.
X
X        R := R - - R;
X        -- SYNTAX ERROR:  signed operator cannot follow adding operator.
X
X        A(1 to 2) := A(1) & - A(2);
X
X	R := R * + R;
X	-- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        R := R / - R;
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        I := I mod + I;   
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X        R := I rem - I;
X        -- SYNTAX ERROR:  signed operator cannot follow multiplying operator.
X
X	R := R ** + I;
X	-- SYNTAX ERROR:  signed operator cannot follow misc. operator.
X
X	R := abs - R;
X	-- SYNTAX ERROR:  signed operator cannot follow misc.  operator.
X
X        B := not - B;
X        -- SYNTAX ERROR:  signed operator cannot follow logical operator.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-3-0006a.vhdl-*-*
echo x - e-07-2-4-0001a.vhdl
sed 's/^X//' >e-07-2-4-0001a.vhdl <<'*-*-END-of-e-07-2-4-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary operators mod and rem are not defined for 
X-- operands of other than integer type.  Check for objects, literals and
X-- function calls.
X-- cases:
X-- try operands of type real, time, character, bit, records with 1 integer
X--	element, 1x1 arrays of integer
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F1 (A,B : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F1;
X
X	function F2 (A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F2;
X
X	function F3 ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F3;
X
X	function F4 ( A,B : REAL ) return REAL is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F4;
X
X	function F5 ( A,B : TIME ) return TIME is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F5;
X
X	function F6 ( A,B : CHARACTER ) return CHARACTER is
X	begin
X		return A rem B;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	end F6;
X
X	function F7 ( A,B : BIT ) return BIT is
X	begin
X		return A mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X	end F7;
X
Xend P;
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of INTEGER;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F1 (A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A ;
X	end F1;
X
X	function F2 (A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A ;
X	end F2;
X
X	function F3 ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A ;
X	end F3;
X
X	function F4 ( A : REAL ) return REAL is
X	begin
X		return A ;
X	end F4;
X
X	function F5 ( A : TIME ) return TIME is
X	begin
X		return A ;
X	end F5;
X
X	function F6 ( A : CHARACTER ) return CHARACTER is
X	begin
X		return A ;
X	end F6;
X
X	function F7 ( A : BIT ) return BIT is
X	begin
X		return A ;
X	end F7;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable I : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable R : REAL := 0.0;
X	variable T : TIME := 0 S;
X	variable C : CHARACTER := 'A';
X	variable B : BIT := '0';
Xbegin
X	A := (1=>0);
X	I := (E=>0);
X	A := F1(A) rem A;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	I := F2(I) mod I;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	E := E rem F3(E);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	E := FOUR mod ONE;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	R := R rem F4(R);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X	
X	R := 10.0 mod 4.3;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	T := F5(T) mod T;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	T := 100 S rem 1 HR;
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	C := C rem F6(C);
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X
X	C := 'C' mod 'H';
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	B := F7(B) mod B;
X		-- SEMANTICS ERROR:  "mod" not defined for non-integer type
X
X	B := '1' rem '0';
X		-- SEMANTICS ERROR:  "rem" not defined for non-integer type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0001a.vhdl-*-*
echo x - e-07-2-4-0002a.vhdl
sed 's/^X//' >e-07-2-4-0002a.vhdl <<'*-*-END-of-e-07-2-4-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the operands of the binary arithmetic operators * and / cannot be
X-- non-numeric. Check for objects, literals, function calls.
X-- cases:  
X-- 1) enumeration type;
X-- 2) record with one numeric element;
X-- 3) array with one numeric element;
X-- 4) character and boolean literals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A / B;
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X	end H;
X
Xend P;
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X
X	function F (A,B : SINGLE_NUMERIC_ARRAY) return SINGLE_NUMERIC_ARRAY is
X	begin
X		return A;
X	end F;
X
X	function G(A,B : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X	begin
X		return A;
X	end G;
X
X	function H ( A,B : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X	begin
X		return A;
X	end H;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A,B : SINGLE_NUMERIC_ARRAY;
X	variable R,S : SINGLE_NUMERIC_RECORD;
X	variable E,D : ENUMERATION_TYPE := TWO;
X	variable C : CHARACTER;
X	variable BOOL : BOOLEAN;
X  begin
X	A := F(B,A) / F(A,B);
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	R := G(R,S) * G(S,R);
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X
X	E := H(E,D) / H(D,E);
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	E := ONE * TWO;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X
X	C := 'C' / 'D';
X		-- SEMANTICS ERROR:  "/" not defined for non-numeric type
X
X	BOOL := TRUE * TRUE;
X		-- SEMANTICS ERROR:  "*" not defined for non-numeric type
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0002a.vhdl-*-*
echo x - e-07-2-4-0003a.vhdl
sed 's/^X//' >e-07-2-4-0003a.vhdl <<'*-*-END-of-e-07-2-4-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of the binary arithmetic operators * and / is
X-- floating point the other cannot be an integer. Check for objects, literals,
X-- function calls.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F ( A : REAL; B : INTEGER ) return REAL is
X	begin
X		return A * B;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X	end F;
X
X	function G ( A : INTEGER; B : REAL ) return INTEGER is
X	begin
X		return A/B;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X	end G;
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	function F ( A : REAL; B : INTEGER ) return REAL is
X	begin
X		return A;
X	end F;
X
X	function G ( A : INTEGER; B : REAL ) return INTEGER is
X	begin
X		return A;
X	end G;
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : REAL	:= 0.0;
X	variable B : INTEGER	:= 0;
X  begin
X	A := F(A,B) * G(B,A);
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X
X	A := 1.0 / 10;
X		-- SEMANTICS ERROR:  if one operand is floating point 
X		-- 	then the other cannot be integer.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0003a.vhdl-*-*
echo x - e-07-2-4-0004a.vhdl
sed 's/^X//' >e-07-2-4-0004a.vhdl <<'*-*-END-of-e-07-2-4-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if one operand of * is a physical type, the other must be an
X-- integer or a floating point type. Check for objects, literals, function
X-- calls.
X-- cases:  try for enumeration, 1x1 array of real, 1 element
X--	record of integer, another physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A * B;
X		-- SEMANTIC ERROR:  if one operand is physical, then the other
X		--	must be integer or floating point.
X	end I;
X
X
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type SINGLE_NUMERIC_ARRAY is array ( 1 to 1 ) of REAL;
X	type SINGLE_NUMERIC_RECORD is record
X			E : INTEGER;
X		end record;
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : SINGLE_NUMERIC_ARRAY ) return SINGLE_NUMERIC_ARRAY is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end F;
X
X	function G ( A : SINGLE_NUMERIC_RECORD) return SINGLE_NUMERIC_RECORD is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end I;
X
X
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : SINGLE_NUMERIC_ARRAY;
X	variable R : SINGLE_NUMERIC_RECORD;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable T : TIME := 1 S;
X	variable D : DISTANCE := 1 FURLONG;
X  begin
X	T := T * 10 S;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := 1 MS * F(A);
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := F(R) * 993 MS;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := F(E) * 1 HR;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	T := ONE * 1 MIN;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X
X	D := T * 1 FURLONG;
X	-- SEMANTIC ERROR:  if one operand is physical, then the other must
X	--	an integer or floating point type.
X end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0004a.vhdl-*-*
echo x - e-07-2-4-0005a.vhdl
sed 's/^X//' >e-07-2-4-0005a.vhdl <<'*-*-END-of-e-07-2-4-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-2-1-4005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the right operand of / is a physical type, the left operand
X-- must be the same type (cannot be an integer or a floating point type). Check
X-- cases:  enumeration, real, integer, a different physical type.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable assignment (literals, function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : REAL ) return REAL is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end F;
X
X	function G ( A : INTEGER ) return INTEGER is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A / B;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X	end I;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUMERATION_TYPE is (ONE,TWO,THREE,FOUR);
X	type DISTANCE is range 1 to 1e18
X		units
X			FURLONG;
X		end units;
X
X	function F ( A : REAL ) return REAL is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end F;
X
X	function G ( A : INTEGER ) return INTEGER is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end G;
X
X	function H ( A : ENUMERATION_TYPE ) return ENUMERATION_TYPE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end H;
X
X	function I ( A : DISTANCE ) return DISTANCE is
X		variable B : TIME := 1 S;
X	begin
X		return A;
X	end I;
Xend P;
X
X-- with package P;  use P.all;
Xentity E is
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable A : REAL := 0.0;
X	variable R : INTEGER := 0;
X	variable E : ENUMERATION_TYPE := TWO;
X	variable T : TIME := 1 S;
X	variable D : DISTANCE := 1 FURLONG;
X  begin
X	A := T / F(A);
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	R := 1 MS / G(R);
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	E := H(E) / 993 MS;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	T := ONE / T;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	A := 1.0 / 1 MIN;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X
X	A := T / 1 FURLONG;
X		-- SEMANTIC ERROR:  left operand must be of the same physical
X		--	type as the right.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-2-4-0005a.vhdl-*-*
echo x - e-07-3-5-0001a.vhdl
sed 's/^X//' >e-07-3-5-0001a.vhdl <<'*-*-END-of-e-07-3-5-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-03-3-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that type conversion cannot occur on an operand of any type
X-- but universal integer or universal real on an operand of any type 
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
Xarchitecture BB of E is
Xbegin
XL_X_1: block 
X begin
X process
X  type X1 is range 1.0 to 100.0 ;
X  type X2 is  range 1.0 to 100.0 ;
X  type I1 is  range 1 to 1000000;
X  type I2 is  range  1 to 10000000 ;
X  variable RE1 : X1 ;
X  variable RE2 : X2 ;
X  variable IN1 : I1 ;
X  variable IN2 : I2 ;
X begin
X   RE1 := RE2 + RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X   IN1 := IN2 + IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X   
X   RE1 := RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE2 := RE2 * RE1 ;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN1 * IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE2 := RE1/RE2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN1/IN2;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   IN2 := IN2 - IN1;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X   RE1 := RE2 - RE1;
X   -- ERROR: TYPE CONVERSION CANNOT OCCUR ON AN OPERAND OF ANY TYPE BUT
X   -- UNIVERSAL INTEGER OR UNIVERSAL REAL.
X
X  end process;
X end block;
Xend BB;
*-*-END-of-e-07-3-5-0001a.vhdl-*-*
echo x - e-07-4-0-0001a.vhdl
sed 's/^X//' >e-07-4-0-0001a.vhdl <<'*-*-END-of-e-07-4-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the association list must specify exactly one actual part
X-- for each formal part of the corresponding interface list that does not 
X-- have a default expression. Check for the case where one formal part has
X-- more than one actual part. Check for the case where one formal part
X-- that does not have a default value does not have an actual part.
X-- cases:
X-- 1) more than one parameter association is specified for a formal parameter;
X-- 2) a formal parameter without default value does not have a parameter
X--	association;
X-- contexts:
X-- 1) range constraint in a real subtype declaration
X-- 2) signal assignment statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 12 fn;	-- boxafiganewton
X		end units;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
X	function F_REAL ( A,B,C : REAL; D : REAL := 4.0 ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT : out SNACK) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype R is REAL range REAL'LEFT to F_REAL( 1.0, 2.0, 3.0, B=>4.0 );
X	-- SEMANTIC ERROR:  more than one association specified for
X	--	formal parameter B.  (case 1, context 1)
X  begin
X	PT <= F_SNACK(B=>5);
X	-- SEMANTIC ERROR:  formal parameter without default value does
X	--	not have a parameter association.  (case 2, context 2)
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-4-0-0001a.vhdl-*-*
echo x - e-07-4-0-0002a.vhdl
sed 's/^X//' >e-07-4-0-0002a.vhdl <<'*-*-END-of-e-07-4-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that all positional associations must appear before any named
X-- associations.
X-- cases:
X-- 1) named, positional, named, positional, all in the same order as the
X--	parameter specification.
X-- contexts:
X-- 1) condition in an if-generate statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
X-- L_X_1: block
X signal P1 : BOOLEAN;
X begin
X	if F_REAL( A=>1.0, 2.0, C=>3.0, 4.0 )  /=  0.0  generate
X	-- SEMANTIC ERROR:  positional associations appear after named.
X	--	(case 1, context 1)
X
X		P1 <= TRUE;
X	end generate;
X--  end block;
Xend AB;
*-*-END-of-e-07-4-0-0002a.vhdl-*-*
echo x - e-07-4-0-0003a.vhdl
sed 's/^X//' >e-07-4-0-0003a.vhdl <<'*-*-END-of-e-07-4-0-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the first n positional associations are taken to correspond to 
X-- the first n formal parts, regardless of whether the
X-- associations are, in principle, optional or obligatory or whether
X-- default values were specified for one or more of these formal parts.
X-- JB  (DB 9/5/85)
X-- cases:
X-- 1) formal parameters of different types, first has a default value
X--	and does not have a parameter association of the same type.
X-- contexts:
X-- 1) generic association in component instantiation
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X        type NEW_INTEGER is range integer'low to integer'high;
X	type SNACK is
X		range 1 to 1e18
X		units
X			fn;		-- figanewton
X			bf = 12 fn;	-- boxafiganewton
X		end units;
X
X	function F_SNACK (	A : REAL := 1.0; 
X				B : NEW_INTEGER;
X				C : SNACK ) return SNACK is
X	begin
X		return C;
X	end F_SNACK;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity C is
X   generic ( S : SNACK ) ;
X   port  (CPT:BOOLEAN) ;
Xend C;
X
X
X-- with package P;
Xuse P.all;
Xentity E is
X   port  (EPT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
X-- L_X_1: block
X	component C
X            generic ( S : SNACK ) ;
X	    port ( CPT : BOOLEAN ) ;
X        end component ;
X begin
X	C_1: C
X        generic map ( S => F_SNACK( 1, 2 bf ) )
X	port map ( CPT => EPT ) ;
X -- SEMANTIC ERROR:  first (positional) parameter association does not 
X --	have the same type as the first formal parameter.
X --	(case 1, context 1)
X--  end block;
Xend AB;
*-*-END-of-e-07-4-0-0003a.vhdl-*-*
echo x - e-07-4-0-0004a.vhdl
sed 's/^X//' >e-07-4-0-0004a.vhdl <<'*-*-END-of-e-07-4-0-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the null association element (i.e. commas as place holders) is
X-- not allowed.
X-- cases:
X-- 1) function with formal parameters which all have default values.
X-- contexts:
X-- 1) assignment in variable declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
Xend P;
X
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : ENUM := F_ENUM(,);
X	-- SYNTAX ERROR:  null parameter association not legal.
X	--	(case 1, context 1)
X  begin
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-e-07-4-0-0004a.vhdl-*-*
echo x - e-07-4-0-0005a.vhdl
sed 's/^X//' >e-07-4-0-0005a.vhdl <<'*-*-END-of-e-07-4-0-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an empty association list (i.e. empty paired parentheses)
X-- is not allowed, even for a function that has no formal parameters or
X-- an entity whose formal parts all have default values.
X-- cases:
X-- 1) function with no formal parameters;
X-- 2) function whose formal parameters all have default values.
X-- contexts:
X-- 1) next statement;
X-- 2) enumeration subtype declaration.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X
X	function F_ENUM (	A : ENUM := ONE; 
X				B : ENUM := TWO ) return ENUM is
X	begin
X		return A;
X	end F_ENUM;
X
X	function F_TRUE return BOOLEAN is
X	begin
X		return TRUE;
X	end F_TRUE;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xfunction F return ENUM is
X	subtype E is ENUM range ONE to F_ENUM();
X	-- SYNTAX ERROR:  empty parameter association not legal.
X	--	(case 1, context 1)
Xbegin
X	while TRUE loop
X		next when F_TRUE();
X	-- SYNTAX ERROR:  empty parameter association not legal.
X	--	(case 2, context 2)
X          return ONE;
X	end loop;
X  end F;
*-*-END-of-e-07-4-0-0005a.vhdl-*-*
echo x - e-07-4-0-0006a.vhdl
sed 's/^X//' >e-07-4-0-0006a.vhdl <<'*-*-END-of-e-07-4-0-0006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the mode of the formal designator is in, inout, or linkage
X-- and the actual designator is not open then the type of the actual designator
X-- after applying any type conversion function present in the actual must
X-- be the same as the type of the corresponding formal designator.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	function INT_TO_BIT ( INT : Integer )return BIT is
X     
X           variable BTmp : BIT;
X
X        BEGIN
X
X           BTmp := '1';
X           return BTmp;
X
X        END INT_TO_BIT; 
X
Xend P;
X
X
X
Xentity EMP is
X    port  ( I : in INTEGER;
X 	    B : inout Bit ;
X	    L : linkage INTEGER ) ;
Xend EMP ;
X
X-- with package P; 
Xuse P.all;
Xentity EMT is
X    port (sig     : bit) ;
Xend EMT;
X
Xarchitecture ABC of EMT is
X--  BB : block
X   signal S2 : Integer;
X   signal S3 : Boolean;
X
X   component LA port ( S1 : Bit ) ;
X   end component ;
X  for
X       all : LA
X 	use
X--	 entity (EMP)
X	 entity EMP 
X-- 7.2 to 1076 translation: fold the two port statements
X--     together.
X--	 port map (I => S1)
X	 port map ( I => S1 ,
X-- ERROR: actual must be same type as formal if not open
X--  	 port (INT_TO_BIT(L) => S2, B => S3)
X 	            INT_TO_BIT(L) => S2,
X		    B => S3)
X-- ERROR: actual must be same type as formal if not open
X--	 architecture (open) ;
X--   end for;
X       ;
X begin
X   CIS1 : LA port map (S1 => sig) ;
X--  end block BB ;
Xend ABC ;
*-*-END-of-e-07-4-0-0006a.vhdl-*-*
echo x - e-07-4-0-0007a.vhdl
sed 's/^X//' >e-07-4-0-0007a.vhdl <<'*-*-END-of-e-07-4-0-0007a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0007A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the mode of the formal designator is out, inout, buffer or
X-- linkage and the actual designator is not open then the type of the formal
X-- designator the type of the formal designator after applying any type
X-- conversion function present in the formal part must be the same as the
X-- type of the corresponding actual designator.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function INT_TO_BIT ( INT : Integer )return BIT is
X     
X           variable BTmp : BIT;
X
X        BEGIN
X
X           BTmp := '1';
X           return BTmp;
X
X        END INT_TO_BIT; 
X
Xend P;
X
X
Xentity EMP  is
X    port ( I : in INTEGER;B : inout Bit ; L : linkage Boolean ) ;
Xend EMP ;
X
X-- with package P; 
Xuse P.all;
Xentity EMT  is
X    port (sig     : bit) ;
Xend EMT;
X
Xarchitecture ABC of EMT is
X--  BB : block
X   signal S2 : Integer;
X   signal S3 : Boolean;
X
X   component LA port ( S1 : Bit ) ;
X   end component ;
X   for all : LA
X 	use
X	 entity EMP
X	 port map (I => S1,
X            -- ERROR: actual must be same type as formal if not open
X-- 	 port (L => INT_TO_BIT(S2), B => S3)
X 	           L => INT_TO_BIT(S2), 
X                   B => S3 )
X            -- ERROR: actual must be same type as formal if not open
X--	 architecture (open) ;
X--   end for;
X     ;
X begin
X   CIS1 : LA port map (S1 => sig) ;
X--  end block BB ;
Xend ABC ;
*-*-END-of-e-07-4-0-0007a.vhdl-*-*
echo x - e-07-4-0-0008a.vhdl
sed 's/^X//' >e-07-4-0-0008a.vhdl <<'*-*-END-of-e-07-4-0-0008a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-07-4-0-0008A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X--   Check that an actual port in a port association list must not be a formal 
X--   port signal name.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity veek  is
X    port (plik : bit ) ;
Xend veek;
X
Xentity hirif is
Xend hirif;
X                                                           
Xarchitecture Ahhh of hirif is
X-- fff: block
X	component Veek port (plik : bit);
X        end component ;
X     begin
X	cis : veek port map (plik);
X   -- ERROR : plik has not been declared.
X
X--      end block;
Xend Ahhh;
*-*-END-of-e-07-4-0-0008a.vhdl-*-*
echo x - s-07-1-0-0001a.vhdl
sed 's/^X//' >s-07-1-0-0001a.vhdl <<'*-*-END-of-s-07-1-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of simple name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architectural body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X	function F ( B : BOOLEAN ) return BOOLEAN is
X	begin
X		return B;			-- context 3
X	end F;
Xend P;
X
X
X-- with package P;
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in SMALL_INT;  
X		PT4 : in BOOLEAN ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X	signal A : B_ARRAY;
X    begin
X	process
X	  variable BBB : B_array;
X        begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		    BBB( PT3 to I ) := PT1( PT3 to I );	-- context 1
X		    exit when PT4;			-- context 2
X	    end loop;
X	    return;
X	end process;
X        PT2 <= A;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X	process
X         begin
X	    for I in B_ARRAY'RANGE loop
X	        PT2(I) <= F( PT4 );		-- context 4
X            end loop;
X        end process;
X--     end block;
Xend AB;
X
Xuse P.all ;
Xpackage body P is
Xfunction F ( A : BOOLEAN ) return  BOOLEAN is
Xbegin
X	case A is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
Xend P ;
*-*-END-of-s-07-1-0-0001a.vhdl-*-*
echo x - s-07-1-0-0001b.vhdl
sed 's/^X//' >s-07-1-0-0001b.vhdl <<'*-*-END-of-s-07-1-0-0001b.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001B.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of selected name
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type S_RECORD is record
X			E : SMALL_INT;
X		end record;
X	type B_RECORD is record
X			E : BOOLEAN;
X		end record;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X	function F ( B : B_RECORD ) return BOOLEAN is
X	begin
X		return B.E;			-- context 3
X	end F;
X	function F2 ( B : BOOLEAN ) return BOOLEAN is
X	begin
X		return TRUE;	
X	end F2;
X
Xend P;
X
X
X-- with package P;
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in S_RECORD;  
X		PT4 : in B_RECORD ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X	signal A : B_ARRAY ;
X    begin
X	process
X	 variable BBB : B_ARRAY ;
X        begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		    BBB( PT3.E to I ) := PT1( PT3.E to I );	-- context 1
X		    exit when PT4.E;		-- context 2
X	    end loop;
X	    return;
X	end process;
X	    PT2 <= A;
X--     end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X	process
X          begin
X	   for I in PT1'RANGE loop
X	       PT2(I) <= F2( PT4.E );		-- context 4
X	   end loop;
X	end process;
X--     end block;
Xend AB;
X
X-- with package P; 
Xuse p.all;
Xpackage body  p is
Xfunction F ( A : B_RECORD ) return  BOOLEAN is
Xbegin
X	case A.E is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
Xend P ;
*-*-END-of-s-07-1-0-0001b.vhdl-*-*
echo x - s-07-1-0-0001c.vhdl
sed 's/^X//' >s-07-1-0-0001c.vhdl <<'*-*-END-of-s-07-1-0-0001c.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001C.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of indexed name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype S is INTEGER range 1 to 10;
X	type S_ARRAY is array (S) of S;
X	type B_ARRAY is array (S) of BOOLEAN;
X	function F ( A : S ) return BOOLEAN is
X		variable V : B_ARRAY ; 
X	begin
X		return V(A);			-- context 3
X	end F;
Xend P;
X
X
X-- with package P;
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY;
X		PT2 : out B_ARRAY;
X		PT3 : in S_ARRAY;  
X		PT4 : in B_ARRAY ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    variable A : B_ARRAY; 
X	begin
X	    for I in A'LOW to A'HIGH loop
X		    A( PT3(I) to I ) := PT1( PT3(I) to I );	-- context 1
X		    exit when PT4(1);		-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X       process
X         begin
X	   for I in PT3'RANGE loop
X	       PT2(I) <= F( PT3(I) );		-- context 4
X	   end loop;
X       end process;
X--     end block;
Xend AB;
X
X
X
X-- with package P;
X
Xuse P.all;
Xpackage body  P is
Xfunction F ( A : B_ARRAY ) return  BOOLEAN is
Xbegin
X	case A(1) is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
Xend P ;
*-*-END-of-s-07-1-0-0001c.vhdl-*-*
echo x - s-07-1-0-0001d.vhdl
sed 's/^X//' >s-07-1-0-0001d.vhdl <<'*-*-END-of-s-07-1-0-0001d.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001D.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of slice name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in archit. body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can a slice name be used in these contexts?
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	type UN_B_ARRAY is array ( INTEGER range <> ) of BOOLEAN;
X	subtype B_ARRAY_1 is UN_B_ARRAY ( 1 to 10 );
X
X	function F1 ( A : UN_B_ARRAY ) return UN_B_ARRAY is
X		variable A_LOW  : INTEGER ;
X		variable A_HIGH : INTEGER ;
X	begin
X		A_LOW  := B_ARRAY_1'LOW;
X		A_HIGH := B_ARRAY_1'HIGH;
X		return A(A_LOW to A_HIGH);		-- context 3
X	end F1;
X
X	function F2 ( A : UN_B_ARRAY ) return BOOLEAN is
X	begin
X		return TRUE;
X	end F2;
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY_1; 
X		PT2 : out B_ARRAY_1 ) ;
Xend E;
X
X
Xarchitecture AB of E is
X-- L_X_1:    block
X    begin
X	process
X         begin
X	    for I in PT2'RANGE loop
X	       PT2(I) <= F2( PT1(1 to I) );		-- context 4
X	    end loop;
X        end process;
X--     end block;
Xend AB;
*-*-END-of-s-07-1-0-0001d.vhdl-*-*
echo x - s-07-1-0-0001e.vhdl
sed 's/^X//' >s-07-1-0-0001e.vhdl <<'*-*-END-of-s-07-1-0-0001e.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001E.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of qualified expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse PW.all ;
Xpackage body PW is
X	type ENUM is ( ONE, TWO, THREE, FOUR );
X	type B_ARRAY is array (ENUM) of BOOLEAN;
X	subtype sbool is boolean range false to  true;
X
X	function F ( B : sBOOL) return sBOOL is
X	begin
X		return sbool'(TRUE);			-- context 3
X	end F;
Xend PW;
X
X
X-- with package PW;
X
Xuse PW.all;
Xentity E  is
X    port (	PT1 : in  B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in  ENUM;  
X		PT4 : in  BOOLEAN ;
X		PT5 : out B_ARRAY
X		) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    variable A : B_ARRAY ;
X	begin
X	    for I in B_ARRAY'LOW to B_ARRAY'HIGH loop
X		A( ENUM'(ONE) to I ) := PT1( ENUM'(ONE) to I );	-- context 1
X		exit when sbool'(TRUE);			-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X	process
X	  begin
X	    for I in PT1'RANGE loop
X	         PT2(I) <= F( sbool'(FALSE) );		-- context 4
X	     end loop;
X	end process;
X--     end block;
Xend AB;
X
X-- with package PW; 
Xuse Pw.all;
Xpackage body  Pw is
Xfunction F ( A : sBOOL) return  sBOOL is
Xbegin
X	case sbool'(TRUE) is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
*-*-END-of-s-07-1-0-0001e.vhdl-*-*
echo x - s-07-1-0-0001f.vhdl
sed 's/^X//' >s-07-1-0-0001f.vhdl <<'*-*-END-of-s-07-1-0-0001f.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001F.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of attribute name.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage  P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X	subtype SBOOL is BOOLEAN range BOOLEAN'LEFT to BOOLEAN'RIGHT;
X--	attribute enum_att of port is boolean;
X	attribute enum_att of other : signal is boolean;
Xend P;
X
Xuse P.all ;
Xpackage body P is
X	function F ( B : BOOLEAN ) return SBOOL is
X	begin
X		return SBOOL'RIGHT;			-- context 3
X	end F;
Xend P;
X
X
X-- with package P;
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in SMALL_INT;  
X		PT4 : in SBOOL ) ;
X--	for enum_att of port PT1 use True;
X	attribute enum_att of PT1 : signal is True;
Xend E;
X
X
X-- with package P;
Xuse P.all;
Xarchitecture BB of E is
X-- L_X_1:    block
X      begin
X	process
X	    variable A : B_ARRAY;
X	begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		    A( PT1'LOW to I ) := PT1( PT1'LOW to I );	
X			-- context 1
X	    end loop;
X            for J in SMALL_INT'LOW TO SMALL_INT'HIGH loop
X		null;
X		    exit when PT4'STABLE;-- context 2
X	    end loop;
X
X	    PT2 <= A;
X	    return;
X	end process;
X	process
X		variable Bool : boolean ;
X	  begin
X	      case PT1'enum_att is				-- context 5
X		  when FALSE => bool := TRUE;
X		  when others => bool := FALSE;
X	      end case;
X	end process;
X
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X	process
X         begin
X	   for I in PT1'RANGE loop
X	      PT2(I) <= F( SBOOL'VAL( SBOOL'POS(PT4)) );	-- context 4
X	   end loop;
X        end process;
X--     end block;
Xend AB;
*-*-END-of-s-07-1-0-0001f.vhdl-*-*
echo x - s-07-1-0-0001g.vhdl
sed 's/^X//' >s-07-1-0-0001g.vhdl <<'*-*-END-of-s-07-1-0-0001g.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001G.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of literal.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in behavioral body;
X-- 3) return statement in function in package;oop in arch. body;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X
X	function F ( B : BOOLEAN ) return BOOLEAN is
X	begin
X		return TRUE;			-- context 3
X	end F;
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in SMALL_INT;  
X		PT4 : in BOOLEAN ;
X		PT5 : out B_ARRAY 
X		) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    variable A : B_ARRAY ; 
X        begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		A( 1 to I ) := PT1( 1 to I );	-- context 1
X		exit when TRUE;			-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X      process
X       begin
X	for I in B_ARRAY'RANGE loop
X	    PT2(I) <= F( FALSE );		-- context 4
X	end loop;
X       end process;
X--     end block;
Xend AB;
X
X
Xuse P.all ;
Xpackage body P is
Xfunction F ( A : BOOLEAN ) return  BOOLEAN is
Xbegin
X	case TRUE is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
Xend P ;
*-*-END-of-s-07-1-0-0001g.vhdl-*-*
echo x - s-07-1-0-0001h.vhdl
sed 's/^X//' >s-07-1-0-0001h.vhdl <<'*-*-END-of-s-07-1-0-0001h.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001H.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of aggregate.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- question:
X-- Three of the contexts -- range constraint in discrete range, condition in
X--	exit statement, and case expression -- require a discrete expression.
X--	How can an aggregate be used as a primary in these contexts?
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type S_RECORD is record
X			E : SMALL_INT;
X		end record;
X	type B_RECORD is record
X			E : BOOLEAN;
X		end record;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X
X	function F ( B : B_RECORD ) return BOOLEAN is
X	begin
X		return TRUE;		-- context 3
X	end F;
X
X	function F2 ( B : B_RECORD ) return B_RECORD is
X	begin
X		return (E=>B.E);		-- context 3
X	end F2;
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (	PT1 : in  B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in  S_RECORD;  
X		PT4 : in  B_RECORD;
X                PT5 : out B_RECORD) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin	
X	process
X	    variable A : B_ARRAY ;
X	begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		exit when ( PT4 = (E=>A(I)) );		-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X        process
X        begin 
X	  for I in B_ARRAY'RANGE loop
X	      PT2(I) <= F ((E=>TRUE));		-- context 4
X	  end loop;
X        end process;
X	PT5 <= F2 ( (E=>FALSE));                -- context 4
X--     end block;
Xend AB;
*-*-END-of-s-07-1-0-0001h.vhdl-*-*
echo x - s-07-1-0-0001i.vhdl
sed 's/^X//' >s-07-1-0-0001i.vhdl <<'*-*-END-of-s-07-1-0-0001i.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001I.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of function call.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X
X
X	function F_INT ( i : integer) return SMALL_INT is
X	begin	return 1;	end F_INT;
X
X	function F_BOOL ( B : BOOLEAN ) return BOOLEAN is
X	begin
X		return STANDARD.TRUE;			
X	end F_BOOL;
X
X    function F ( A : BOOLEAN ) return  BOOLEAN is
X   	begin
X	case F_BOOL(A) is				-- context 5
X		when FALSE => return TRUE;
X		when others => return F_BOOL( F_BOOL( A));  -- context 3
X	end case;
X    end F;
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X      generic (gen1 : BOOLEAN) ;
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in SMALL_INT) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    variable A : B_ARRAY ; 
X	begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		A( F_INT(9) to I ) := PT1( F_INT(4) to I );	-- context 1
X		exit when F_BOOL(gen1);			-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X       process
X	begin
X	  for I in PT1'RANGE loop
X	      PT2(I) <= F_BOOL( F(TRUE) );		-- context 4
X	  end loop;
X       end process;
X--     end block;
Xend AB;
X
X
*-*-END-of-s-07-1-0-0001i.vhdl-*-*
echo x - s-07-1-0-0001j.vhdl
sed 's/^X//' >s-07-1-0-0001j.vhdl <<'*-*-END-of-s-07-1-0-0001j.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-0-0001J.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that each of (name (simple name, selected name, indexed
X-- name, slice name), attribute name), literal, aggregate,
X-- function call, qualified expression, and parenthesized
X-- expression) may occur in all contexts where a primary may occur, hence in 
X-- all contexts where an expression may occur. Sample these cases: discrete 
X-- range in slice name, boolean condition after "when" in exit statement, 
X-- return statement in function, actual parameter in subprogram call, case 
X-- expression in case statement.
X-- DPS 05/13/85
X-- case of parenthesized expression.
X-- contexts:
X-- 1) range constraint in discrete range in slice name in variable assignment;
X-- 2) boolean condition in exit statement of loop in architecture body;
X-- 3) return statement in function in package;
X-- 4) actual parameter in function call in architectural body;
X-- 5) case expression in case statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X	subtype SMALL_INT is INTEGER range 1 to 10;
X	type B_ARRAY is array (SMALL_INT) of BOOLEAN;
X	function F ( B : BOOLEAN ) return BOOLEAN is
X	begin
X		return (TRUE);			-- context 3
X	end F;
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (	PT1 : in B_ARRAY; 
X		PT2 : out B_ARRAY; 
X		PT3 : in SMALL_INT;  
X		PT4 : in BOOLEAN ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1:    block
X    begin
X	process
X	    variable A : B_ARRAY ;
X        begin
X	    for I in SMALL_INT'LOW to SMALL_INT'HIGH loop
X		A( (1) to I ) := PT1( (1) to I );	-- context 1
X		exit when (TRUE);			-- context 2
X	    end loop;
X	    PT2 <= A;
X	    return;
X	end process;
X--     end block;
Xend BB;
X
Xarchitecture AB of E is
X-- L_X_2:    block
X    begin
X	process
X	begin
X	    for I in B_ARRAY'RANGE loop
X	       PT2(I) <= F( (FALSE) );		-- context 4
X    	    end loop;
X        end process;
X--     end block;
Xend AB;
X
Xuse P.all ;
Xpackage body P is
Xfunction F ( A : BOOLEAN ) return  BOOLEAN is
Xbegin
X	case (TRUE) is				-- context 5
X		when FALSE => return TRUE;
X		when others => return FALSE;
X	end case;
X  end F;
Xend P ;
*-*-END-of-s-07-1-0-0001j.vhdl-*-*
echo x - s-07-2-1-0001a.vhdl
sed 's/^X//' >s-07-2-1-0001a.vhdl <<'*-*-END-of-s-07-2-1-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-1001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for any BOOLEAN or BIT type.
X-- cases:  objects, literals, and function calls of types boolean and bit.
X-- contexts:
X-- 1) condition in generation scheme of an if- generation statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse Some_funcs.all ;
Xpackage body Some_funcs is
Xfunction F_BOOL ( A,B : boolean ) return boolean is
X begin
X	return (((( not A and B) or A) nand B) nor A) xor FALSE; -- context 4
X end F_BOOL;
X
Xfunction F_BIT ( A,B : bit ) return bit is
X begin
X	return ((((not A and B) or A) nand B) nor A) xor '1';     -- context 4
X end F_BIT;
Xend some_funcs;
X
X
X-- with package some_funcs; 
Xuse some.all_funcs;
Xentity E  is	-- context 2
X        generic ( G_BOOL : boolean;  G_BIT : bit ) ;
X    port (	IN_BOOL  : in boolean := TRUE;	-- context 2
X		IN_BIT   : in bit     := '0';
X		OUT_BOOL : out boolean;  
X		OUT_BIT  : out bit      ) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X begin
X	if (G_BOOL xor FALSE) generate           -- context 1
X         OUT_BOOL <= F_BOOL( G_BOOL and TRUE, not G_BOOL ) or FALSE;-- context 3
X	end generate;
X	if ((G_BIT xor '0') = '1') generate      -- context 1
X            OUT_BIT <= F_BIT( (G_BIT and '1') , not G_BIT ) or '0'; -- context 3
X	end generate;
X
X  process
X  begin
X   return;
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-1-0001a.vhdl-*-*
echo x - s-07-2-1-0002a.vhdl
sed 's/^X//' >s-07-2-1-0002a.vhdl <<'*-*-END-of-s-07-2-1-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-1002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the logical operators (and, or, nand, nor, xor, not) are
X-- defined for one-dimensional arrays of any BOOLEAN or BIT type (if the arrays
X-- are of the same length), and that the result is an array of the same type.
X-- Check where one or both operands are aggregates or concatenated sequences.
X-- cases:
X-- 1) aggregate and concatenated sequence of BIT
X-- 2) concatenated sequence and array function result of BOOLEAN
X-- 3) two objects of the same length but different index ranges.
X-- contexts:
X-- 1) condition in iteration scheme of an loop_statement;
X-- 2) port declaration;
X-- 3) signal assignment;
X-- 4) function return statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type UN_ARRAY_1 is array ( integer range <> ) of boolean;
X	type UN_ARRAY_2 is array ( integer range <> ) of bit;
X	subtype A_ARRAY is UN_ARRAY_1( 1 to 3 );
X	subtype B_ARRAY is UN_ARRAY_1( 1 to 2 );
X	subtype C_ARRAY is UN_ARRAY_2( 1 to 3 );
X	subtype D_ARRAY is UN_ARRAY_2( 1 to 2 );
Xend P;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F_BOOL ( A,B : A_ARRAY ) return A_ARRAY is
Xbegin
X    return (A and( B or( A nand( B nor( A xor( B_ARRAY'(TRUE, TRUE) & FALSE
X           )     )     )       )      )      );  -- context 4
X  end F_BOOL;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F_BIT ( A,B : C_ARRAY ) return C_ARRAY is
Xbegin
X    return 
X	(A and
X	 ( B or
X	  ( A nand
X	   ( B nor
X	    ( A xor
X--	     ( D_ARRAY'('1','0')
X	     ( D_ARRAY'('1','0')
X	        & bit'('1')
X           )     )     )       )      )      );  -- context 4
X  end F_BIT;
Xend P ;
X
X-- with function F_BOOL, F_BIT;
X-- with package P ;  
Xuse P.F_BOOL, P.F_BIT ;
Xentity E  is	-- context 2
Xgeneric ( G_BOOL : A_ARRAY;  G_BIT : C_ARRAY) ;
X    port (	IN_BOOL  : in A_ARRAY;
X		IN_BIT   : in C_ARRAY ;
X		OUT_BOOL : out A_ARRAY;  
X		OUT_BIT  : out C_ARRAY  ) ;
X
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X   begin
X	while (G_BOOL xor A_ARRAY'(others=>FALSE)) = G_BOOL loop -- context 1
X		OUT_BOOL <= F_BOOL( G_BOOL and A_ARRAY'(others=>FALSE), 
X				    not G_BOOL 
X				  ) 
X                            or A_ARRAY'(others => FALSE);    -- context 3
X	end loop;
X	while  ((G_BIT xor C_ARRAY'(others => '0')) =    -- context 1
X                                   C_ARRAY'(others => '0'))  loop
X		OUT_BIT <= F_BIT( G_BIT and ('1','0','1'), not G_BIT ) 
X			or ('0','1','1');		-- context 3
X	end loop;
X    end process;
X--   end block;
Xend BB;
*-*-END-of-s-07-2-1-0002a.vhdl-*-*
echo x - s-07-2-1-0003a.vhdl
sed 's/^X//' >s-07-2-1-0003a.vhdl <<'*-*-END-of-s-07-2-1-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-1003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that static expressions formed with the logical operators have the
X-- correct static value.
X-- cases:
X-- 1) bit literal expression
X-- 2) boolean literal expression
X-- contexts:
X-- 1) choice in case statement in a generate loop
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	subtype ALWAYS_FALSE is boolean range FALSE to FALSE;
X	subtype ALWAYS_ZERO is bit range '0' to '0';
X	type Uc is array(boolean range <>) of boolean;
X	subtype carr is Uc (FALSE to TRUE);
X
X	type Uc2 is array(bit range <>) of bit;
X	subtype carr2 is Uc2  ('0' to '1');
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    generic ( G_BOOL : ALWAYS_FALSE;  G_BIT : ALWAYS_ZERO ) ;
X    port ( PT : boolean ) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X begin
X	for Bek in FALSE to TRUE generate
X	    P1: process
X			variable Carr_var : Carr ;
X			variable Carr2_var : Carr2; 
X		begin
X		   case G_BOOL is
X			when (TRUE xor TRUE) => null;
X		   end case;
X		   case G_BOOL is
X			when (FALSE and TRUE) => null;
X		   end case;
X		   case G_BOOL is
X			when (FALSE or FALSE) => null;
X		   end case;
X		   case G_BOOL is
X			when (not TRUE) => null;
X		   end case;
X	     end process;
X	end generate;
X
X	for Bek2 in BIT'('0') to BIT'('1') generate
X	    P2 :process
X		begin
X		  case G_BIT is
X			when ('0' xor '0') => null;
X		  end case;
X		  case G_BIT is
X			when ('0' and '1') => null;
X		  end case;
X		  case G_BIT is
X			when ('0' or '0') => null;
X		  end case;
X		  case G_BIT is
X			when (not '1') => null;
X		  end case;
X	     end process;
X	end generate;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-1-0003a.vhdl-*-*
echo x - s-07-2-1-5001a.vhdl
sed 's/^X//' >s-07-2-1-5001a.vhdl <<'*-*-END-of-s-07-2-1-5001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-5001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary arithmetic operator abs is defined for any
X-- numeric type.  Check for objects, literals, function calls.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F_REAL ( A : real ) return real is
X	begin
X		return abs A;
X-- 		-- check "abs" with real object in function return statement.
X	end F_REAL;
X
X	function F_INT ( A : integer ) return integer is
X	begin
X		return abs A;
X		-- check "abs" with integer object in function return statement.
X	end F_INT;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is 
X    port (	PT_INT : integer; PT_REAL : real) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype FLOAT is real range - 32767.0 to + F_REAL( -32767.0 );
X  begin
X	case abs F_INT(PT_INT) is
X		-- check "abs" with integer function in case expression.
X		when + 1 => null;
X		when abs (-2) => null;
X		when others => null;
X	end case;
X
X        if    abs F_REAL( PT_REAL)  = abs( -1.99999999) then null;
X        elsif abs F_REAL( PT_REAL)  = abs( 11.99999999) then null;
X        end if;
X
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-1-5001a.vhdl-*-*
echo x - s-07-2-1-5002a.vhdl
sed 's/^X//' >s-07-2-1-5002a.vhdl <<'*-*-END-of-s-07-2-1-5002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-5002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the left operand of the binary arithmetic operator ** may be any
X-- integer or any floating point type, that the right operand may be of integer
X-- type, and that the type of the result is the same as the type of the left
X-- operand. Check for objects, literals, function calls.
X-- cases:  left operand:  re-defined integer and real.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment (objects, literals, and function calls)
X-- 4) signal assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type NEW_FLT is range REAL'LOW to REAL'HIGH;
X
X	function L1 ( A : NEW_INT; B : integer ) return NEW_INT is
X	begin
X		return A ** B;	-- context 1
X	end L1;
X
X	function L2 ( A : NEW_FLT; B : integer ) return NEW_FLT is
X	begin
X		return A ** B;	-- context 1
X	end L2;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT1 : out NEW_INT; PT2 : out NEW_FLT ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable I : NEW_INT := L1(1,1) ** 5;		-- context 2
X	variable F : NEW_FLT := L2(1.0,1) ** (-1);	-- context 2
X  begin
X	I := L1(I,1) ** 2;	-- context 3
X	F := 2.0 ** (-9);	-- context 3
X
X	PT1 <= I ** 10;		-- context 4
X	PT2 <= F ** 2;		-- context 4
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-1-5002a.vhdl-*-*
echo x - s-07-2-1-5003a.vhdl
sed 's/^X//' >s-07-2-1-5003a.vhdl <<'*-*-END-of-s-07-2-1-5003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-5003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that static expressions formed with the operators abs and ** have the
X-- correct static value.
X-- cases:
X-- 	for "abs":  types integer, real, and physical
X--		with positive, negative, and zero values.
X--	for "**":  types integer and real with positive,
X--		negative, and zero values.  Except: left operand is integer
X--		and right operand is negative.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X-- with package P ;
Xuse P.all ;
Xpackage body P is
Xfunction F return boolean is
X	subtype ALWAYS_TRUE is boolean range TRUE to TRUE;
X        constant MININT : integer := integer'low;
X	variable A : ALWAYS_TRUE;
Xbegin
X	case A is
X		when (	(abs(-9532) = 9532) 	and (abs(-1.2e-10) > 0.0) and
X			(abs 0 = 0) 		and (abs 0.0 = 0.0) and
X			(abs 10000 = 10000)	and (abs 32.0 = 32.0) and
X			(abs(-1 s) = 1 s)	and (abs 0 fs = 0 fs) and
X			(abs(27 ms) = 27 ms)	and 
X			(abs(-MININT) = abs MININT) ) => null;
X	end case;
X	case A is
X		when (	(1.0**2 = 1.0)		and ((-1.0)**1 = -1.0)	and
X			(0.0**77 = 0.0)		and (-0.5**(-1) < (-1.9) ) and
X			(2.0**(-2) < 1.5)	and ((-10)**2 = 100) and
X                        (100000.0**0 = 1.0)     and ( 100000**0 = 1) and
X			(8**3 = 512) )	=> null;
X	end case;
X        return TRUE;
X  end F;
Xend P ;
*-*-END-of-s-07-2-1-5003a.vhdl-*-*
echo x - s-07-2-2-0001a.vhdl
sed 's/^X//' >s-07-2-2-0001a.vhdl <<'*-*-END-of-s-07-2-2-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators = and /= are defined for all types. 
X-- Check for objects, function calls, literals, aggregates and concatenated
X-- sequences.
X-- JB  (DB 9/5/85)
X-- cases:  (19)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
X-- record -- objects, function calls, aggregates
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X	type NEW_INTEGER is range integer'LEFT to integer'RIGHT;
X	type PHYS is range 1 to 260
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X		end units;
X	type NEW_REAL is range real'LEFT to real'RIGHT;
X	type UN_INT_ARRAY is array ( ENUM range <>) of NEW_INTEGER;
X	subtype INT_ARRAY is UN_INT_ARRAY (ENUM range ONE to TWO ) ;
X	type UN_B_ARRAY is array ( boolean range <> ) of boolean;
X	type CHAR_RECORD is record
X			C1, C2, C3 : CHARACTER;
X		end record;
X
X	type INT_RECORD is record
X			I1, I2 : NEW_INTEGER;
X		end record;
X
X	function F_ENUM (i : integer) return ENUM is
X	begin	return ONE;
X	end F_ENUM;
X
X	function F_INT(i : integer)  return NEW_INTEGER is
X	begin	return 0;
X	end F_INT;
X
X	function F_PHYS( i : integer) return PHYS is
X	begin	return 5 A;
X	end F_PHYS;
X
X	function F_REAL( i : integer) return NEW_REAL is
X	begin	return 1.0;
X	end F_REAL;
X
X	function F_INT_ARRAY(i : integer) return INT_ARRAY is
X	begin	return (others=>1);
X	end F_INT_ARRAY;
X
X
X	function F_UN_INT_ARRAY(i : integer) return UN_INT_ARRAY is
X	begin	return (TWO to FOUR=>1);
X	end F_UN_INT_ARRAY;
X
X	function F_CHAR_REC( i : integer) return CHAR_RECORD is
X	begin	return ( C1=>'a', C2=>'b', C3=>'c' );
X	end F_CHAR_REC;
X
Xend TYPES_PACKAGE;
X
X
X-- with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all ;
Xentity E  is
X    generic (	G : boolean ; 
X		G_ENUM : ENUM;
X		G_INT : NEW_INTEGER;
X		G_PHYS : PHYS;
X		G_REAL : NEW_REAL;
X		G_INT_ARRAY : INT_ARRAY;
X		G_CHAR_REC : CHAR_RECORD ;
X		G_CHAR_REC2 : CHAR_RECORD ) ;
X
X    port (	PT_B1 : in boolean ;  
X		PT_B2 : out boolean ;
X		PT_ENUM : in ENUM;
X		PT_INT : in NEW_INTEGER;
X		PT_PHYS : in PHYS;
X		PT_REAL : in NEW_REAL;
X		PT_INT_ARRAY : in INT_ARRAY;
X		PT_CHAR_REC : in CHAR_RECORD ) ;
Xbegin -- added entity_statement section -- 1076
X          assert 10 A = 1 B; -- UD PHYS type : Literal, Literal
Xend E;
X
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype ALWAYS_TRUE is boolean range TRUE to TRUE;
X        constant Dummy_Int : integer := 5;
X	variable V0 : boolean := (F_INT(1)  = G_INT);
X				 -- User_defined Integer type Func_call, Object
X	variable V1 : boolean := (G_INT = 5);
X				 -- User_defined Integer type Object, Literal
X
X
X	variable V : boolean := (F_PHYS(Dummy_Int) /= G_PHYS);
X				 -- UD PHYS type : Func_call, Object
X  begin
X        if  (G_CHAR_REC /= CHAR_RECORD ' ('a','b','c')) then 
X				 -- Record Object, Aggragate
X		V := False;
X	elsif (F_ENUM(Dummy_int) /= PT_ENUM) then -- UD Enum : Func_call, Object
X 		V := TRUE;
X	end if;
X	if (PT_ENUM = TWO) then -- User_defined Enum Object, literal
X		null;
X	end if;
X
X	case (PT_REAL = F_REAL(Dummy_int) ) is -- UD Real :Object,Func_call
X
X                when TRUE =>
X		    V1 := ( (PT_INT_ARRAY & 2) /= F_INT_ARRAY(Dummy_int) ) ;
X			-- ARRAY : (OBJECT, concatenate), Func_call
X		    V := (PT_INT_ARRAY = INT_ARRAY'(1,2) );
X			-- ARRAY : Object, Aggragate
X		when others =>	
X			null;
X	end case;
X	for B in (F_CHAR_REC(Dummy_int) = CHAR_RECORD ' (' ',' ',' ')) to TRUE loop
X			-- RECORD: Func_call, Aggragate
X		next when (PT_REAL = 5.0);
X			-- UD Real type: Object, Literal
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
X-- with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
Xfunction F ( PR : boolean := (1.0 = 1.0); 
X             PR2 : INT_ARRAY;
X             P_PHYS : PHYS;
X	     PR3 : CHAR_RECORD ) return boolean is
X	variable V : boolean;
X	subtype TRUE_ARRAY is UN_B_ARRAY ( (F_CHAR_REC(5) = F_CHAR_REC(6)) 
X                                             to TRUE );
Xbegin
X	V := (PR2 /= (1,1));
X	if (P_PHYS /= F_PHYS(5)) then
X		V := (PR2(ONE) = F_INT(4));
X	end if;
X	while (F_REAL(3) /= 1.0) loop
X		exit when (P_PHYS = F_PHYS(5));
X	end loop;
X        assert (PR2 = (one=> 1, two=>4 ));
X	return (F_ENUM(2) /= THREE);
Xend F;
Xend TYPES_PACKAGE ;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : boolean ;
X	component C port( PT1 : in boolean; PT2 : out boolean ) ;
X	end component ;
X--	generic ( G : boolean ); -- 1076: deleted - not used
X begin
X	if (G_CHAR_REC /= G_CHAR_REC2 ) generate
XL_X_3:          block
X            begin
X             process
X             begin
X		case (F_CHAR_REC(1) = G_CHAR_REC) is
X			when TRUE =>	S <= TRUE;
X			when FALSE =>	S <= FALSE;
X		end case;
X            end process;
X          end block;
X	end generate;
X	for I in ( G_ENUM /= ONE) to TRUE generate
X           B4_LABEL: block
X            begin
X             process
X              begin
X	       null;
X              end process;
X            end block;
X	end generate;
X--   end block;
Xend AB;
*-*-END-of-s-07-2-2-0001a.vhdl-*-*
echo x - s-07-2-2-0002a.vhdl
sed 's/^X//' >s-07-2-2-0002a.vhdl <<'*-*-END-of-s-07-2-2-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-2002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the relational operators <, <=, >, >= are defined for all scalar
X-- types and for all one-dimensional arrays whose elements are of a discrete
X-- type. Check for objects, function calls, literals, aggregates and
X-- concatenated sequences.
X-- cases:  (16)
X-- user-defined enumeration type -- objects, function calls, literals
X-- user-defined integer -- objects, function calls, literals
X-- user-defined physical -- objects, function calls, literals
X-- user-defined floating point -- objects, function calls, literals
X-- array -- objects, function calls, aggregates, concatenated sequences
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
X
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X	type NEW_INTEGER is range integer'LEFT to integer'RIGHT;
X	type PHYS is range 1 to 260
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X		end units;
X	type NEW_REAL is range real'LEFT to real'RIGHT;
X	type UN_INT_ARRAY is array ( ENUM range <> ) of NEW_INTEGER;
X	type INT_ARRAY is  array ( ENUM range ONE to TWO ) of NEW_INTEGER;
X	type UN_B_ARRAY is array ( boolean range <> ) of boolean;
X	type CHAR_ARRAY is array ( ENUM ) of character;
X
X	function F_ENUM(i : integer) return ENUM is
X	begin	return ONE;
X	end F_ENUM;
X
X	function F_INT(i : integer) return NEW_INTEGER is
X	begin	return 0;
X	end F_INT;
X
X	function F_PHYS(i : integer) return PHYS is
X	begin	return 5 A;
X	end F_PHYS;
X
X	function F_REAL(i : integer) return NEW_REAL is
X	begin	return 1.0;
X	end F_REAL;
X
X	function F_INT_ARRAY(i : integer) return INT_ARRAY is
X	begin	return (others=>1);
X  	end F_INT_ARRAY;
X
X	function F_CHAR_ARRAY(i : integer) return CHAR_ARRAY is
X	begin	return ( 'a', 'b', 'c', 'd', 'e' );
X	end F_CHAR_ARRAY;
X
Xend TYPES_PACKAGE;
X
X
X
X-- with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all ;
Xentity E  is
Xgeneric (	G : boolean ;
X		G_ENUM : ENUM;
X		G_INT : NEW_INTEGER;
X		G_PHYS : PHYS;
X		G_REAL : NEW_REAL;
X		G_INT_ARRAY : INT_ARRAY;
X         	G_CHAR_ARRAY : CHAR_ARRAY ) ;
X    port (	PT_B1 : in boolean ;
X		PT_B2 : out boolean; 
X		PT_ENUM : in ENUM;
X		PT_INT : in NEW_INTEGER;
X		PT_PHYS : in PHYS;
X		PT_REAL : in NEW_REAL;
X		PT_INT_ARRAY : in INT_ARRAY;
X		PT_CHAR_ARRAY : in CHAR_ARRAY ) ;
Xbegin -- 1076
X                assert 10 A >= 1 B;
Xend;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype ALWAYS_TRUE is boolean range TRUE to TRUE;
X	variable V : boolean := G;
X  begin
X	if (PT_REAL < F_REAL(3)) then
X	    if ( UN_INT_ARRAY'(PT_INT_ARRAY(ONE) & NEW_INTEGER'(2))
X                      <= UN_INT_ARRAY'(F_INT(4) & NEW_INTEGER'(4) )) then
X		  V := (F_INT_ARRAY(4) >= INT_ARRAY'(1,2) );
X            end if;
X	end if;
X	for B in (F_CHAR_ARRAY(6) = CHAR_ARRAY ' (' ',' ',' ',' ',' '))
X                                   to TRUE loop
X		next when (PT_INT_ARRAY <= F_INT_ARRAY(7));
X	end loop;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X-- with package TYPES_PACKAGE; 
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
Xfunction F ( PR : boolean := (1.0 > 1.0); 
X	     PR2 : INT_ARRAY;
X	     PR3 : CHAR_ARRAY;
X	     PR4 : PHYS ) return boolean is
X	attribute A of all : function is boolean ; -- 1076
X	variable V : boolean;
X	subtype TRUE_ARRAY is UN_B_ARRAY ( TRUE to TRUE );
Xbegin
X	V := (PR2 <= INT_ARRAY'(1,1));
X	if (PR4 > F_PHYS(4)) then
X		V := (PR2(TWO) < F_INT(5));
X	end if;
X	while (F_REAL(9) <= 1.0) loop
X		exit when (PR4 >= F_PHYS(5));
X	end loop;
X        assert (PR2 >= INT_ARRAY'(1,2));
X	return (F_ENUM(110) > THREE);
Xend F;
Xend TYPES_PACKAGE ;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : boolean ;
X	signal S2 : boolean ;
X	component C port( PT1 : in boolean;
X		 	  PT2 : out boolean ) ;
X	end component ;
X--	generic ( G : boolean ); -- 1076 - deleted - unused
Xbegin
X	if (G_CHAR_ARRAY >= " 15g ") generate
XL_X_3:          block
X          begin
X           process
X           begin
X		case (F_CHAR_ARRAY(16) > G_CHAR_ARRAY) is
X			when TRUE =>	S <= TRUE;
X			when FALSE =>	S <= FALSE;
X		end case;
X           end process;
X          end block;
X	end generate;
X        process
X        begin
X	    for I in (F_ENUM(6) >= G_ENUM) to TRUE loop
X		S2 <= (G_PHYS > 1 A);
X            end loop;
X        end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-0002a.vhdl-*-*
echo x - s-07-2-2-0003a.vhdl
sed 's/^X//' >s-07-2-2-0003a.vhdl <<'*-*-END-of-s-07-2-2-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-2003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an expression formed with a relational operator is of type
X-- BOOLEAN.
X-- DB 7/19/85
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage TYPES_PACKAGE is
X	subtype ALWAYS_TRUE is BOOLEAN range TRUE to TRUE;
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X	type NEW_INTEGER is range INTEGER'LEFT to INTEGER'RIGHT;
X	type PHYS is range 1 to 250
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X		end units;
X	type NEW_REAL is range REAL'LEFT to REAL'RIGHT;
X	type UN_INT_ARRAY is array ( ENUM range <>) of NEW_INTEGER;
X	subtype INT_ARRAY is UN_INT_ARRAY( ONE to TWO );
X	type int_array2 is array(one to three) of NEW_INTEGER;
X	type UN_B_ARRAY is array ( BOOLEAN range <> ) of BOOLEAN;
X	type CHAR_RECORD is record
X			C1, C2, C3 : CHARACTER;
X		end record;
Xend TYPES_PACKAGE;
X
X-- with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all;
Xentity E  is
X    port (	PT_IN_1, PT_IN_2, PT_IN_3 : in ALWAYS_TRUE;
X		PT_OUT_1, PT_OUT_2, PT_OUT_3 : out BOOLEAN ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X    PT_OUT_3 <= ( 0 <= 0) ;       -- check "<=" with integer literal
X--  end block;
Xend BB;
X
X-- with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
Xfunction F ( PR_1, PR_2, PR_3 : ALWAYS_TRUE ) return boolean is
X	variable TEMP : BOOLEAN := ONE < TWO;
X                                -- check "<" with enumeration literal
X        constant CON : BOOLEAN := 1 B <= 9 A;
X                                -- check "<=" with physical literal
Xbegin
X     TEMP := 32767.0 >= -1.0e2; -- check ">=" with real literal
X     return INT_ARRAY'(1,2) = INT_ARRAY'(1,2);
X                                -- check "=" with qualified array aggregate
Xend F;
Xend TYPES_PACKAGE ;
X
Xarchitecture AB of E is
X-- L_X_2: block
X   signal S : BOOLEAN;
X begin
X  process
X    variable BOOL : BOOLEAN;
X  begin
X    BOOL := INT_ARRAY2'(50,100,100) < INT_ARRAY2'(50,100,101);
X                                -- check "<" with qualified array aggregate
X    S <= CHAR_RECORD ' ('a','b','c') /= CHAR_RECORD ' ('b','c','a');
X                                -- check "/=" with qualified record aggregate
X  end process; 
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-0003a.vhdl-*-*
echo x - s-07-2-2-0004a.vhdl
sed 's/^X//' >s-07-2-2-0004a.vhdl <<'*-*-END-of-s-07-2-2-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-2004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a static expression formed with a relation operator has the
X-- correct static value.
X-- cases:
X-- All relational operators ( =, /=, <, <=, >, >=) with literals/aggregates 
X-- of all types used in S6212001A ( enumeration type, integer, physical, 
X-- floating point, array, and record type )
X-- contexts in which subtype checking is performed at analysis time:
X-- 1) range constraint in a subtype declaration -- this cannot be used here
X--	since the user cannot define a new boolean type 
X--	(e.g. to be always TRUE).
X-- 2) choices in a case statement
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
X
X
Xpackage TYPES_PACKAGE is
X
X	subtype ALWAYS_TRUE is boolean range TRUE to TRUE;
X
X	type ENUM is ( ONE, TWO, THREE, FOUR, FIVE );
X	type NEW_INTEGER is range integer'left to integer'right ;
X	type PHYS is range 1 to 1000
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X		end units;
X	type NEW_REAL is range real'left to real'right;
X	type UN_INT_ARRAY is array ( ENUM range <>) of NEW_INTEGER;
X	subtype INT_ARRAY is UN_INT_ARRAY( ONE to TWO );
X	type UN_B_ARRAY is array ( boolean range <> ) of boolean;
X	type CHAR_RECORD is record
X			C1, C2, C3 : CHARACTER;
X		end record;
X
Xend TYPES_PACKAGE;
X
X
X
X--with package TYPES_PACKAGE;  
Xuse TYPES_PACKAGE.all ;
Xentity E  is
X    port (	PT_IN_1, PT_IN_2, PT_IN_3 : in ALWAYS_TRUE;
X		PT_OUT_1, PT_OUT_2, PT_OUT_3 : out boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	case PT_IN_1 is
X		when (ONE < TWO) => PT_OUT_1 <= TRUE;
X			-- check "<" with enumeration literal
X		when others =>	PT_OUT_1 <= FALSE;
X	end case;
X	case PT_IN_2 is
X		when (0 <= 0) => PT_OUT_2 <= TRUE;
X			-- check "<=" with integer literal
X		when others => PT_OUT_2 <= FALSE;
X	end case;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
X-- with package TYPES_PACKAGE; 
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
Xfunction F ( PR_1, PR_2, PR_3 : ALWAYS_TRUE ) return boolean is
X	variable TEMP : boolean;
Xbegin
X	case PR_1 is
X		when (1 B >= 9 A) => TEMP := TRUE;
X			-- check ">=" with physical literal
X		when others => TEMP := FALSE;
X	end case;
X	case PR_2 is
X		when (32767.0 > -1.0e2) => TEMP := TRUE;
X			-- check ">" with real literal
X		when others => TEMP := FALSE;
X	end case;
X	case PR_3 is
X		when TRUE =>
X			TEMP := (INT_ARRAY'(100,100) < INT_ARRAY'(100,101)) ;
X			-- check "<" with array aggregate
X		when others => TEMP := FALSE;
X	end case;
X	return TEMP;
X  end F;
Xend TYPES_PACKAGE ;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X 
X	signal S : boolean;
X begin
X  process
X  begin
X	case PT_IN_1 is
X		when TRUE =>
X			S <= (INT_ARRAY'(1,2) = INT_ARRAY'(1,2));
X			-- check "=" with array aggregate
X		when others => S <= FALSE;
X	end case;
X	case PT_IN_2 is
X		when TRUE =>
X			S <= (CHAR_RECORD ' ('a','b','c') /= 
X					CHAR_RECORD ' ('b','c','a'));
X			-- check "/=" with record aggregate
X		when others => S <= FALSE;
X	end case;
X        return;
X  end process; 
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-0004a.vhdl-*-*
echo x - s-07-2-2-2001a.vhdl
sed 's/^X//' >s-07-2-2-2001a.vhdl <<'*-*-END-of-s-07-2-2-2001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that both positional association and named association are legal.
X-- cases:  1x2 array, 2 element record
X-- contexts:  signal assignment
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 2);
X	signal S2 : RECORD_TYPE;
X	signal S3 : ARRAY_TYPE(1 to 2);
X	signal S4 : RECORD_TYPE;
X	signal S5 : ARRAY_TYPE(1 to 2);
X	signal S6 : RECORD_TYPE;
X begin
X  process
X  begin
X--	S1 <= (TRUE, 2 => TRUE); array aggregates may not have both
X--                               positional and named associations.
X          -- positional and named associations are legal.
X	S2 <= ( FALSE, E2 => TRUE);
X          -- positional and named associations are legal.
X	S3 <= (TRUE, TRUE);
X          -- positional and named associations are legal.
X	S4 <= ( FALSE, TRUE);
X          -- positional and named associations are legal.
X	S5 <= (1 => TRUE, 2 => TRUE);
X          -- positional and named associations are legal.
X	S6 <= ( E1 => FALSE, E2 => TRUE);
X          -- positional and named associations are legal.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2001a.vhdl-*-*
echo x - s-07-2-2-2002a.vhdl
sed 's/^X//' >s-07-2-2-2002a.vhdl <<'*-*-END-of-s-07-2-2-2002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that named associations may appear in any order with respect to
X-- each other
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3,E4,E5 : BOOLEAN;
X		end record;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 5);
X	signal S2 : RECORD_TYPE;
X	signal S3 : ARRAY_TYPE(1 to 5);
X	signal S4 : RECORD_TYPE;
X	signal S5 : ARRAY_TYPE(1 to 5);
X	signal S6 : RECORD_TYPE;
X begin
X  process
X  begin
X	S1 <= (5 => TRUE, 4 => TRUE, 3 => TRUE, 2 => TRUE, 1 => TRUE);
X          -- named associations may appear in any order.
X	S2 <= ( E5 => FALSE, E4 => TRUE, E3 => TRUE, E2 => TRUE, E1 => TRUE);
X          -- named associations may appear in any order.
X	S3 <= ( 5 => TRUE, 4|2 downto 1 => TRUE, 3 => TRUE);
X          -- named associations may appear in any order.
X	S4 <= ( E5 => FALSE, E4|E2|E1 => TRUE, E3 => FALSE);
X          -- named associations may appear in any order.
X	S5 <= (1 => TRUE, 2 => TRUE, 3 => TRUE, 4 => TRUE, 5 => TRUE);
X          -- named associations may appear in any order.
X	S6 <= ( E1 => FALSE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE);
X          -- named associations may appear in any order.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2002a.vhdl-*-*
echo x - s-07-2-2-2003a.vhdl
sed 's/^X//' >s-07-2-2-2003a.vhdl <<'*-*-END-of-s-07-2-2-2003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" association may be the only association.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3,E4,E5 : BOOLEAN;
X		end record;
X	type ARR_ARR_TYPE is array (INTEGER range <>) of ARRAY_TYPE(1 TO 5);
X	type REC_REC_TYPE is record
X			E1,E2,E3,E4,E5 : RECORD_TYPE;
X		end record;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 5);
X	signal S2 : RECORD_TYPE;
X	signal S3 : ARR_ARR_TYPE(1 to 5);
X	signal S4 : REC_REC_TYPE;
X begin
X  process
X  begin
X	S1 <= (others => FALSE);
X          -- others may be the only association
X	S2 <= (others => TRUE);
X          -- others may be the only association
X	S3 <= (others => (others => TRUE));
X          -- others may be the only association
X	S4 <= (others => (others => FALSE));
X          -- others may be the only association
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2003a.vhdl-*-*
echo x - s-07-2-2-2004a.vhdl
sed 's/^X//' >s-07-2-2-2004a.vhdl <<'*-*-END-of-s-07-2-2-2004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" association may occur in a record aggregate or 
X-- in an array aggregate.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3,E4,E5 : BOOLEAN;
X		end record;
X	type ARR_ARR_TYPE is array (INTEGER range <>) of ARRAY_TYPE(1 TO 5);
X	type REC_REC_TYPE is record
X			E1,E2,E3,E4,E5 : RECORD_TYPE;
X		end record;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 5);
X	signal S2 : RECORD_TYPE;
X	signal S3 : ARR_ARR_TYPE(1 to 5);
X	signal S4 : REC_REC_TYPE;
X	signal S5 : ARRAY_TYPE(1 to 5);
X	signal S6 : RECORD_TYPE;
X	signal S7 : ARR_ARR_TYPE(1 to 5);
X	signal S8 : REC_REC_TYPE;
X begin
X  process
X  begin
X	S1 <= (TRUE, TRUE, others => FALSE);
X          -- others may occur in an array aggregate or record aggregate.
X	S2 <= (TRUE, TRUE, others => TRUE);
X          -- others may occur in an array aggregate or record aggregate.
X	S3 <= ((others => FALSE), others => (others => TRUE));
X          -- others may occur in an array aggregate or record aggregate.
X	S4 <= ((others => FALSE), others => (others => TRUE));
X          -- others may occur in an array aggregate or record aggregate.
X	S5 <= (1|3|5 => TRUE, others => FALSE);
X          -- others may occur in an array aggregate or record aggregate.
X	S6 <= (E1|E3|E5 => TRUE, others => FALSE);
X          -- others may occur in an array aggregate or record aggregate.
X	S7 <= (1|3|5 => (others => FALSE), others => (others => TRUE));
X          -- others may occur in an array aggregate or record aggregate.
X	S8 <= (E1|E3|E5 => (others => FALSE), others => (others => TRUE));
X          -- others may occur in an array aggregate or record aggregate.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2004a.vhdl-*-*
echo x - s-07-2-2-2005a.vhdl
sed 's/^X//' >s-07-2-2-2005a.vhdl <<'*-*-END-of-s-07-2-2-2005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an identifier that could be either a simple expression or
X-- an element simple name can occur as the choice in an element 
X-- association in either a recored aggregate or an array aggregate.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X	type ARRAY_TYPE is array (INTEGER range <>) of BOOLEAN;
X	type RECORD_TYPE is record
X			E1,E2,E3,E4,E5 : BOOLEAN;
X		end record;
X	type ARR_ARR_TYPE is array (INTEGER range <>) of ARRAY_TYPE(1 TO 5);
X	type REC_REC_TYPE is record
X			E1,E2,E3,E4,E5 : RECORD_TYPE;
X		end record;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (P:BOOLEAN) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X	signal S1 : ARRAY_TYPE(1 to 5);
X	signal S2 : RECORD_TYPE;
X	signal S3 : ARR_ARR_TYPE(1 to 5);
X	signal S4 : REC_REC_TYPE;
X
X        constant C1 : INTEGER := 1;
X        constant C2 : INTEGER := 2;
X        constant C3 : INTEGER := 3;
X        constant C4 : INTEGER := 4;
X        constant C5 : INTEGER := 5;
X begin
X  process
X  begin
X    S1 <= (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE);
X          -- identifier can appear in array aggregate or record aggregate.
X    S2 <= (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE);
X          -- identifier can appear in array aggregate or record aggregate.
X    S3 <= (
X        C1 => (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE),
X        C2 => (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE),
X        C3 => (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE),
X        C4 => (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE),
X        C5 => (C1 => TRUE, C2 => TRUE, C3 => TRUE, C4 => TRUE, C5 => TRUE));
X          -- identifier can appear in array aggregate or record aggregate.
X    S4 <= (
X        E1 => (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE),
X        E2 => (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE),
X        E3 => (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE),
X        E4 => (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE),
X        E5 => (E1 => TRUE, E2 => TRUE, E3 => TRUE, E4 => TRUE, E5 => TRUE));
X          -- identifier can appear in array aggregate or record aggregate.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2005a.vhdl-*-*
echo x - s-07-2-2-2201a.vhdl
sed 's/^X//' >s-07-2-2-2201a.vhdl <<'*-*-END-of-s-07-2-2-2201a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2201A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a string literal or a bit string literal is allowed in a
X-- multi-dimensional aggregate at the place of a one-dimensional array of a
X-- character type.
X-- cases:  string literal and bit string literal, constrained and unconstrained
X--	arrays.
X-- contexts:
X-- 1) return statement of function;
X-- 2) subprogram parameters;
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	type A_CHAR_ARRAY is array ( integer range <>, integer range <> )
X		of character;
X
X	type B_CHAR_ARRAY is array ( integer range <>, integer range <> )
X		of bit;
X
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body P is
Xfunction F_A return A_CHAR_ARRAY is
Xbegin
X	return (1 => "n characters long",
X		2 => "n characters long" );
X	-- string literal in place of character array is legal.
X  end F_A;
Xend P ;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F_B(PAR : B_CHAR_ARRAY) return B_CHAR_ARRAY is
Xbegin
X	return ( 1 to 5 => "111111", 6 to 10 => "000111" );
X	-- string literal in place of bit array is legal.
X  end F_B;
Xend P ;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F_C return B_CHAR_ARRAY is
Xbegin
X	return (1 => O"777",
X		2 => B"000000000" );
X	-- bit string literal in place of bit array is legal.
X  end F_C;
Xend P ;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F_D (PAR : A_CHAR_ARRAY) return A_CHAR_ARRAY is
Xbegin
X	return ( 1 to 5 => "0000", 6 to 10 => "000Z" );
X	-- string literal in place of character array is legal.
X  end F_D;
Xend P ;
X
X
X-- with package P;  
Xuse P.all;
Xentity E1  is
X    port (	PT_A : A_CHAR_ARRAY ;
X		PT_B : B_CHAR_ARRAY ) ;
Xend E1;
X
X
X-- with function F_A,F_B,F_C,F_D;
Xuse P.F_A, P.F_B, P.F_C, P.F_D ;
Xarchitecture AA of E1 is
X--  B1: block
X  begin
X   process
X       variable A_ARR : A_CHAR_ARRAY(1 to 10, 1 to 4);
X       variable B_ARR : B_CHAR_ARRAY(1 to 10, 1 to 6);
X    begin
X       A_ARR := F_D((1=>"12345", 2 to 6 => "54322"));
X	-- string literal in place of character array is legal.
X       B_ARR := F_B((1|5|7 => X"12345", 2 to 4 | 6 => X"54322"));
X	-- bit string literal in place of bit array is legal.
X    end process;
X--   end block;
Xend AA;
*-*-END-of-s-07-2-2-2201a.vhdl-*-*
echo x - s-07-2-2-2202a.vhdl
sed 's/^X//' >s-07-2-2-2202a.vhdl <<'*-*-END-of-s-07-2-2-2202a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2202A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an aggregate that has a single element association having a 
X-- single choice may have a nonstatic choice.
X-- DB (7/24/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type NEW_INT is range 1 to 10;
X	type ARR is array ( NEW_INT'LEFT to NEW_INT'RIGHT ) of INTEGER;
X
X	function F( A : NEW_INT ) return ARR is
X	  variable V : ARR;
X	begin
X                return V; 
X--		return ( ARR'range=>1);
X	end F;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E           is
X    generic ( A  :       NEW_INT) ;
X    port ( PT : inout ARR) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	PT <= ( ARR'LEFT to ARR'RIGHT => 1 ) ;
X	-- nonstatic choice in array aggregate.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-2-2202a.vhdl-*-*
echo x - s-07-2-2-2203a.vhdl
sed 's/^X//' >s-07-2-2-2203a.vhdl <<'*-*-END-of-s-07-2-2-2203a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2203A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is an actual
X-- parameter associated with a formal parameter of a constrained array subtype.
X-- cases:
X-- 1) "others" as only choice;
X-- 2) "others" not only choice.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10 );
X
X	function F ( A : CONSTRAINED_ARRAY ) return CONSTRAINED_ARRAY is
X	begin
X		return A;
X	end F;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F2 ( B : BOOLEAN ) return CONSTRAINED_ARRAY is
Xbegin
X	if B then
X		return F( ( others => 'c' ) );
X		-- sole "others" choice is legal.
X	else
X		return F( ( 'a','b', others => 'c' ) );
X		-- "others" choice is legal.
X	end if;
X  end F2;
Xend P ;
*-*-END-of-s-07-2-2-2203a.vhdl-*-*
echo x - s-07-2-2-2204a.vhdl
sed 's/^X//' >s-07-2-2-2204a.vhdl <<'*-*-END-of-s-07-2-2-2204a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2204A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is the result
X-- expression of a function, where the corresponding function result type is a
X-- constrained array subtype.
X-- PS  7/21/84
X-- DB 7/24/85
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of CHARACTER;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10 );
X	function F ( A : CONSTRAINED_ARRAY ) return CONSTRAINED_ARRAY is
X	begin
X		if A(1)='X' then
X			return ( others => 'c'  );
X			-- sole "others" choice is legal.
X		else
X			return ( 'a','b', others => 'c' );
X			-- "others" choice is legal.
X		end if;
X	end F;
X
Xend P;
*-*-END-of-s-07-2-2-2204a.vhdl-*-*
echo x - s-07-2-2-2205a.vhdl
sed 's/^X//' >s-07-2-2-2205a.vhdl <<'*-*-END-of-s-07-2-2-2205a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2205A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is the expression
X-- on the right hand side of a variable assignment statement, and the name on
X-- the left hand side is of a constrained array subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10 );
X
X	function F_CHAR return character is
X	begin
X		return ' ';
X	end F_CHAR;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : CONSTRAINED_ARRAY ; 
X	-- check in declaration of constrained array variable.
X  begin
X	V := ( 'd', 'x', others => F_CHAR );
X	-- check in variable assignment to constrained array object.
X	V := ( others => '$' );
X	-- check in variable assignment to constrained array object.
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-2-2205a.vhdl-*-*
echo x - s-07-2-2-2206a.vhdl
sed 's/^X//' >s-07-2-2-2206a.vhdl <<'*-*-END-of-s-07-2-2-2206a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2206A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is one of the 
X-- value expressions on the right hand side of a signal assignment statement, 
X-- and the names on the left hand side are all of the same constrained array 
X-- subtype.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10 );
X
X	function F_CHAR return character is
X	begin
X		return 'a';
X	end F_CHAR;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT1, PT2 : out CONSTRAINED_ARRAY ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	PT1 <= ( 'd', 'x', others => F_CHAR );
X	-- check in signal assignment to constrained array object.
X	PT2 <= ( others => '$' );
X	-- check in signal assignment to constrained array object.
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : CONSTRAINED_ARRAY;
X begin
X  process
X  begin
X--	S, PT1  <= ( 'd', 'x', others => F_CHAR ); -- 7.2
X	(S, PT1)  <= ( 'd', 'x', others => F_CHAR ); -- 1076
X	-- check in signal assignment to constrained array object.
X--	S, PT2 <= ( others => '$' ); -- 7.2
X	(S, PT2) <= ( others => '$' ); -- 1076
X	-- check in signal assignment to constrained array object.
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2206a.vhdl-*-*
echo x - s-07-2-2-2207a.vhdl
sed 's/^X//' >s-07-2-2-2207a.vhdl <<'*-*-END-of-s-07-2-2-2207a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2207A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is the operand of
X-- a qualified expression whose type mark denotes a constrained array type.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:
X-- 1) parameter specification;
X-- 2) return statement in function;
X-- 3) port declaration;
X-- 4) signal assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10 );
X
X	function F ( A : UNCONSTRAINED_ARRAY )
X	return CONSTRAINED_ARRAY is
X	begin
X		return CONSTRAINED_ARRAY'(others => '7');
X		-- check in function return statement.
X	end F;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E   is
X    port (PT : out CONSTRAINED_ARRAY ) ;
X	-- check in port declaration.
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X  begin
X	PT <= F( CONSTRAINED_ARRAY'(( 2 => 'h', others => 'u')) );
X	-- check in signal assignment.
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-2-2207a.vhdl-*-*
echo x - s-07-2-2-2208a.vhdl
sed 's/^X//' >s-07-2-2-2208a.vhdl <<'*-*-END-of-s-07-2-2-2208a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-2208A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an "others" choice is allowed if the aggregate is a subaggregate
X-- of a multi-dimensional aggregate, and an "others" choice would be allowed
X-- for this multi-dimensional aggregate in this context.
X-- cases:
X-- 1) "others" is only choice;
X-- 2) "others" is not only choice.
X-- contexts:  those of all "others" cases above.
X-- 1) actual parameter associated with a formal parameter of
X--	a constrained array subtype.
X-- 2) return statement in a function whose return type is a constrained
X--	array subtype.
X-- 3) variable assignment to an object of constrained array subtype.
X-- 4) signal assignment to an object of constrained array subtype.
X-- 5) qualified expression whose type mark denotes a constrained array subtype.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type UNCONSTRAINED_ARRAY is array 
X		( integer range <>, integer range <> ) of character;
X	subtype CONSTRAINED_ARRAY is UNCONSTRAINED_ARRAY ( 1 to 10, 1 to 2 );
X
X	function F_CHAR return character is
X	begin
X		return ' ';
X	end F_CHAR;
X
X	function F ( A : CONSTRAINED_ARRAY ) return CONSTRAINED_ARRAY is
X	begin
X		return ( 1 to 10 => (others => ' ') , 
X                         others  => (others => 'A'));
X		-- context 2
X	end F;
X
X	function F1 ( A : UNCONSTRAINED_ARRAY ) 
X		return UNCONSTRAINED_ARRAY is
X	begin
X		return CONSTRAINED_ARRAY'((others => (others => '7')));
X		-- context 5
X	end F1;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xpackage body P is
Xfunction F2 ( B : BOOLEAN ) return CONSTRAINED_ARRAY is
Xbegin
X	return F( ( others => ( others => 'c' ) ) );
X	-- context 1
X  end F2;
Xend P ;
X
X-- with package P;  
Xuse P.all;
Xentity E   is
X    port ( PT : out CONSTRAINED_ARRAY ;
X	   PT1 : in CONSTRAINED_ARRAY ;
X	   PT1a : out CONSTRAINED_ARRAY ;
X	   PT2a : out CONSTRAINED_ARRAY ;
X	   PT2 : in CONSTRAINED_ARRAY ) ;
X	-- context 5
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V : CONSTRAINED_ARRAY ;
X	--  context 3
X  begin
X	V := ( 1 to 10 => ('d', 'x', others => F_CHAR ),
X	       others => ( others => F_CHAR ));
X	-- context 3
X	V := ( 1 to 10 => (others => '$') ,others => (others => '@'));
X	-- context 3
X
X	PT1a  <= CONSTRAINED_ARRAY'( 
X		( others => ( 'd', 'x', others => F_CHAR )) );
X	-- context 5
X	PT2a <= ( 1 => ( others => '$' ), others => ( others => 'b' ) );
X	-- context 4
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S : CONSTRAINED_ARRAY;
X begin
X  process
X  begin
X	(S, PT1a) <= ( others => ( 'd', 'x', others => F_CHAR ) );
X	-- context 4
X	(S, PT2a) <= ( 1 => ( others => '$' ), others => ( others => 'b' ) );
X	-- context 4  
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-2-2208a.vhdl-*-*
echo x - s-07-2-2-3001a.vhdl
sed 's/^X//' >s-07-2-2-3001a.vhdl <<'*-*-END-of-s-07-2-2-3001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the result of a function call is of the type specified in
X-- the definition of the function. Check for error_free cases here.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X  type ENUM is (E1, E2, E3, E4, E5);
X  type NEW_INT is range 1 to 20;
X  type NEW_REAL is range 1.0 to 20.0;
X  type ARR is array ( 1 to 10 ) of BOOLEAN;
X  type REC is record
X             RE1 : NEW_INT;
X             RE2 : NEW_REAL;
X        end record;
X
X  function F1 ( A : NEW_INT ) return NEW_INT is
X  begin
X    return A;
X  end F1;
X
X  function F2 ( A : NEW_REAL ) return NEW_REAL is
X  begin
X    return A;
X  end F2;
X
X  function F3 ( A : TIME ) return TIME is
X  begin
X    return A;
X  end F3;
X
X  function F4 ( A : ARR ) return ARR is
X  begin
X    return A;
X  end F4;
X
X  function F5 ( A : REC ) return REC is
X  begin
X    return A;
X  end F5;
X
X  function F6 ( A : ENUM ) return ENUM is
X  begin
X    return A;
X  end F6;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E is
Xend E;
X
Xarchitecture AB of E is
X--   BB : block
X    signal S1 : NEW_INT;
X    signal S2 : NEW_REAL;
X    signal S3 : TIME;
X    signal S4 : ARR;
X    signal S5 : REC;
X    signal S6 : ENUM;
X  begin
X    S1 <= F1 ( 9 ) ;
X    S2 <= F2 ( 9.0 );
X    S3 <= F3 ( 1 ns );
X    S4 <= F4 ( (others => TRUE) );
X    S5 <= F5 ( (9, 9.0) );
X    S6 <= F6 ( E1 );
X--   end block;
Xend AB;
*-*-END-of-s-07-2-2-3001a.vhdl-*-*
echo x - s-07-2-2-3002a.vhdl
sed 's/^X//' >s-07-2-2-3002a.vhdl <<'*-*-END-of-s-07-2-2-3002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-2-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a function call without an actual parameter part is
X-- permitted (for functions with no formal parameters or functions whose
X-- formal parameters all have default values).  As a special case, check
X-- when the prefix of an indexed name is a function call with no actual
X-- parameter part.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X  type ENUM is (E1, E2, E3, E4, E5);
X  type NEW_INT is range 1 to 20;
X  type NEW_REAL is range 1.0 to 20.0;
X  type ARR is array ( 1 to 10 ) of BOOLEAN;
X  type REC is record
X             RE1 : NEW_INT;
X             RE2 : NEW_REAL;
X        end record;
X
X  function F1 ( A : NEW_INT := 9 ) return NEW_INT is
X  begin
X    return A;
X  end F1;
X
X  function F2 return NEW_REAL is
X  begin
X    return 9.0;
X  end F2;
X
X  function F3 ( A : TIME := 9 ns ) return TIME is
X  begin
X    return A;
X  end F3;
X
X  function F4 return ARR is
X  begin
X    return (others => TRUE);
X  end F4;
X
X  function F5 return REC is
X  begin
X    return (9, 9.0);
X  end F5;
X
X  function F6 ( A : ENUM := E4) return ENUM is
X  begin
X    return A;
X  end F6;
Xend P;
X
X-- with package P; 
Xuse P.all;
Xentity E is
Xend E;
X
Xarchitecture AB of E is
X--   BB : block
X    signal S1 : NEW_INT;
X    signal S2 : NEW_REAL;
X    signal S3 : TIME;
X    signal S4 : ARR;
X    signal S5 : REC;
X    signal S6 : ENUM;
X    signal S7 : NEW_INT;
X    signal S8 : BOOLEAN;
X    signal S11 : NEW_INT;
X    signal S12 : NEW_REAL;
X    signal S13 : TIME;
X    signal S14 : ARR;
X    signal S15 : REC;
X    signal S16 : ENUM;
X    signal S17 : NEW_INT;
X    signal S18 : BOOLEAN;
X  begin
X    S1 <= F1;
X       -- function call without an actual parameter.
X    S2 <= F2;
X       -- function call without an actual parameter.
X    S3 <= F3;
X       -- function call without an actual parameter.
X    S4 <= F4;
X       -- function call without an actual parameter.
X    S5 <= F5;
X       -- function call without an actual parameter.
X    S6 <= F6;
X       -- function call without an actual parameter.
X    S7 <= F5.RE1; --special case
X       -- function call without an actual parameter.
X    S8 <= F4(1); --special case
X       -- function call without an actual parameter.
X
X    S11 <= p.F1;
X       -- function call without an actual parameter.
X    S12 <= p.F2;
X       -- function call without an actual parameter.
X    S13 <= p.F3;
X       -- function call without an actual parameter.
X    S14 <= p.F4;
X       -- function call without an actual parameter.
X    S15 <= p.F5;
X       -- function call without an actual parameter.
X    S16 <= p.F6;
X       -- function call without an actual parameter.
X    S17 <= p.F5.RE1; --special case
X       -- function call without an actual parameter.
X    S18 <= p.F4(1); --special case
X       -- function call without an actual parameter.
X
X--   end block;
Xend AB;
*-*-END-of-s-07-2-2-3002a.vhdl-*-*
echo x - s-07-2-3-0001a.vhdl
sed 's/^X//' >s-07-2-3-0001a.vhdl <<'*-*-END-of-s-07-2-3-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-3001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary arithmetic operators + and - are defined for all
X-- numeric types and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a formal generic list;
X-- 2) assertion definition in an interface description;
X-- 3) default value in a parameter specification;
X-- 4) default value in a variable declaration;
X-- 5) range constraint in a integer type definition;
X-- 6) choice in an aggregate;
X-- 7) expression in an aggregate;
X-- 8) index constraint in a constrained array definition;
X-- 9) generate parameter specification in a for generate statement;
X-- 10) return statement in function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type PHYS is range -10000 to 10000
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X			D = 10 C;
X		end units;
X
X	function F_INT ( A : integer ) return integer is
X	begin
X		return A + A;
X		-- check "+"  with integer object in function return statement.
X	end F_INT;
X
X	function F_REAL ( A : real ) return real is
X	begin
X		return A - A;
X		-- check "-"  with real object in function return statement.
X	end F_REAL;
X
X	function F_PHYS ( A : PHYS ) return PHYS is
X	begin
X		return A + A - A;
X		-- check "+","-"  with physical object in function return statement.
X	end F_PHYS;
X
X	function to_integer (r : real )return integer is
X	begin
X		return 1 ;
X	end to_integer;
X
X
Xend P;
X
X-- with package p; 
Xuse p.all;
Xpackage body P is
Xfunction F ( A : real := 1.0 - 2.0 ) return real is
X	-- check "-" with real functions in parameter specification.
Xbegin
X	return (F_REAL(1.0) - F_REAL(2.0));
X  end F;
Xend P ;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
Xgeneric (	G_INT : integer := 1 + 2;
X 		G2_INT : integer ;
X		-- check "+" with integer literals in generic list.
X		G_PHYS : PHYS := -10 B - 15 C;
X		-- check "-" with physical literals in generic list.
X		G_REAL : real := 10.18 + 54.17 ) ;
X    port ( PT_INT : integer;  PT_PHYS : PHYS;  PT_REAL : real ) ;
X
X		-- check "+" with real literals in generic list.
X
X	type NEW_INT is range INTEGER'LOW to INTEGER'HIGH;
X	type AR is array (( G_INT + 6) to G2_INT ) of bit;
X	-- check "+" with integer object in type definition.
Xbegin
Xassert
X	G_INT - 1 > 0;
X	-- check "-" with integer object in assertion.
Xassert
X	10 A + G_PHYS >= -5 C;
X	-- check "+" with physical object in assertion.
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable V_INT : integer := 1 + G_INT - F_INT(G_INT);
X	-- check with integer literal, object, function in variable declaration.
X	variable V_REAL : real := -1.0 - G_REAL + F_REAL(G_REAL);
X	-- check with real literal, object, function in variable declaration.
X
X	type NEW_ARRAY is array ( 1 to (G_INT + 5) ) of PHYS;
X	-- check "+" with integer object in constrained array definition.
X	variable V_ARRAY : NEW_ARRAY;
X  begin
X	V_ARRAY := ( 1 to (2+3)
X		-- check "+" with integer literal in aggregate choice.
X				=> G_PHYS - F_PHYS(1 A));
X		-- check "-" with physical object and function in expression.
X	V_ARRAY := ( others => 10 A - 5 C );
X		-- check "-" with physical literals in expression.
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	signal S_INT : integer;
X begin
X 
X	for ID in 0 to ( 1 - G_INT) generate
X		-- check "-" with integer object, literal in generate statement.
X		S_INT <= F_INT( G_INT + 2 ) + F_INT (ID - 3);
X		-- check in signal assignment statement.
X	end generate;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-3-0001a.vhdl-*-*
echo x - s-07-2-3-0002a.vhdl
sed 's/^X//' >s-07-2-3-0002a.vhdl <<'*-*-END-of-s-07-2-3-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-3002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the concatenation operator & is defined for two 
X-- one_dimensional array operands that have the same type, or for two 
X-- nonarray operands that have the same type, or for one one_dimensional array
X-- operand and one nonarray operand where the nonarray operand is of the same 
X-- type as the array element. Check for objects, literals, aggregates, 
X-- function calls. 
X-- cases:  Three operand cases; for array objects, aggregates, and function
X--	results; for element objects, literals, and function results.
X-- contexts:
X-- 1) function return statement;
X-- 2) variable declaration;
X-- 3) signal assignment.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type enum is (one, two);
X	type ARR is array ( enum range <> ) of integer;
X	subtype S_ARR is ARR ( one to one);
X	subtype S2_ARR is ARR ( two to two);
X	subtype S3_ARR is ARR ( one to two);
X
X	function F_S return S_ARR is
X	begin
X		return (one => 1 );
X	end F_S;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xpackage body  P is
Xfunction F ( A : S_ARR ) return ARR is
Xbegin
X	return F_S & A;		-- context 1
X			 -- array object & array object
Xend F;
Xend P ;
X
X-- with function F;
X-- with package P;  
Xuse P.F;
Xentity E  is
X    port (PT: out ARR) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	constant C : integer := 1;
X	variable SA :S3_ARR := C & 0;	-- context 2
X				-- element type & element type
X	variable SB :S3_ARR := 0 & C;	-- context 2
X				-- element type & element type
X	variable SC :S3_ARR := 1 & 0;	-- context 2
X				-- element type & element type
X	variable V : integer;
X begin
X	PT <= F_S & C;		-- context 3
X				-- array object & array element
X
X	if S_ARR'(one=>4) & S2_ARR'(two => 6) = F(S_ARR'(one =>SA(one))) then
X				-- array object & array object
X		V := 6;
X	end if;	
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-3-0002a.vhdl-*-*
echo x - s-07-2-3-0003a.vhdl
sed 's/^X//' >s-07-2-3-0003a.vhdl <<'*-*-END-of-s-07-2-3-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-3003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the unary arithmetic operators +, -, and abs are defined for any
X-- numeric type and that the type of the result is the same as the type of the
X-- single operand. Check for objects, literals, function calls.
X-- assumption:  type checking done automatically in all contexts.
X-- cases:  integer, user-defined physical, real;
X--	objects, literals, function calls for each.
X-- contexts:
X-- 1) default value in a port declaration;
X-- 2) assertion definition in a body;
X-- 3) default value in a signal declaration;
X-- 4) range constraint in a physical type definition;
X-- 5) range constraint in a floating point subtype declaration;
X-- 6) choice in a case statement;
X-- 7) expression in a case statement;
X-- 8) time expression in a signal assignment statement;
X-- 9) return statement in a function.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
X
Xuse P.all ;
Xpackage body P is
X
X	type PHYS is range -10e3 to +10e3
X		-- check "+" and "-" with integer literal
X		--	in physical type definition
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X			D = 10 C;
X		end units;
X
X	function F_INT ( A : integer ) return integer is
X	begin
X		return - A;
X		-- check "-" with integer object in function return statement.
X	end F_INT;
X
X	function F_REAL ( A : real ) return real is
X	begin
X		return abs A;
X		-- check "abs" with real object in function return statement.
X	end F_REAL;
X
X	function F_PHYS ( A : PHYS ) return PHYS is
X	begin
X		return - 5 B;
X-- 		-- check "-" with physical literal in function return statement.
X	end F_PHYS;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    generic ( G : PHYS ) ;
X    port  (	PT_INT : integer := - 100;
X	-- check "-" with integer literal in port declaration.
X		PT_REAL : real := - 5.0 ) ;
X	-- check "-" with real literal in port declaration.
X
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	subtype FLOAT is real range - 32767.0  to  + F_REAL( -32767.0 );
X	-- check "-" with real literal, "+" with real function
X	-- in floating point subtype declaration.
X  begin
X	case abs F_INT(PT_INT) is
X		-- check "abs" with integer function in case expression.
X		when + 1 => null;
X		when abs (-2) => null;
X		when others => null;
X	end case;
X	return;
X	-- check "-" with physical literal in body assertion.
X  end process;
X--  end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X        constant G_PHYS : PHYS := B;
X	signal S_REAL : real range + 1.0 to 2.0;
X	-- check "+" with real literal in signal declaration.
X	signal S_PHYS : PHYS range  abs F_PHYS(B) to F_PHYS(B);
X	-- check "abs" with physical object in signal declaration.
X begin
X  process
X  begin
X	S_REAL <= abs F_REAL(1.0) after + 5 s;
X	-- check "abs" with real function in signal assignment;
X	-- check "+" with physical literal in time expression;
X        if + F_PHYS(B) = - B then
X		-- check "+" with physical function in case expression.
X		-- check "-" with physical object in choice.
X			S_PHYS <= abs F_PHYS(B);
X			-- check "abs" with physical function in signal assgn.
X	else
X			S_PHYS <= - G_PHYS;
X			-- check "-" with physical object in signal assgn.
X	end if;
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-3-0003a.vhdl-*-*
echo x - s-07-2-3-0004a.vhdl
sed 's/^X//' >s-07-2-3-0004a.vhdl <<'*-*-END-of-s-07-2-3-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-3004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that static expressions formed with + and - have the correct static
X-- value.
X-- cases:  integer, user-defined physical, real; literals only.
X-- contexts:
X-- 1) choices in case statements.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X
X	subtype ALWAYS_TRUE is boolean range TRUE to TRUE;
X	type PHYS is range -1e10 to +1e10
X		units
X			A;
X			B = 10 A;
X			C = 10 B;
X			D = 10 C;
X		end units;
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port (	PT_IN_1, PT_IN_2, PT_IN_3 : in ALWAYS_TRUE;
X		PT_OUT_1, PT_OUT_2, PT_OUT_3 : out boolean ) ;
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin 
X  process
X  begin
X	case PT_IN_1 is
X		when (1 + 2 = 3) => PT_OUT_1 <= TRUE;
X-- 			-- check "+" with integer literals
X		when others =>	PT_OUT_1 <= FALSE;
X	end case;
X	return;
X  end process;
X--  end block;
Xend BB;
X
X
X-- with package P; 
Xuse P.all;
Xpackage body  P is
Xfunction F ( PR_1, PR_2, PR_3 : ALWAYS_TRUE ) return boolean is
X	variable TEMP : boolean;
Xbegin
X	case PR_1 is
X		when (-32.0 + 1.0 < -30.0) => TEMP := TRUE;
X			-- check "+" with real literals
X		when others => TEMP := FALSE;
X	end case;
X	return TEMP;
X  end F;
Xend P ;
X
X
XArchitecture Ab of E is
X-- L_X_2: block
X
X	signal S : boolean;
X begin
X  process
X  begin
X	case PT_IN_1 is
X		when (1 B - 5 A = 5 A ) => S <= TRUE;
X			-- check "-" with physical literals
X		when others => S <= FALSE;
X	end case;
X  end process;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-3-0004a.vhdl-*-*
echo x - s-07-2-4-0001a.vhdl
sed 's/^X//' >s-07-2-4-0001a.vhdl <<'*-*-END-of-s-07-2-4-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the binary arithmetic operators mod and rem are defined for any
X-- integer type and that the type of the result is the same as the type of the
X-- operands. Check for objects, literals, function calls.
X-- JB  (DB  9/5/85)
X-- cases:  predefined and user-defined integer types.
X-- contexts:
X-- 1) range constraint in a physical type definition;
X-- 2) index constraint in a constrained array definition;
X-- 3) choice in a case statement;
X-- 4) generate parameter specification in a for generate statement;
X-- 5) waveform element in a signal assignment statement;
X-- 6) actual parameter association.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	type NEW_INTEGER is range INTEGER'LOW to INTEGER'HIGH;
X
X	type PHYS is range 1 to ( (10e18 + 1e2) mod 1e16 )
X		-- check in physical type definition
X		units
X			A;
X			B = 100 A;
X		end units;
X
X	type PHYS_2 is range 1 to ( (10e18 + 1e2) rem 1e16 )
X		-- check in physical type definition
X		units
X			A_2;
X			B_2 = 100 A_2;
X		end units;
X
X	function F_NEW ( A : NEW_INTEGER ) return NEW_INTEGER is
X	begin
X		return A;
X	end F_NEW;
X
X	function F_INT ( A : integer ) return integer is
X	begin
X		return A;
X	end F_INT;
X
Xend P;
X
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    generic ( G_INT : NEW_INTEGER ) ;
X    port ( PT_IN : in integer;  PT_OUT : out integer ) ;
X
Xend E;
X
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	type NEW_ARRAY is array ( 0 to (G_INT rem 10) ) of NEW_INTEGER;
X	type NEW_ARRAY_2 is array ( 0 to ( 10 rem G_INT ) ) of NEW_INTEGER;
X		-- check in constrained array definition.
X	variable V_NEW : NEW_INTEGER := 1000 mod F_NEW(27 rem 3);
X	variable V_NEW_2 : NEW_INTEGER := F_NEW(27 rem 3) mod 1000;
X	-- check in variable declarations.
X  begin
X	case PT_IN is
X		when 100 rem 10 => PT_OUT <= PT_IN;
X		-- check in case choice.
X		when others => PT_OUT <= 0;
X	end case;
X  end process;
X--  end block;
Xend BB;
X
X
Xarchitecture AB of E is
X-- L_X_2: block
X	component C port ( PT_IN : NEW_INTEGER; PT_OUT : integer );
X	end component ;
X        signal SIG : NEW_INTEGER;
X begin
X	for ID in 0 to (G_INT mod 3) generate
XL_X_3:             block
X             begin
X		SIG <= F_NEW(1) rem ID;
X		C_1: C port map ( SIG, PT_IN );
X		C_2: C port map ( PT_IN => SIG, PT_OUT => PT_IN );
X             end block;
X	end generate;
X--  end block;
Xend AB;
*-*-END-of-s-07-2-4-0001a.vhdl-*-*
echo x - s-07-2-4-0002a.vhdl
sed 's/^X//' >s-07-2-4-0002a.vhdl <<'*-*-END-of-s-07-2-4-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the operands of the binary arithmetic operators * and / may be
X-- both integer or both floating point, and that when the types of the operands
X-- are the same the type of the result is the same as the type of the operands.
X-- Check for objects, literals, function calls.
X-- cases:  objects, literals, function calls of re-defined integers and reals.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F ( A,B,C : INTEGER ) return INTEGER is
X	begin
X		return A * B / C;	-- context 1
X	end F;
X
X	function G ( A,B,C : REAL  ) return REAL is
X	begin
X		return A / B * C;	-- context 1
X	end G;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : REAL ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X	signal SS : REAL;
X begin
X  process
X	variable A,B : INTEGER := 11 * 2 / (-3) * F(1,2,3);	-- context 2
X	variable R,S : REAL := -8.0e10 / 2.0 * G(1.1,1.1,0.3); -- context 2
X  begin
X	A := F(B,A,1) / F(A,B,2) * 0 ;	-- context 3
X	R := G(R,S,-3.3) * G(S,R,R) / 27.0;		-- context 3
X
X	SS <= R / G(R,S,0.2);			-- context 4
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-4-0002a.vhdl-*-*
echo x - s-07-2-4-0003a.vhdl
sed 's/^X//' >s-07-2-4-0003a.vhdl <<'*-*-END-of-s-07-2-4-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that for the binary arithmetic operators * and /, the left
X-- operand may be any physical type and the right operand any integer
X-- type or any floating point type; check that in this case, the result
X-- is the same type as the left operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X        type PHYS is range 0 to 80000
X          units
X            PHYS1;
X            PHYS2 = 2 PHYS1;
X            PHYS10 = 10 PHYS1;
X            PHYS100 = 10 PHYS10;
X        end units;
X
X	function F ( A : TIME; B : REAL; C : INTEGER ) return TIME is
X	begin
X		return A * B / C;	-- context 1
X	end F;
X
X	function G ( A : PHYS; B : INTEGER; C : REAL ) return PHYS is
X	begin
X		return A / B * C;	-- context 1
X	end G;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : REAL ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X	signal SS : TIME;
X begin
X  process
X	variable A : TIME := 11 ns * 2 / (3.0) ;
X               -- context 2
X	variable B : PHYS := 11 PHYS1 * 2.0 / (3) ;
X               -- context 2
X	variable R : REAL := 7.9999;
X	variable S : INTEGER := 199;
X  begin
X	A := F(A,4.3,1) / 4.0 * 0 ;	-- context 3
X	B := G(B,4,1.3) / 4 * 0.0 ;	-- context 3
X
X	SS <= A * R / S;		-- context 4
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-4-0003a.vhdl-*-*
echo x - s-07-2-4-0004a.vhdl
sed 's/^X//' >s-07-2-4-0004a.vhdl <<'*-*-END-of-s-07-2-4-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that for the binary arithmetic operator *, the right operand
X-- may be any physical type and the left operand any integer type or any 
X-- floating point type; check that in this case, the result
X-- is the same type as the right operand. Check for objects, literals,
X-- and function calls.
X-- cases:  objects, literals, function calls 
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X        type PHYS is range 0 to 80000
X          units
X            PHYS1;
X            PHYS2 = 2 PHYS1;
X            PHYS10 = 10 PHYS1;
X            PHYS100 = 10 PHYS10;
X        end units;
X
X	function F ( A : TIME; B : REAL; C : INTEGER ) return TIME is
X	begin
X		return C * (B * A);	-- context 1
X	end F;
X
X	function G ( A : PHYS; B : INTEGER; C : REAL ) return PHYS is
X	begin
X		return C * (B * A);	-- context 1
X	end G;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : REAL ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X	signal SS : TIME;
X begin
X  process
X	variable A : TIME := 2 * (3.0 * 11 ns);
X               -- context 2
X	variable B : PHYS := 2.0 * (3 * 11 PHYS1);
X               -- context 2
X	variable R : REAL := 7.9999;
X	variable S : INTEGER := 199;
X  begin
X	A := 4.0 * (0 * F(A,4.3,1));	-- context 3
X	B := 4 * (0.0 * G(B,4,1.3));	-- context 3
X
X	SS <= R * ( S * A );		-- context 4
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-4-0004a.vhdl-*-*
echo x - s-07-2-4-0005a.vhdl
sed 's/^X//' >s-07-2-4-0005a.vhdl <<'*-*-END-of-s-07-2-4-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4005A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that for the binary arithmetic operator /, the left operand may be any
X-- physical type and the right operand may be the same type; check that in this
X-- case, the result is universal integer. Check for objects, literals, function
X-- calls.
X-- cases:  user-defined physical and time, integer.
X-- contexts:
X-- 1) function return statement (objects);
X-- 2) variable declaration (literals and function calls);
X-- 3) variable assignment ( objects, literals, and function calls);
X-- 4) signal assignment (objects, literals, and function calls);
X-- 5) integer subtype declaration (literals and function calls).
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X	type PHYS is range 1 to 100000
X		units
X			A;
X			B = 100 A;
X			C = 100 B;
X		end units;
X
X	function F ( A,B : time ) return integer is
X	begin
X		return A / B;	-- context 1
X	end F;
X
X	function G ( A,B : PHYS ) return integer is
X	begin
X		return A / B;	-- context 1
X	end G;
X
X	function F_PHYS ( A : PHYS ) return PHYS is
X	begin	return A;	end F_PHYS;
X
X	function F_TIME ( A : time ) return time is
X	begin	return A;	end F_TIME;
Xend P;
X
X-- with package P;  
Xuse P.all;
Xentity E  is
X    port ( PT : out integer ) ;
Xend E;
X
Xarchitecture BB of E is
X-- L_X_1: block
X begin
X  process
X	variable P : PHYS := 1 A;
X	variable T : TIME := 1 s;
X	variable A : integer := time'(1 min) / time'(27 s);	-- context 2
X	variable B1 : integer := PHYS'(8 B) / PHYS'(7 C);	-- context 2
X
X	subtype A_NEW_INT is integer range 
X		INTEGER'LOW to (F_TIME(1 s)/(1 s));	-- context 5
X	subtype B_NEW_INT is integer range 
X		INTEGER'LOW to ((1 B)/F_PHYS(1 B));	-- context 5
X  begin
X	A  := P / F_PHYS(1 B);	-- context 3
X	B1 := F_TIME(19 ms) / T;	-- context 3
X
X	PT <= (F_PHYS(P)/(5 C)) * (F_TIME(T)/(8 ps));	-- context 4
X	return;
X  end process;
X--  end block;
Xend BB;
*-*-END-of-s-07-2-4-0005a.vhdl-*-*
echo x - s-07-2-4-0006a.vhdl
sed 's/^X//' >s-07-2-4-0006a.vhdl <<'*-*-END-of-s-07-2-4-0006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-2-1-4006A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that static expressions formed with the operators mod, rem, *, / have
X-- the correct static value. Check for signs of results of (A rem B) and (A mod
X-- B).
X-- cases:	A	B	A/B	A*B	A rem B	A mod B
X--
X--		10	5	2	50	0	0
X--		-11	5	-2	-55	-1	4
X--		10	-5	-2	-50	0	0
X--		-11	-5	2	55	-1	-1
X-- contexts:  choice in case statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
Xfunction F return boolean is
X	subtype ALWAYS_TRUE is boolean range TRUE  to TRUE;
X	variable A : ALWAYS_TRUE;
X	variable B : BOOLEAN;
Xbegin
X	case A is
X		when ( 
X			( 10/5 = 2) 	 and ( 10*5 = 50 ) 
X					 and
X			( 10 rem 5 = 0 ) and ( 10 mod 5 = 0 ) 
X 		     ) 
X          	=>
X		   B := TRUE;
X	end case;
X	case A is
X		when (
X			 ( (-11)/5 = -2)      and ( (-11)*5 = -55 ) 
X					      and
X		         ( (-11) rem 5 = -1 ) and ( (-11) mod 5 = 4 ) 
X		     ) 
X          	=>
X		   B := TRUE;
X
X	end case;
X	case A is
X		when ( 
X			( 10/(-5) = -2)     and ( 10*(-5) = -50 ) 
X					    and
X			( 10 rem (-5) = 0 ) and ( 10 mod (-5) = 0 ) 
X		     )
X          	=>
X		   B := TRUE;
X	end case;
X	case A is
X		when ( 
X			( (-11)/(-5) = 2)       and ( (-11)*(-5) = 55 )
X					        and
X		        ( (-11) rem (-5) = -1 ) and ( (-11) mod (-5) = -1 )
X                     )
X          	=>
X		   B := TRUE;
X	end case;
X	return FALSE;
X  end F;
Xend P ;
*-*-END-of-s-07-2-4-0006a.vhdl-*-*
echo x - s-07-4-0-0001a.vhdl
sed 's/^X//' >s-07-4-0-0001a.vhdl <<'*-*-END-of-s-07-4-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-4-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that both named and positional association elements can be used
X-- in the same association list.
X-- cases:
X-- 1) positional, positional, named, named, all in the same order as the
X--    parameter specification. 
X--    Note. all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F_REAL ( A,B,C,D : REAL ) return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
X-- L_X_1: block
X signal P1 : BOOLEAN;
X begin
X	if F_REAL( 1.0, 2.0, C=>3.0, D=>4.0 )  /=  0.0  generate
X	--	(case 1, context 1)
X
X		P1 <= TRUE;
X	end generate;
X--  end block;
Xend AB;
*-*-END-of-s-07-4-0-0001a.vhdl-*-*
echo x - s-07-4-0-0002a.vhdl
sed 's/^X//' >s-07-4-0-0002a.vhdl <<'*-*-END-of-s-07-4-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-4-0-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that an actual part can be omitted for any formal part for
X-- which a default value was specified in the corresponding interface
X-- list.
X-- cases:
X-- 1) all positional associations must precede any named associations.
X-- contexts:
X-- 1) condition in an if-generate statement.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xuse P.all ;
Xpackage body P is
X
X	function F_REAL ( A : REAL := 1.0;
X                          B : REAL := 2.0;
X                          C : REAL := 3.0;
X                          D : REAL := 4.0 )   return REAL is
X	begin
X		return A + B + C + D;
X	end F_REAL;
X
Xend P;
X
X
X-- with package P;
X
Xuse P.all;
Xentity E  is
X    port (PT:BOOLEAN) ;
Xend E;
X
X
Xarchitecture AB of E is
X-- L_X_1: block
X signal P1, P2, P3, P4, P5, P6, P7, P8, P9  : BOOLEAN;
X begin
X	if F_REAL( 10.0, 20.0, C=>30.0, D=>40.0 )  /=  0.0  generate
X	--	no defaults
X
X		P1 <= TRUE;
X	end generate;
X
X	if F_REAL( C=>10.0, D=>20.0 )  /=  0.0  generate
X	--	A and B are default to;       C and D are named
X
X		P2 <= TRUE;
X	end generate;
X
X	if F_REAL( D=>10.0, C=>20.0)  /=  0.0  generate
X	--	A and B are default to;      C and D are named in any order
X
X		P3 <= TRUE;
X	end generate;
X
X
X	if F_REAL( 10.0, 20.0)  /=  0.0  generate
X	--	A and B are positional;      C and D are default to 
X
X		P4 <= TRUE;
X	end generate;
X
X	if F_REAL( A=>10.0, C=>20.0, D=>30.0 )  /=  0.0  generate
X	--	B is default to;     A, C and D are named
X
X		P5 <= TRUE;
X	end generate;
X
X	if F_REAL( D=>10.0, C=>20.0, A=>30.0 )  /=  0.0  generate
X	--	B is default to;     A, C and D are named in any order
X
X		P6 <= TRUE;
X	end generate;
X
X
X	if F_REAL( 1.0 )  /=  0.0  generate
X	--	A is positional; B, C and D are default to
X
X		P7 <= TRUE;
X	end generate;
X
X	if F_REAL( A => 1.0 )  /=  0.0  generate
X	--	A is named;     B, C and D are default to
X
X		P8 <= TRUE;
X	end generate;
X
X	if F_REAL /=  0.0  generate
X	--	All parameters are default to
X
X		P9 <= TRUE;
X	end generate;
X
X--  end block;
Xend AB;
*-*-END-of-s-07-4-0-0002a.vhdl-*-*
echo x - s-07-4-0-0003a.vhdl
sed 's/^X//' >s-07-4-0-0003a.vhdl <<'*-*-END-of-s-07-4-0-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-07-4-0-0003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the subtype of the formal designator is permitted to be 
X-- different from the subtype of the actual designator as long as the 
X-- base types match.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage TYPES_PACKAGE is
X   type BASE_TYPE is ( B1, B2, B3, B4, B5, B6, B7, B8, B9, B10);
X   subtype SUB_TYPE_1 is BASE_TYPE range B2 to B8;
X   subtype SUB_TYPE_2 is BASE_TYPE range B9 downto B5;
X
X   subtype CHAR_SUB_TYPE is CHARACTER range 'a' to 'z';
Xend TYPES_PACKAGE;
X
X-- with package TYPES_PACKAGE; 
Xuse TYPES_PACKAGE.all ;
Xpackage body TYPES_PACKAGE is
Xfunction F ( A : SUB_TYPE_1; B : CHAR_SUB_TYPE; C : SUB_TYPE_2 ) return BIT is
Xbegin
X  if A = C then
X     return '1';
X  else
X     return '0';
X  end if;
X  end F;
Xend TYPES_PACKAGE ;
X
X-- with function F;
X-- with package TYPES_PACKAGE; 
Xuse TYPES_PACKAGE.F ;
Xentity E is
Xend E;
X
Xarchitecture AB of E is
X--   BB : block
X     signal S1 : SUB_TYPE_2;
X     signal S2 : CHARACTER;
X     signal S3 : SUB_TYPE_1;
X
X     constant CC1 : SUB_TYPE_2 := B6;
X     constant CC2 : CHARACTER := 'q';
X     constant CC3 : SUB_TYPE_1 := B5;
X
X     component COMP_1 
X                    generic ( A2 : SUB_TYPE_1;
X                                B2 : CHAR_SUB_TYPE; 
X                                C2 : SUB_TYPE_2 ) ;
X                      port  ( A1 : SUB_TYPE_1; 
X                             B1 : CHAR_SUB_TYPE; 
X                             C1 : SUB_TYPE_2 ) ;
X     end component ; 
X
X  begin
X     X1 : COMP_1 
X                  generic map ( A2 => CC1, B2 => CC2, C2 => CC3 ) 
X          -- formals and actuals are of different subtypes, same type
X                  port map  ( A1 => S1, B1 => S2, C1 => S3 ) ;
X          -- formals and actuals are of different subtypes, same type
X
X     process
X        variable BIT_RESULT : BIT;
X     begin
X        BIT_RESULT := F ( A => CC1, B => CC2, C => CC3 ) ;
X          -- formals and actuals are of different subtypes, same type
X     end process;
X--   end block BB;
Xend AB;
*-*-END-of-s-07-4-0-0003a.vhdl-*-*
exit
Steve Grout @ MCC VLSI CAD Program, Austin TX.  [512] 343-0860 
ARPA: grout@mcc.arpa
UUCP: {ihnp4,seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!grout