Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

J2EO & Polystat compatibility. Declarations  #27

@someilay

Description

@someilay

Declarations

Normal class declarations (without generics):

Java:

public class A extends B { }

Eo:

[] > class__A
  class__Object > super
  super > @
  [] > new
    [] > this
      class__Object.new > super
      super > @
      "class__A" > className
      [this] > init
        seq > @
          TRUE
    seq > @
      this
  # null :: null -> void
  [this] > constructor
    seq > @
      initialization
      s1471868639
      this
    [] > initialization
      this.init > @
        this
    [] > s1471868639
      super.constructor > @
        this

Nested normal class declarations (without generics) are supposed to be a static:

Java:

public class Main {
    static class Inner {}
}

Eo:

[] > class__Main
  class__Object > super
  super > @
  [] > new
    [] > this
      class__Object.new > super
      super > @
      "class__Main" > className
      [this] > init
        seq > @
          TRUE
    seq > @
      this
  [] > class__Inner
    class__Object > super
    super > @
    [] > new
      [] > this
        class__Object.new > super
        super > @
        "class__Inner" > className
        [this] > init
          seq > @
            TRUE
      seq > @
        this
    # null :: null -> void
    [this] > constructor
      seq > @
        initialization
        s724125922
        this
      [] > initialization
        this.init > @
          this
      [] > s724125922
        super.constructor > @
          this
  # null :: null -> void
  [this] > constructor
    seq > @
      initialization
      s1846412426
      this
    [] > initialization
      this.init > @
        this
    [] > s1846412426
      super.constructor > @
        this

Method declarations (without generics):

Java:

public int f(int a, B b) {
    return a + b.v;
}
...
public static int g(int a, int b) {
    return a * b;
}

Eo:

[this a b] > f
  seq > @
    s1073533248
  [] > s1073533248
    b1782148126 > @
  [] > b1782148126
    s_r306206744.add > @
      f_a827084938
  [] > s_r306206744
    a > @
  [] > f_a827084938
    s_r280265505.v > @
  [] > s_r280265505
    b > @
...
[a b] > g
  seq > @
    s1607305514
  [] > s1607305514
    b40472007 > @
  [] > b40472007
    s_r398110318.mul > @
      s_r1765250898
  [] > s_r398110318
    a > @
  [] > s_r1765250898
    b > @

Constructor declarations with explicit super call:

Java:

public A(int a, int b) {
    super(a);
    this.v = a + b;
}

Eo:

[this a b] > constructor
  seq > @
    initialization
    s1392906938
    s1485697819
    this
  [] > initialization
    this.init > @
      this
  [] > s1392906938
    super.constructor > @
      this
      s_r660879561
  [] > s_r660879561
    a > @
  [] > s1485697819
    f_a2007331442.write > @
      b1904324159
  [] > f_a2007331442
    t1176735295.v > @
  [] > t1176735295
    this > @
  [] > b1904324159
    s_r1848415041.add > @
      s_r843467284
  [] > s_r1848415041
    a > @
  [] > s_r843467284
      b > @

Variable declarations (without var and non-static):

Java:

A a;
int b;
C c = new C();
float d = 1.9 + f;

Eo:

seq > @
  d1849201180
  d1691875296
  d667346055
  d1366025231
cage > a
[] > d1849201180
  TRUE > @
prim__int.constructor_1 > b
  prim__int.new
[] > d1691875296
  TRUE > @
cage > c
[] > d667346055
  c.write > @
    i_s1669712678
[] > i_s1669712678
  inst513700442 > @
[] > inst513700442
  C.constructor > @
    C.new
prim__float.constructor_1 > d
  prim__float.new
[] > d1366025231
  d.write > @
    i_s1007309018
[] > i_s1007309018
  b1684792003 > @
[] > b1684792003
  l2008966511.add > @
    s_r433874882
[] > l2008966511
  prim__float.constructor_2 > @
    prim__float.new
    1.9
[] > s_r433874882
  f > @

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions