WeixiangYan/CodeTransOcean huggingface dataset:
Task: Abelian sandpile model_Identity




Go: package main

import (
    "fmt"
    "strconv"
    "strings"
)

type sandpile struct{ a [9]int }

var neighbors = [][]int{
    {1, 3}, {0, 2, 4}, {1, 5}, {0, 4, 6}, {1, 3, 5, 7}, {2, 4, 8}, {3, 7}, {4, 6, 8}, {5, 7},
}


func newSandpile(a [9]int) *sandpile { return &sandpile{a} }

func (s *sandpile) plus(other *sandpile) *sandpile {
    b := [9]int{}
    for i := 0; i < 9; i++ {
        b[i] = s.a[i] + other.a[i]
    }
    return &sandpile{b}
}

func (s *sandpile) isStable() bool {
    for _, e := range s.a {
        if e > 3 {
            return false
        }
    }
    return true
}


func (s *sandpile) topple() {
    for i := 0; i < 9; i++ {
        if s.a[i] > 3 {
            s.a[i] -= 4
            for _, j := range neighbors[i] {
                s.a[j]++
            }
            return
        }
    }
}

func (s *sandpile) String() string {
    var sb strings.Builder
    for i := 0; i < 3; i++ {
        for j := 0; j < 3; j++ {
            sb.WriteString(strconv.Itoa(s.a[3*i+j]) + " ")
        }
        sb.WriteString("\n")
    }
    return sb.String()
}

func main() {
    fmt.Println("Avalanche of topplings:\n")
    s4 := newSandpile([9]int{4, 3, 3, 3, 1, 2, 0, 2, 3})
    fmt.Println(s4)
    for !s4.isStable() {
        s4.topple()
        fmt.Println(s4)
    }

    fmt.Println("Commutative additions:\n")
    s1 := newSandpile([9]int{1, 2, 0, 2, 1, 1, 0, 1, 3})
    s2 := newSandpile([9]int{2, 1, 3, 1, 0, 1, 0, 1, 0})
    s3_a := s1.plus(s2)
    for !s3_a.isStable() {
        s3_a.topple()
    }
    s3_b := s2.plus(s1)
    for !s3_b.isStable() {
        s3_b.topple()
    }
    fmt.Printf("%s\nplus\n\n%s\nequals\n\n%s\n", s1, s2, s3_a)
    fmt.Printf("and\n\n%s\nplus\n\n%s\nalso equals\n\n%s\n", s2, s1, s3_b)

    fmt.Println("Addition of identity sandpile:\n")
    s3 := newSandpile([9]int{3, 3, 3, 3, 3, 3, 3, 3, 3})
    s3_id := newSandpile([9]int{2, 1, 2, 1, 0, 1, 2, 1, 2})
    s4 = s3.plus(s3_id)
    for !s4.isStable() {
        s4.topple()
    }
    fmt.Printf("%s\nplus\n\n%s\nequals\n\n%s\n", s3, s3_id, s4)

    fmt.Println("Addition of identities:\n")
    s5 := s3_id.plus(s3_id)
    for !s5.isStable() {
        s5.topple()
    }
    fmt.Printf("%s\nplus\n\n%s\nequals\n\n%s", s3_id, s3_id, s5)
}








Ada: 

package Abelian_Sandpile is
   Limit : constant Integer := 4;

   type Sandpile is array (0 .. 2, 0 .. 2) of Natural with
      Default_Component_Value => 0;

   procedure Stabalize (Pile : in out Sandpile);
   function Is_Stable (Pile : in Sandpile) return Boolean;
   procedure Topple (Pile : in out Sandpile);
   function "+" (Left, Right : Sandpile) return Sandpile;
   procedure Print(PIle : in Sandpile);

end Abelian_Sandpile;
Task: Base 16 numbers needing a to f




Go: package main

import (
    "fmt"
    "strconv"
    "strings"
)

func main() {
    const nondecimal = "abcdef"
    c := 0
    for i := int64(0); i <= 500; i++ {
        hex := strconv.FormatInt(i, 16)
        if strings.ContainsAny(nondecimal, hex) {
            fmt.Printf("%3d ", i)
            c++
            if c%15 == 0 {
                fmt.Println()
            }
        }
    }
    fmt.Printf("\n\n%d such numbers found.\n", c)
}








Ada: with Ada.Text_Io;

procedure Base_16_Numbers is
   Columns : constant := 24;
   Base    : constant := 16;

   function Has_A_To_F (N : Positive) return Boolean is
      C : Natural := N;
   begin
      while C > 0 loop
         if C mod Base in 16#A# .. 16#F# then
            return True;
         end if;
         C := C / Base;
      end loop;
      return False;
   end Has_A_To_F;

   package Natural_Io is new Ada.Text_Io.Integer_Io (Natural);
   use Ada.Text_Io;
   Count : Natural := 0;
begin
   for N in 1 .. 500 loop
      if Has_A_To_F (N) then
         Count := Count + 1;
         Natural_Io.Put (N, Width => 5);
         if Count mod Columns = 0 then
            New_Line;
         end if;
      end if;
   end loop;
   New_Line (2);
   Put ("Total count: "); Natural_Io.Put (Count, Width => 3); New_Line;
end Base_16_Numbers;
Task: Address of a variable




Go: package main

import (
	"fmt"
	"unsafe"
)

func main() {
	myVar := 3.14
	myPointer := &myVar
	fmt.Println("Address:", myPointer, &myVar)
	fmt.Printf("Address: %p %p\n", myPointer, &myVar)

	var addr64 int64
	var addr32 int32
	ptr := unsafe.Pointer(myPointer)
	if unsafe.Sizeof(ptr) <= unsafe.Sizeof(addr64) {
		addr64 = int64(uintptr(ptr))
		fmt.Printf("Pointer stored in   int64: %#016x\n", addr64)
	}
	if unsafe.Sizeof(ptr) <= unsafe.Sizeof(addr32) {
		
		addr32 = int32(uintptr(ptr))
		fmt.Printf("Pointer stored in   int32: %#08x\n", addr32)
	}
	addr := uintptr(ptr)
	fmt.Printf("Pointer stored in uintptr: %#08x\n", addr)

	fmt.Println("value as float:", myVar)
	i := (*int32)(unsafe.Pointer(&myVar))
	fmt.Printf("value as int32: %#08x\n", *i)
}








Ada: The_Address : System.Address;
I : Integer;
The_Address := I'Address;
Task: Fixed length records




Go: package main

import (
    "fmt"
    "log"
    "os"
    "os/exec"
)

func reverseBytes(bytes []byte) {
    for i, j := 0, len(bytes)-1; i < j; i, j = i+1, j-1 {
        bytes[i], bytes[j] = bytes[j], bytes[i]
    }
}

func check(err error) {
    if err != nil {
        log.Fatal(err)
    }
}

func main() {
    in, err := os.Open("infile.dat")
    check(err)
    defer in.Close()

    out, err := os.Create("outfile.dat")
    check(err)

    record := make([]byte, 80)
    empty := make([]byte, 80)
    for {
        n, err := in.Read(record)
        if err != nil {
            if n == 0 {
                break 
            } else {
                out.Close()
                log.Fatal(err)
            }
        }
        reverseBytes(record)
        out.Write(record)
        copy(record, empty)
    }
    out.Close()

    
    
    cmd := exec.Command("dd", "if=outfile.dat", "cbs=80", "conv=unblock")
    bytes, err := cmd.Output()
    check(err)
    fmt.Println(string(bytes))
}








Ada: with Ada.Text_IO; use Ada.Text_IO;

procedure Main is
   subtype Block is String (1 .. 80);
   Infile_Name  : String := "infile.dat";
   outfile_Name : String := "outfile.dat";
   Infile       : File_Type;
   outfile      : File_Type;

   Line : Block := (Others => ' ');
begin
   Open (File => Infile, Mode => In_File, Name => Infile_Name);
   Create (File => outfile, Mode => Out_File, Name => outfile_Name);

   Put_Line("Input data:");
   New_Line;
   while not End_Of_File (Infile) loop
      Get (File => Infile, Item => Line);
      Put(Line);
      New_Line;
      for I in reverse Line'Range loop
         Put (File => outfile, Item => Line (I));
      end loop;
   end loop;
   
   Close (Infile);
   Close (outfile);

   Open(File => infile,
        Mode => In_File,
        Name => outfile_name);
   New_Line;
   Put_Line("Output data:");
   New_Line;
   while not End_Of_File(Infile) loop
      Get(File => Infile,
          Item => Line);
      Put(Line);
      New_Line;
   end loop;
