Eiffel: how do I get the type of a particular operand of a procedure












0















As I can see into the debugger it's possible to get the operands, and name of procedure, is there a way to get it?




  • PROCEDURE=>operands returns a detachable that seems return the operands only when they have been setted into the agent

  • Do I have pass through any REFLECTOR class because the PROCEDURE class doesn't have this function and in this case why?


enter image description here



Seems that estudio has access to informations as ROUTINE client don't have, why is he a privileged one? is he cheating?










share|improve this question

























  • if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

    – Jocelyn
    Nov 21 '18 at 11:36











  • @Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

    – Pipo
    Nov 21 '18 at 12:52













  • @Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

    – Pipo
    Nov 21 '18 at 12:57













  • I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

    – Jocelyn
    Nov 22 '18 at 10:07











  • Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

    – Jocelyn
    Nov 22 '18 at 10:10
















0















As I can see into the debugger it's possible to get the operands, and name of procedure, is there a way to get it?




  • PROCEDURE=>operands returns a detachable that seems return the operands only when they have been setted into the agent

  • Do I have pass through any REFLECTOR class because the PROCEDURE class doesn't have this function and in this case why?


enter image description here



Seems that estudio has access to informations as ROUTINE client don't have, why is he a privileged one? is he cheating?










share|improve this question

























  • if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

    – Jocelyn
    Nov 21 '18 at 11:36











  • @Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

    – Pipo
    Nov 21 '18 at 12:52













  • @Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

    – Pipo
    Nov 21 '18 at 12:57













  • I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

    – Jocelyn
    Nov 22 '18 at 10:07











  • Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

    – Jocelyn
    Nov 22 '18 at 10:10














0












0








0








As I can see into the debugger it's possible to get the operands, and name of procedure, is there a way to get it?




  • PROCEDURE=>operands returns a detachable that seems return the operands only when they have been setted into the agent

  • Do I have pass through any REFLECTOR class because the PROCEDURE class doesn't have this function and in this case why?


enter image description here



Seems that estudio has access to informations as ROUTINE client don't have, why is he a privileged one? is he cheating?










share|improve this question
















As I can see into the debugger it's possible to get the operands, and name of procedure, is there a way to get it?




  • PROCEDURE=>operands returns a detachable that seems return the operands only when they have been setted into the agent

  • Do I have pass through any REFLECTOR class because the PROCEDURE class doesn't have this function and in this case why?


enter image description here



Seems that estudio has access to informations as ROUTINE client don't have, why is he a privileged one? is he cheating?







introspection eiffel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 13:01







Pipo

















asked Nov 20 '18 at 18:13









PipoPipo

1,4961526




1,4961526













  • if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

    – Jocelyn
    Nov 21 '18 at 11:36











  • @Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

    – Pipo
    Nov 21 '18 at 12:52













  • @Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

    – Pipo
    Nov 21 '18 at 12:57













  • I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

    – Jocelyn
    Nov 22 '18 at 10:07











  • Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

    – Jocelyn
    Nov 22 '18 at 10:10



















  • if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

    – Jocelyn
    Nov 21 '18 at 11:36











  • @Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

    – Pipo
    Nov 21 '18 at 12:52













  • @Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

    – Pipo
    Nov 21 '18 at 12:57













  • I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

    – Jocelyn
    Nov 22 '18 at 10:07











  • Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

    – Jocelyn
    Nov 22 '18 at 10:10

















if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

– Jocelyn
Nov 21 '18 at 11:36





if you evaluate a_setter.open_operand_type (1) you will get the type id of the first open operand. then using REFLECTOR will help getting the "human friendly" information. for isntance (create {REFLECTOR}).type_of_type (a_setter.open_operand_type (1))

– Jocelyn
Nov 21 '18 at 11:36













@Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

– Pipo
Nov 21 '18 at 12:52







