Beispiel #1
0
def delete_globals(m, disconnect=False):
    '''
    Remove global instances, e.g. the core data type integer.
    '''
    filt = lambda sel: (247728914420827907967735776184937480192 <= sel.DT_ID <=
                        247728914420827907967735776184937480208)

    for s_dt in m.select_many('S_DT', filt):
        xtuml.delete(one(s_dt).PE_PE[8001](), disconnect)
        xtuml.delete(subtype(s_dt, 17), disconnect)
        xtuml.delete(s_dt, disconnect)
Beispiel #2
0
def delete_globals(m, disconnect=False):
    '''
    Remove global instances, e.g. the core data type integer.
    '''
    filt = lambda sel: (247728914420827907967735776184937480192 <= 
                        sel.DT_ID <= 
                        247728914420827907967735776184937480208)

    for s_dt in m.select_many('S_DT', filt):
        xtuml.delete(one(s_dt).PE_PE[8001](), disconnect)
        xtuml.delete(subtype(s_dt, 17), disconnect)
        xtuml.delete(s_dt, disconnect)
Beispiel #3
0
def mk_association(m, r_rel):
    '''
    Create a pyxtuml association from a R_REL in ooaofooa.
    '''
    handler = {
        'R_SIMP': mk_simple_association,
        'R_ASSOC': mk_linked_association,
        'R_SUBSUP': mk_subsuper_association,
        'R_COMP': mk_derived_association,
    }
    inst = subtype(r_rel, 206)
    fn = handler.get(inst.__class__.__name__)
    return fn(m, inst)
Beispiel #4
0
def mk_association(m, r_rel):
    '''
    Create a pyxtuml association from a R_REL in ooaofooa.
    '''
    handler = {
        'R_SIMP': mk_simple_association,
        'R_ASSOC': mk_linked_association,
        'R_SUBSUP': mk_subsuper_association,
        'R_COMP': mk_derived_association,
    }
    inst = subtype(r_rel, 206)
    fn = handler.get(inst.__class__.__name__)
    return fn(m, inst)
def generate_actions(m, c_c, s_sync):
    text = ''

    handler = {
        'R_SIMP': mk_simple_association_check,
        'R_ASSOC': mk_linked_association_check,
        'R_SUBSUP': mk_subsuper_association_check,
        'R_COMP': mk_derived_association_check,
    }

    filt = lambda sel: ooaofooa.is_contained_in(sel, c_c)
    for r_rel in m.select_many('R_REL', filt):
        inst = subtype(r_rel, 206)
        fn = handler.get(inst.__class__.__name__)
        text += fn(m, inst)

    o_objs = m.select_many('O_OBJ', filt)
    for o_id in many(o_objs).O_ID[104]():
        text += mk_unique_constraint_check(m, o_id)

    text += 'return True;'
    s_sync.Action_Semantics_internal = text
    s_sync.Suc_Pars = 1
def generate_actions(m, c_c, s_sync):
    text = ''
    
    handler = {
        'R_SIMP': mk_simple_association_check,
        'R_ASSOC': mk_linked_association_check,
        'R_SUBSUP': mk_subsuper_association_check,
        'R_COMP': mk_derived_association_check,
    }

    filt = lambda sel: ooaofooa.is_contained_in(sel, c_c)
    for r_rel in m.select_many('R_REL', filt):
        inst = subtype(r_rel, 206)
        fn = handler.get(inst.__class__.__name__)
        text += fn(m, inst)

    o_objs = m.select_many('O_OBJ', filt)
    for o_id in many(o_objs).O_ID[104]():
        text += mk_unique_constraint_check(m, o_id)
    
    text += 'return True;'
    s_sync.Action_Semantics_internal = text
    s_sync.Suc_Pars = 1
Beispiel #7
0
 def accept_V_VAL(self, inst):
     self.accept(subtype(inst, 801))
Beispiel #8
0
 def accept_ACT_SMT(self, inst):
     self.accept(subtype(inst, 603))
     self.buf_linebreak(';')
Beispiel #9
0
 def accept_V_VAL(self, inst):
     self.accept(subtype(inst, 801))
Beispiel #10
0
 def accept_ACT_SMT(self, inst):
     self.accept(subtype(inst, 603))
     self.buf_linebreak(';')
 def accept_PE_PE(self, inst):
     '''
     Packeable Element is the supertype of something packageable
     '''
     self.accept(subtype(inst, 8001))