end Main;
Task: Find words whose first and last three letters are equal




Go: package main

import (
    "bytes"
    "fmt"
    "io/ioutil"
    "log"
    "unicode/utf8"
)

func main() {
    wordList := "unixdict.txt"
    b, err := ioutil.ReadFile(wordList)
    if err != nil {
        log.Fatal("Error reading file")
    }
    bwords := bytes.Fields(b)
    count := 0
    for _, bword := range bwords {
        s := string(bword)
        if utf8.RuneCountInString(s) > 5 && (s[0:3] == s[len(s)-3:]) {
            count++
            fmt.Printf("%d: %s\n", count, s)
        }
    }
}








Ada: with Ada.Text_Io;
with Ada.Strings.Fixed;

procedure Find_Three_Equals is
   use Ada.Text_Io;
   use Ada.Strings.Fixed;

   Filename : constant String := "unixdict.txt";
   File     : File_Type;
begin
   Open (File, In_File, Filename);
   while not End_Of_File (File) loop
      declare
         Word  : constant String  := Get_Line (File);
         First : String renames Head (Word, 3);
         Last  : String renames Tail (Word, 3);
      begin
         if First = Last and Word'Length > 5 then
            Put_Line (Word);
         end if;
      end;
   end loop;
   Close (File);
end Find_Three_Equals;
Task: Common list elements




Go: package main

import "fmt"

func indexOf(l []int, n int) int {
    for i := 0; i < len(l); i++ {
        if l[i] == n {
            return i
        }
    }
    return -1
}

func common2(l1, l2 []int) []int {
    
    c1, c2 := len(l1), len(l2)
    shortest, longest := l1, l2
    if c1 > c2 {
        shortest, longest = l2, l1
    }
    longest2 := make([]int, len(longest))
    copy(longest2, longest) 
    var res []int
    for _, e := range shortest {
        ix := indexOf(longest2, e)
        if ix >= 0 {
            res = append(res, e)
            longest2 = append(longest2[:ix], longest2[ix+1:]...)
        }
    }
    return res
}

func commonN(ll [][]int) []int {
    n := len(ll)
    if n == 0 {
        return []int{}
    }
    if n == 1 {
        return ll[0]
    }
    res := common2(ll[0], ll[1])
    if n == 2 {
        return res
    }
    for _, l := range ll[2:] {
        res = common2(res, l)
    }
    return res
}

func main() {
    lls := [][][]int{
        {{2, 5, 1, 3, 8, 9, 4, 6}, {3, 5, 6, 2, 9, 8, 4}, {1, 3, 7, 6, 9}},
        {{2, 2, 1, 3, 8, 9, 4, 6}, {3, 5, 6, 2, 2, 2, 4}, {2, 3, 7, 6, 2}},
    }
    for _, ll := range lls {
        fmt.Println("Intersection of", ll, "is:")
        fmt.Println(commonN(ll))
        fmt.Println()
    }
}








Ada: with Ada.Text_Io;
with Ada.Containers.Vectors;

procedure Common is

   package Integer_Vectors is
     new Ada.Containers.Vectors (Index_Type   => Positive,
                                 Element_Type => Integer);
   use Integer_Vectors;

   function Common_Elements (Left, Right : Vector) return Vector is
      Res : Vector;
   begin
      for E of Left loop
         if Has_Element (Right.Find (E)) then
            Res.Append (E);
         end if;
      end loop;
      return Res;
   end Common_Elements;

   procedure Put (Vec : Vector) is
      use Ada.Text_Io;
   begin
      Put ("[");
      for E of Vec loop
         Put (E'Image);  Put (" ");
      end loop;
      Put ("]");
      New_Line;
   end Put;

   A : constant Vector := 2 & 5 & 1 & 3 & 8 & 9 & 4 & 6;
   B : constant Vector := 3 & 5 & 6 & 2 & 9 & 8 & 4;
   C : constant Vector := 1 & 3 & 7 & 6 & 9;
   R : Vector;
begin
   R := Common_Elements (A, B);
   R := Common_Elements (R, C);
   Put (R);
end Common;
Task: Loops_Infinite




Go: package main

import "fmt"

func main() {
	for {
		fmt.Printf("SPAM\n")
	}
}








Ada: loop
   Put_Line("SPAM");
end loop;
Task: MD5_Implementation




Go: package main

import (
    "fmt"
    "math"
    "bytes"
    "encoding/binary"
)

type testCase struct {
    hashCode string
    string
}

var testCases = []testCase{
    {"d41d8cd98f00b204e9800998ecf8427e", ""},
    {"0cc175b9c0f1b6a831c399e269772661", "a"},
    {"900150983cd24fb0d6963f7d28e17f72", "abc"},
    {"f96b697d7cb7938d525a2f31aaf161d0", "message digest"},
    {"c3fcd3d76192e4007dfb496cca67e13b", "abcdefghijklmnopqrstuvwxyz"},
    {"d174ab98d277d9f5a5611c2c9f419d9f",
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
    {"57edf4a22be3c955ac49da2e2107b67a", "12345678901234567890" +
        "123456789012345678901234567890123456789012345678901234567890"},
}

func main() {
    for _, tc := range testCases {
        fmt.Printf("%s\n%x\n\n", tc.hashCode, md5(tc.string))
    }
}

var shift = [...]uint{7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21}
var table [64]uint32

func init() {
    for i := range table {
        table[i] = uint32((1 << 32) * math.Abs(math.Sin(float64(i + 1))))
    }
}

func md5(s string) (r [16]byte) {
    padded := bytes.NewBuffer([]byte(s))
    padded.WriteByte(0x80)
    for padded.Len() % 64 != 56 {
        padded.WriteByte(0)
    }
    messageLenBits := uint64(len(s)) * 8
    binary.Write(padded, binary.LittleEndian, messageLenBits)

    var a, b, c, d uint32 = 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476
    var buffer [16]uint32
    for binary.Read(padded, binary.LittleEndian, buffer[:]) == nil { 
        a1, b1, c1, d1 := a, b, c, d
        for j := 0; j < 64; j++ {
            var f uint32
            bufferIndex := j
            round := j >> 4
            switch round {
            case 0:
                f = (b1 & c1) | (^b1 & d1)
            case 1:
                f = (b1 & d1) | (c1 & ^d1)
                bufferIndex = (bufferIndex*5 + 1) & 0x0F
            case 2:
                f = b1 ^ c1 ^ d1
                bufferIndex = (bufferIndex*3 + 5) & 0x0F
            case 3:
                f = c1 ^ (b1 | ^d1)
                bufferIndex = (bufferIndex * 7) & 0x0F
            }
            sa := shift[(round<<2)|(j&3)]
            a1 += f + buffer[bufferIndex] + table[j]
            a1, d1, c1, b1 = d1, c1, b1, a1<<sa|a1>>(32-sa)+b1
        }
        a, b, c, d = a+a1, b+b1, c+c1, d+d1
    }

    binary.Write(bytes.NewBuffer(r[:0]), binary.LittleEndian, []uint32{a, b, c, d})
    return
}








Ada: package MD5 is

   type Int32 is mod 2 ** 32;
   type MD5_Hash is array (1 .. 4) of Int32;
   function MD5 (Input : String) return MD5_Hash;

   
   subtype MD5_String is String (1 .. 34);
   function To_String (Item : MD5_Hash) return MD5_String;

end MD5;
Task: Exponentiation with infix operators in (or operating on) the base




Go: package main

import (
    "fmt"
    "math"
)

type float float64

func (f float) p(e float) float { return float(math.Pow(float64(f), float64(e))) }

func main() {
    ops := []string{"-x.p(e)", "-(x).p(e)", "(-x).p(e)", "-(x.p(e))"}
    for _, x := range []float{float(-5), float(5)} {
        for _, e := range []float{float(2), float(3)} {
            fmt.Printf("x = %2.0f e = %0.0f | ", x, e)
            fmt.Printf("%s = %4.0f | ", ops[0], -x.p(e))
            fmt.Printf("%s = %4.0f | ", ops[1], -(x).p(e))
            fmt.Printf("%s = %4.0f | ", ops[2], (-x).p(e))
            fmt.Printf("%s = %4.0f\n", ops[3], -(x.p(e)))
        }
    }
}








Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Float_Text_IO; use Ada.Float_Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Main is
   ivalue : Integer := -5;
   fvalue : float   := -5.0;
begin
   Put_Line("Integer exponentiation:");
   for i in 1..2 loop
      for power in 2..3 loop

         Put("x =" & ivalue'image & " p =" & power'image);
         Put("   -x ** p ");
         Put(item => -ivalue ** power, width => 4);
         Put("   -(x) ** p ");
         Put(item => -(ivalue) ** power, width => 4);
         Put("   (-x) ** p ");
         Put(Item => (- ivalue) ** power, Width => 4);
         Put("   -(x ** p) ");
         Put(Item => -(ivalue ** power), Width => 4);
         New_line;
      end loop;
      ivalue := 5;
      fvalue := 5.0;
   end loop;
   Put_Line("floating point exponentiation:");
   ivalue := -5;
   fvalue := -5.0;

   for i in 1..2 loop
      for power in 2..3 loop
         Put("x =" & fvalue'image & " p =" & power'image);
         Put("   -x ** p ");
         Put(item => -fvalue ** power, fore => 4, Aft => 1, Exp => 0);
         Put("   -(x) ** p ");
         Put(item => -(fvalue) ** power, fore => 4, Aft => 1, Exp => 0);
         Put("   (-x) ** p ");
         Put(Item => (- fvalue) ** power, fore => 4, Aft => 1, Exp => 0);
         Put("   -(x ** p) ");
         Put(Item => -(fvalue ** power), fore => 4, Aft => 1, Exp => 0);
         New_line;
      end loop;
      ivalue := 5;
      fvalue := 5.0;
   end loop;
end Main;
Task: Concatenate two primes is also prime




Go: package main

import (
    "fmt"
    "rcu"
    "sort"
)

func main() {
    const LIMIT = 99
    primes := rcu.Primes(LIMIT)
    rmap := make(map[int]bool)
    for _, p := range primes {
        for _, q := range primes {
            var pq int
            if q < 10 {
                pq = p*10 + q
            } else {
                pq = p*100 + q
            }
            if rcu.IsPrime(pq) {
                rmap[pq] = true
            }
        }
    }
    results := make([]int, len(rmap))
    i := 0
    for k := range rmap {
        results[i] = k
        i++
    }
    sort.Ints(results)
    fmt.Println("Two primes under 100 concatenated together to form another prime:")
    for i, p := range results {
        fmt.Printf("%5s ", rcu.Commatize(p))
        if (i+1)%10 == 0 {
            fmt.Println()
        }
    }
    fmt.Println("\n\nFound", len(results), "such concatenated primes.")
}








Ada: with Ada.Text_Io;
with Ada.Integer_Text_Io;
with Ada.Strings.Fixed;

procedure Concat_Is_Prime is

   Columns : constant := 10;

   subtype Full_Range is Integer range 2 .. 9_999;
   subtype Low_Range  is Full_Range range Full_Range'First .. 99;

   function Concat (Left, Right : Low_Range) return Full_Range is
      use Ada.Strings;
   begin
      return Full_Range'Value (Fixed.Trim (Left'Image, Both) &
                                  Fixed.Trim (Right'Image, Both));
   end Concat;

   use Ada.Text_Io, Ada.Integer_Text_Io;

   Is_Prime        : array (Full_Range) of Boolean := (others => True);
   Is_Concat_Prime : array (Full_Range) of Boolean := (others => False);
   Count           : Natural := 0;

begin
   for A in Full_Range loop
      if Is_Prime (A) then
         for B in 2 .. Integer'Last loop
            exit when A * B not in Full_Range;
            Is_Prime (A * B) := False;
         end loop;
      end if;
   end loop;

   for P1 in Low_Range loop
      for P2 in Low_Range loop
         if
           Is_Prime (P1) and Is_Prime (P2) and Is_Prime (Concat (P1, P2))
         then
            Is_Concat_Prime (Concat (P1, P2)) := True;
         end if;
      end loop;
   end loop;

   for A in Is_Concat_Prime'Range loop
      if Is_Concat_Prime (A) then
         Put (A, Width => 6);
         Count := Count + 1;
         if Count mod Columns = 0 then
            New_Line;
         end if;
      end if;
   end loop;
   New_Line;

   Put ("There are ");
   Put (Natural'Image (Count));
   Put (" concat primes.");
   New_Line;
end Concat_Is_Prime;
Task: Assertions in design by contract




Go: func assert(t bool, s string) {
	if !t {
		panic(s)
	}
}

	assert(c == 0, "some text here")








Ada: type Nums_Array is array (Integer range <>) of Integer;

procedure Sort(Arr : in out Nums_Array) with
    Pre => Arr'Length > 1,
    Post => (for all I in Arr'First .. Arr'Last -1 => Arr(I) <= Arr(I + 1));
Task: Arena storage pool




Go: package main

import (
    "fmt"
    "runtime"
    "sync"
)





func main() {
    
    
    p := sync.Pool{New: func() interface{} {
        fmt.Println("pool empty")
        return new(int)
    }}
    
    i := new(int)
    j := new(int)
    
    *i = 1
    *j = 2
    fmt.Println(*i + *j) 
    
    
    
    
    p.Put(i)
    p.Put(j)
    
    
    i = nil
    j = nil
    
    
    
    i = p.Get().(*int)
    j = p.Get().(*int)
    *i = 4
    *j = 5
    fmt.Println(*i + *j) 
    
    p.Put(i)
    p.Put(j)
    i = nil
    j = nil
    runtime.GC()
    i = p.Get().(*int)
    j = p.Get().(*int)
    *i = 7
    *j = 8
    fmt.Println(*i + *j) 
}








Ada: P := new T
Task: History variables




Go: package main

import (
    "fmt"
    "sort"
    "sync"
    "time"
)


type history struct {
    timestamp tsFunc
    hs        []hset
}


type tsFunc func() time.Time


type hset struct {
    int           
    t   time.Time 
}


func newHistory(ts tsFunc) history {
    return history{ts, []hset{{t: ts()}}}
}   
    

func (h history) int() int {
    return h.hs[len(h.hs)-1].int
}
    

func (h *history) set(x int) time.Time {
    t := h.timestamp()
    h.hs = append(h.hs, hset{x, t})
    return t
}


func (h history) dump() {
    for _, hs := range h.hs {
        fmt.Println(hs.t.Format(time.StampNano), hs.int)
    }
}   
    


func (h history) recall(t time.Time) (int,  bool) {
    i := sort.Search(len(h.hs), func(i int) bool {
        return h.hs[i].t.After(t)
    })
    if i > 0 {
        return h.hs[i-1].int, true
    }
    return 0, false
}





func newTimestamper() tsFunc {
    var last time.Time
    return func() time.Time {
        if t := time.Now(); t.After(last) {
            last = t
        } else {
            last.Add(1)
        }
        return last
    }
}



func newProtectedTimestamper() tsFunc {
    var last time.Time
    var m sync.Mutex
    return func() (t time.Time) {
        t = time.Now()
        m.Lock() 
        if t.After(last) {
            last = t
        } else {
            last.Add(1)
            t = last
        }
        m.Unlock()
        return
    }
}

func main() {
    
    ts := newTimestamper()
    
    h := newHistory(ts)
    
    ref := []time.Time{h.set(3), h.set(1), h.set(4)}
    
    fmt.Println("History of variable h:")
    h.dump() 
    
    
    fmt.Println("Recalling values:")
    for _, t := range ref {
        rv, _ := h.recall(t)
        fmt.Println(rv)
    }
}








Ada: private with Ada.Containers.Indefinite_Vectors;
generic
   type Item_Type (<>) is private;
package History_Variables is

   type Variable is tagged limited private;

   
   procedure Set(V: in out Variable; Item: Item_Type);
   function Get(V: Variable) return Item_Type;

   
   function Defined(V: Variable) return Natural;

   
   function Peek(V: Variable; Generation: Natural := 1) return Item_Type;
   
   

   
   procedure Undo(V: in out Variable);
   
   
   

private
   package Vectors is new Ada.Containers.Indefinite_Vectors
     (Index_Type   => Positive,
      Element_Type => Item_Type);

   type Variable is tagged limited record
      History: Vectors.Vector;
   end record;
end History_Variables;