@Jocelyn I tried it too, but open_operand_type is not exported!!!! {NONE} in your perposition, I have a feature of qualified call is not available to client class.` and the operands which is the only feature available to get operands @runtime returns me Void :-( Check the ROUTINE class...

– Pipo
Nov 21 '18 at 12:52















@Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

– Pipo
Nov 21 '18 at 12:57







@Jocelyn how does the estudio watch compute the agent value? all informations are available there! but unavailable for a ROUTINE client. Sounds like estudio is a privileged one or is cheating!

– Pipo
Nov 21 '18 at 12:57















I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

– Jocelyn
Nov 22 '18 at 10:07





I misunderstood your question, I thought you were asking about the debugger. And yes the debugger is not restricted by export clauses (hopefully).

– Jocelyn
Nov 22 '18 at 10:07













Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

– Jocelyn
Nov 22 '18 at 10:10





Now, the ROUTINE class does not provide much, because the less is exposed, the better it is for evolution. Now, why do you need those information? For any very good reason, it may be possible to add new features to ROUTINE.

– Jocelyn
Nov 22 '18 at 10:10












1 Answer
1






active

oldest

votes


















2














The following code demonstrates how to retrieve information about open argument types of a routine object:



        p: ROUTINE -- Routine object.
t: TYPE [detachable ANY] -- Current open argument type.
do
p := agent (i: INTEGER; s: STRING)
do
end
across
1 |..| p.open_count as i
loop
t := p.generating_type.generic_parameter_type (1).generic_parameter_type (i.item)
io.put_string (t.name)
io.put_new_line
end


For me, the code above prints



INTEGER_32
!STRING_8


Comments:





  1. p.open_count gives the total number of open arguments.


  2. p.generating_type retrieves the type of the routine object.


  3. p.generating_type.generic_parameter_type (1) retrieves the type of the open arguments tuple object.

  4. The final call to generating_type retrieves the type of the open argument with index i.item.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399084%2feiffel-how-do-i-get-the-type-of-a-particular-operand-of-a-procedure%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    The following code demonstrates how to retrieve information about open argument types of a routine object:



            p: ROUTINE -- Routine object.
    t: TYPE [detachable ANY] -- Current open argument type.
    do
    p := agent (i: INTEGER; s: STRING)
    do
    end
    across
    1 |..| p.open_count as i
    loop
    t := p.generating_type.generic_parameter_type (1).generic_parameter_type (i.item)
    io.put_string (t.name)
    io.put_new_line
    end


    For me, the code above prints



    INTEGER_32
    !STRING_8


    Comments:





    1. p.open_count gives the total number of open arguments.


    2. p.generating_type retrieves the type of the routine object.


    3. p.generating_type.generic_parameter_type (1) retrieves the type of the open arguments tuple object.

    4. The final call to generating_type retrieves the type of the open argument with index i.item.






    share|improve this answer




























      2














      The following code demonstrates how to retrieve information about open argument types of a routine object:



              p: ROUTINE -- Routine object.
      t: TYPE [detachable ANY] -- Current open argument type.
      do
      p := agent (i: INTEGER; s: STRING)
      do
      end
      across
      1 |..| p.open_count as i
      loop
      t := p.generating_type.generic_parameter_type (1).generic_parameter_type (i.item)
      io.put_string (t.name)
      io.put_new_line
      end


      For me, the code above prints



      INTEGER_32
      !STRING_8


      Comments:





      1. p.open_count gives the total number of open arguments.


      2. p.generating_type retrieves the type of the routine object.


      3. p.generating_type.generic_parameter_type (1) retrieves the type of the open arguments tuple object.

      4. The final call to generating_type retrieves the type of the open argument with index i.item.






      share|improve this answer


























        2












        2








        2







        The following code demonstrates how to retrieve information about open argument types of a routine object:



                p: ROUTINE -- Routine object.
        t: TYPE [detachable ANY] -- Current open argument type.
        do
        p := agent (i: INTEGER; s: STRING)
        do
        end
        across
        1 |..| p.open_count as i
        loop
        t := p.generating_type.generic_parameter_type (1).generic_parameter_type (i.item)
        io.put_string (t.name)
        io.put_new_line
        end


        For me, the code above prints



        INTEGER_32
        !STRING_8


        Comments:





        1. p.open_count gives the total number of open arguments.


        2. p.generating_type retrieves the type of the routine object.


        3. p.generating_type.generic_parameter_type (1) retrieves the type of the open arguments tuple object.

        4. The final call to generating_type retrieves the type of the open argument with index i.item.






        share|improve this answer













        The following code demonstrates how to retrieve information about open argument types of a routine object:



                p: ROUTINE -- Routine object.
        t: TYPE [detachable ANY] -- Current open argument type.
        do
        p := agent (i: INTEGER; s: STRING)
        do
        end
        across
        1 |..| p.open_count as i
        loop
        t := p.generating_type.generic_parameter_type (1).generic_parameter_type (i.item)
        io.put_string (t.name)
        io.put_new_line
        end


        For me, the code above prints



        INTEGER_32
        !STRING_8


        Comments:





        1. p.open_count gives the total number of open arguments.


        2. p.generating_type retrieves the type of the routine object.


        3. p.generating_type.generic_parameter_type (1) retrieves the type of the open arguments tuple object.

        4. The final call to generating_type retrieves the type of the open argument with index i.item.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 3 '18 at 10:29









        Alexander KogtenkovAlexander Kogtenkov

        3,73011526




        3,73011526






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399084%2feiffel-how-do-i-get-the-type-of-a-particular-operand-of-a-procedure%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

            Npm cannot find a required file even through it is in the searched directory