overloading and data driven

Discussion in 'Perl Misc' started by bpatton, Nov 8, 2006.

  1. bpatton

    bpatton Guest

    I'm looking for some method that will allot the data to choose the
    function, not have a function decide if it is right for the data. I
    know this sounds very confusing, but I'll try and explain.

    I'm trying to write a language to represent some layout rules for the
    verification of physical layout data.
    my main goal is to create regression data from the rules
    The language is expected to have @ 100 words.
    An example and very simple
    MET1 spacing to CONT is >= 50

    2 layers (upper case) MET1 and CONT
    one function "spacing to"
    one operator >=
    one value 50
    and one filler word 'is'

    There are many more very complex statements.
    Standard programming
    if ($var1 eq 'spacing to'
    && ...
    && not (...

    This can get very hairy.
    I've looked at CLIPS where the facts are represented
    Here is an example of a clips fact
    (rule 2b1 MET1 spacing to cont >= 50)

    The rule
    (defrule xxx
    (rule ?rule ?l1 spacing to $l2 ?oper $val)
    =>
    do some neat stuff
    )

    In this example the data has selected the function, not a function
    looking at the data and deciding if it can use it through a series of
    if/then/else.
    It's also my concept of how lex/yacc might work. The data finds the
    correct function.

    lex/yacc would provide me with a strong syntax checker and provide the
    link with data driven function selection, bit I would like to stay away
    from compiled programs. Sooner or later I have to put a gui and a
    connection into Oracle for this bad puppy and I don't have a clue how
    all this will fit together.
     
    bpatton, Nov 8, 2006
    #1
    1. Advertising

  2. bpatton

    Bob Walton Guest

    bpatton wrote:
    > I'm looking for some method that will allot the data to choose the
    > function, not have a function decide if it is right for the data. I
    > know this sounds very confusing, but I'll try and explain.

    ....

    Your submission appears to have no Perl content. You might have better
    luck with your topic on a newsgroup better suited to it. This newsgroup
    is for the discussion of Perl.

    --
    Bob Walton
    Email: http://bwalton.com/cgi-bin/emailbob.pl
     
    Bob Walton, Nov 8, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Iyer, Prasad C

    Overloading __init__ & Function overloading

    Iyer, Prasad C, Sep 30, 2005, in forum: Python
    Replies:
    3
    Views:
    6,448
    Fredrik Lundh
    Sep 30, 2005
  2. Fredrik Lundh
    Replies:
    0
    Views:
    469
    Fredrik Lundh
    Sep 30, 2005
  3. Steve Holden
    Replies:
    0
    Views:
    451
    Steve Holden
    Sep 30, 2005
  4. Iyer, Prasad C
    Replies:
    4
    Views:
    600
    John J. Lee
    Sep 30, 2005
  5. Fredrik Lundh
    Replies:
    0
    Views:
    418
    Fredrik Lundh
    Sep 30, 2005
Loading...

Share This Page