compiling SKILL code to binary file

Discussion in 'Cadence' started by Andrey Orlenko 1038630570, Mar 2, 2004.

  1. Can I compile SKILL-code to binary file ? How to make it ?
     
    Andrey Orlenko 1038630570, Mar 2, 2004
    #1
  2. But I've seen some working skill-programms in binary mode (not text view
    of file). For exaple, I've got Design Kit with binary skill-code ...
     
    Andrey Orlenko 1038630570, Mar 2, 2004
    #2
  3. This is encrypted Skill using the Skill function encrypt()

    ================================================================
    Kholdoun TORKI
    http://cmp.imag.fr
    ================================================================
     
    Kholdoun TORKI, Mar 2, 2004
    #3
  4. Perhaps you're thinking of either encrypted files, or context files.

    See the SKILL Language User Guide, Chapter 10, "Delivering Products".

    Andrew.
     
    Andrew Beckett, Mar 2, 2004
    #4
  5. SKILL is an interpreter programming language therefore
    you can not create executable binaries like you are used
    with non interpreter programming languages like C.

    But there are ways to, lets say to convert your SKILL code.

    1. Use the SKILL function 'encrypt' to encrypt your SKILL
    text file. Refer to the docs for more details.
    Note: If you want to protect your SKILL code use always
    the password argument for the 'encrypt' function.
    There is flying some code around which otherwise can
    decrypt it.
    Encrypted SKILL files can be treated like text SKILL
    files, use the 'load' function to make the code present.

    2. You can build a context file form you SKILL code.
    A context file has to be loaded with the 'loadContext'
    function without extension and in general it should
    have the extension *.cxt.
    I have never done that, so for more details refer to
    the docs again.

    Bernd
     
    Bernd Fischer, Mar 2, 2004
    #5
  6. Andrey Orlenko 1038630570

    F ogh Guest

    I believe the drcExtractRules() does more or less that. Otherwise there
    is encrypt, as mentioned before.

    What do you want to achieve actually ? performance or obfuscation ?
     
    F ogh, Mar 3, 2004
    #6
  7. Ok, I understood it - Thanks !!!

    --
    Andrey Orlenko
    Ukraine, Kiev
    ICQ# 157544292
    e-mail:
    http://flying.h11.ru/
     
    Andrey Orlenko 1038630570, Mar 3, 2004
    #7
  8. Andrey Orlenko 1038630570

    John Gianni Guest

    I posted this howto long ago, but it's germane to this conversation:
    jjg

    ---------------------------------------------------------------------
    A quick step-by-step Hello-World SKILL coding/encryption walk-thru
    ---------------------------------------------------------------------
    1. First, you _should_ name both the IL file and all the SKILL
    procedures defined inside starting with an upper-case prefix,
    e.g., create a file named:
    /tmp/MyHelloWorld.il
    Which consist of, for example, this simple common test procedure:
    procedure(MyTestProc()
    printf("Hello World\n");
    );end of my test procedure

    Note: Cadence strongly recommends Customers and Application
    personnel make use of upper-case prefixes while Cadence
    applications (shipped on the software CDROM) use only
    lower-case prefixes. Private functions should begin with
    both an underscore and a prefix. This allows the user to
    easily identify, on sight, the support status of a function.
    ---------------------------------------------------------------------
    2. Cut and paste these simple examples below to run your first SKILL:

    Start any DFII executable; load & run the desired procedure, e.g.:
    csh% skill
    This should execute the SKILL procedure & print the message.
    Or use any DFII graphical executable, e.g.:
    csh% icfb
    CIW: load("/tmp/MyHelloWorld.il")
    CIW: MyTestProc()
    This should execute the SKILL procedure & print the message.
    CIW: exit

    Or, for non-graphical applications, use 'nograph' options, e.g.:
    csh% icfb -nograph
    This should execute the SKILL procedure & print the message.
    Or, if you do not need contexts to be autoloaded, skip them using:
    csh% icfb -ilLoadIL /dev/null -nograph -log /tmp/Log$$
    This should execute the SKILL procedure & print the message.
    Or, if you wish to load the test file for immediate execution:
    csh% icfb -ilLoadIL /tmp/MyHelloWorld.il -nograph -log /tmp/Log$$
    This should execute the SKILL procedure & print the message.
    Or, if desired, create a batch test-sequence file to run in toto:
    csh% cat > /tmp/MyTest.il <<EOF
    load("/tmp/MyHelloWorld.il")
    MyTestProc()
    EOF

    Then, use that batch file in a DFII non-graphical session, e.g.:
    csh% icfb -replay /tmp/MyTest.il -nograph -log /tmp/Log$$
    This should execute the SKILL procedure & print the message
    into the desired log file (the $$ appends the process id).

    In a batch session, if you don't want the .cdsinit file loaded, use:
    csh% icfb -replay MyTest.il -cdshi_nocdsinit -nograph -log Log$$
    This should execute the SKILL procedure & print the message
    into the desired log file.
    ---------------------------------------------------------------------
    3. In addition, you can add security via encryption or context files:

    A simple example of encrypting your SKILL code, for example, is:
    csh% skill
    Note: This should create the encrypted IL file:
    "MyHelloWorld.ile".
    Note: Test by loading and executing the encrypted SKILL file:
    csh% icfb -nograph
    This should print the desired message.
    A simple example of encrypting to a password is shown below:
    csh% icfb -nograph
    Note: This should create the password-protected encrypted file:
    "MyHelloWorld.ile".
    Note: Test by loading the encrypted SKILL file with the password:
    csh% icfb -nograph
    This should print the desired message.
    A simple example of incorporating your SKILL code into a context file:
    csh% cat > MyBuildContext.il <<EOF
    procedure(MyBuildContext(MyContext)
    setContext(MyContext)
    sstatus(writeProtect t)
    loadi(strcat(MyContext ".il"))
    saveContext(strcat(MyContext ".cxt"))
    callInitProc(MyContext)
    )
    MyBuildContext("MyHelloWorld")
    exit
    EOF
    Note: This should create a '/tmp/MyBuildContext.il' SKILL file.

    Then, create a simple IL context out of that file above:
    csh% icfb -ilLoadIL /tmp/MyBuildContext.il -nograph -log /tmp/Log$$
    This command should create a 'MyHelloWorld.cxt' context file.

    Which you can test after loading the context into your session:
    csh% icfb -nograph
    MyTestProc()
    This should execute the SKILL procedure & print the message.
     
    John Gianni, Mar 3, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.