From 1ff98e82bcbca64fcc20a9d63dfee4dfc2b3a3fa Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 31 Aug 2006 00:59:31 +0000 Subject: [PATCH] add constraint check nodes to flat representation --- Robust/src/IR/Flat/BuildFlat.java | 16 +++++++++++++++- Robust/src/IR/Flat/FKind.java | 1 + Robust/src/IR/Flat/FlatCheckNode.java | 19 +++++++++++++++++++ Robust/src/IR/Tree/ConstraintCheck.java | 9 +++++++++ Robust/src/IR/Tree/SemanticCheck.java | 22 ++++++++++++++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Robust/src/IR/Flat/FlatCheckNode.java diff --git a/Robust/src/IR/Flat/BuildFlat.java b/Robust/src/IR/Flat/BuildFlat.java index 1b39c025..1828f9dd 100644 --- a/Robust/src/IR/Flat/BuildFlat.java +++ b/Robust/src/IR/Flat/BuildFlat.java @@ -735,7 +735,21 @@ public class BuildFlat { private NodePair flattenTaskExitNode(TaskExitNode ten) { FlatFlagActionNode ffan=new FlatFlagActionNode(true); updateFlagActionNode(ffan, ten.getFlagEffects()); - return new NodePair(ffan, ffan); + NodePair fcn=flattenConstraintCheck(ten.getChecks()); + ffan.addNext(fcn.getBegin()); + return new NodePair(ffan, fcn.getEnd()); + } + + private NodePair flattenConstraintCheck(Vector ccs) { + FlatNode begin=new FlatNop(); + FlatNode last=begin; + for(int i=0;i