From d1dce81bfd31633476980542b3b301b5340d3f0d Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 28 Jul 2004 22:11:10 +0000 Subject: [PATCH] Added new file. --- .../MCC/IR/AbstractInterferes.java | 35 ++++++++------- .../RepairCompiler/MCC/IR/AbstractRepair.java | 4 +- Repair/RepairCompiler/MCC/IR/ExactSize.java | 13 +++--- .../RepairCompiler/MCC/IR/RelationExpr.java | 4 +- Repair/RepairCompiler/MCC/IR/SizeObject.java | 43 +++++++++++++++++++ Repair/RepairCompiler/MCC/IR/Termination.java | 16 +++---- 6 files changed, 82 insertions(+), 33 deletions(-) create mode 100755 Repair/RepairCompiler/MCC/IR/SizeObject.java diff --git a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java index 2fe4aef..a4c1ba3 100755 --- a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java +++ b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java @@ -9,8 +9,9 @@ class AbstractInterferes { } /** Does performing the AbstractRepair ar satisfy (or falsify if satisfy=false) - * Rule r */ - static public boolean interferes(AbstractRepair ar, Rule r, boolean satisfy) { + * Rule r. */ + + static public boolean interfereswithrule(AbstractRepair ar, Rule r, boolean satisfy) { boolean mayadd=false; boolean mayremove=false; switch (ar.getType()) { @@ -60,7 +61,7 @@ class AbstractInterferes { /** Does performing the AbstractRepair ar falsify the predicate dp */ - public boolean interferes(AbstractRepair ar, DNFPredicate dp) { + public boolean interfereswithpredicate(AbstractRepair ar, DNFPredicate dp) { if ((ar.getDescriptor()!=dp.getPredicate().getDescriptor()) && ((ar.getDescriptor() instanceof SetDescriptor)|| !dp.getPredicate().usesDescriptor((RelationDescriptor)ar.getDescriptor()))) @@ -149,8 +150,6 @@ class AbstractInterferes { return false; } - - /* Translate the opcodes */ op1=Opcode.translateOpcode(neg1,op1); op2=Opcode.translateOpcode(neg2,op2); @@ -288,10 +287,10 @@ class AbstractInterferes { return true; } - /** Does the increase (or decrease) in scope of a model defintion rule represented by sn - * falsify the predicate dp */ + /** Does the increase (or decrease) in scope of a model defintion + * rule represented by sn falsify the predicate dp. */ - public boolean interferes(ScopeNode sn, DNFPredicate dp) { + public boolean scopeinterfereswithpredicate(ScopeNode sn, DNFPredicate dp) { if (!sn.getSatisfy()&&(sn.getDescriptor() instanceof SetDescriptor)) { Rule r=sn.getRule(); Set target=r.getInclusion().getTargetDescriptors(); @@ -326,10 +325,10 @@ class AbstractInterferes { return interferes(sn.getDescriptor(), sn.getSatisfy(),dp); } - /** Does increasing (or decreasing if satisfy=false) the size of the set or relation des - * falsify the predicate dp */ + /** Does increasing (or decreasing if satisfy=false) the size of + * the set or relation des falsify the predicate dp. */ - public boolean interferes(Descriptor des, boolean satisfy, DNFPredicate dp) { + private boolean interferes(Descriptor des, boolean satisfy, DNFPredicate dp) { if ((des!=dp.getPredicate().getDescriptor()) && ((des instanceof SetDescriptor)|| !dp.getPredicate().usesDescriptor((RelationDescriptor)des))) @@ -391,7 +390,13 @@ class AbstractInterferes { return true; } - static public boolean interferesquantifier(Descriptor des, boolean satisfy, Quantifiers r, boolean satisfyrule) { + /** This method test whether satisfying (or falsifying depending + * on the flag satisfy) a rule that adds an object(or tuple) to + * the set(or relation) descriptor may increase (or decrease + * depending on the flag satisfyrule) the scope of a constraint or + * model defintion rule r. */ + + static private boolean interferesquantifier(Descriptor des, boolean satisfy, Quantifiers r, boolean satisfyrule) { for(int i=0;i