Language Change Specification for Additional Operators to Integers Proposal

LCS Number: LCS-2016-031
Version: 1
Date: 26-Oct-2016
Status:
Author: Kevin Jennings
Email: KevinJennings
Source Doc: IntegerOperators
Summary: Allow for use of logic operations with integers.

Voting Results: Cast your votes here

Yes:

  1. Morten Zilmer - 2016-12-11
  2. Ryan Hinton - 2016-12-14 ver 1

  3. Jim Lewis - 2017-01-11 ver 1

No:

  1. Kevin Jennings - 2016-11-07 (Don't agree with the proposal's premise that integers should be treated as if they are logical values).
  2. Patrick Lehmann - 2016-11-19
  3. Thomas Preusser - 2016-11-21
  4. Martin Thompson - 2016-12-12
  5. Martin Zabel - 2017-01-20 ver 1 - see my comment from 2017-01-23
  6. Lieven Lemiengre - 2017-01-27
  7. Hendrik Eeckhaut - 2017-01-27
  8. Mark Zwolinski - 2017-02-27

Abstain:

  1. Rob Gaddi - 2016-12-12

  2. Brent Hayhoe - 2017-02-16 Version 1 - Abstain due to lack of personal time for review.

Details_of_Language_Change

LRM 16.3 Package STANDARD

Page 256 top of page

Add the following in its entirety.

-- Regardless of how integers are implemented, all of the following functions are to be implemented such that both parameters and the return value of each function have a twos complement interpretation.

-- function "and" (anonymous, anonymous: integer) return integer;
-- function "or" (anonymous, anonymous: integer) return integer;
-- function "nand" (anonymous, anonymous: integer) return integer;
-- function "nor" (anonymous, anonymous: integer) return integer;
-- function "xor" (anonymous, anonymous: integer) return integer;
-- function "xnor" (anonymous, anonymous: integer) return integer;

Note: Short of a 'good idea', the following shift and rotate functions probably cannot be realized because of potential differences in the number of bits used to implement an integer. No change to the LRM to support.

-- function "sll" (anonymous: integer; anonymous: INTEGER) return integer;
-- function "srl" (anonymous: integer; anonymous: INTEGER) return integer;
-- function "sla" (anonymous: integer; anonymous: INTEGER) return integer;
-- function "rol" (anonymous: integer; anonymous: INTEGER) return integer;
-- function "ror" (anonymous: integer; anonymous: INTEGER) return integer;

-- Kevin Jennings - 2016-10-26

Comments

The link to the source document is wrong. -- PatrickLehmann - 2016-11-19

Fixed. -- KevinJennings - 2016-11-21

One important reason to support integers - simulation speed. How is it that the values that are integers are not represented by bits? Once we decide that the values are 2's complement values, there is no reason not to support logic operations. Once we have determined the size of an integer, doing this operations is simple.

-- Jim Lewis - 2017-01-11

Whenever this should be possible, then clause 5.2.3.1 must define that integers are represented internally in two's-complement form. Also clause 9.2.2 must be update to allow the operators "and", "or", ... on integer types.

-- Martin Zabel - 2017-01-23

@TODO Needs to be updated to match 26a which states an integer is a 64 bit signed 2's complement value with symmetric range. @TODO Edit section 9.2 operators @TODO Resolve SRA or SLA

-- Jim Lewis - 2017-02-02

Topic revision: r23 - 2017-02-27 - 13:28:43 - MarkZwolinski
 
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback