| summaryrefslogtreecommitdiff |
path: root/ast-to-instr
diff options
Diffstat (limited to 'ast-to-instr')
| -rw-r--r-- | ast-to-instr/src/VHDLNode.java | 14 | ||||
| -rw-r--r-- | ast-to-instr/src/VHDLProcess.java | 56 | ||||
| -rw-r--r-- | ast-to-instr/src/VHDLSSASNode.java | 23 |
3 files changed, 31 insertions, 62 deletions
diff --git a/ast-to-instr/src/VHDLNode.java b/ast-to-instr/src/VHDLNode.java index b05f08c..36ba028 100644 --- a/ast-to-instr/src/VHDLNode.java +++ b/ast-to-instr/src/VHDLNode.java @@ -69,6 +69,13 @@ public abstract class VHDLNode extends ParsableXML Strings.get_id_from_string(Integer.toString(i)), elements.get(i) ); + + Predicates.add_entry + ( + "is_accessed_by", + elements.get(i), + parent_id + ); } } @@ -111,6 +118,13 @@ public abstract class VHDLNode extends ParsableXML Strings.get_id_from_string(Integer.toString(i)), elements.get(i) ); + + Predicates.add_entry + ( + "is_accessed_by", + elements.get(i), + parent_id + ); } } } diff --git a/ast-to-instr/src/VHDLProcess.java b/ast-to-instr/src/VHDLProcess.java index 1146f3f..2eae165 100644 --- a/ast-to-instr/src/VHDLProcess.java +++ b/ast-to-instr/src/VHDLProcess.java @@ -10,7 +10,6 @@ import java.util.Stack; public class VHDLProcess extends ParsableXML { private static final XPathExpression XPE_FIND_SL_ELEMENTS; - private static final XPathExpression XPE_FIND_NE_IN_PROCESS; private static final XPathExpression XPE_FIND_START_NODE; static @@ -21,12 +20,6 @@ public class VHDLProcess extends ParsableXML "(./sensitivity_list/el/named_entity | ./sensitivity_list/el[@ref])" ); - XPE_FIND_NE_IN_PROCESS = - XMLManager.compile_or_die - ( - ".//*[@kind=\"simple_name\"]/named_entity" - ); - XPE_FIND_START_NODE = XMLManager.compile_or_die ( @@ -80,7 +73,6 @@ public class VHDLProcess extends ParsableXML handle_predicate_is_explicit_process(local_id); handle_predicate_is_in_sensitivity_list(local_id); - handle_predicate_is_accessed_by(local_id); /** Children ************************************************************/ handle_child_node(local_id, waiting_list); @@ -407,54 +399,6 @@ public class VHDLProcess extends ParsableXML } } - private void handle_predicate_is_accessed_by - ( - final IDs local_id - ) - throws XPathExpressionException - { - final NodeList items; - final int items_count; - - items = - (NodeList) XPE_FIND_SL_ELEMENTS.evaluate - ( - xml_node, - XPathConstants.NODESET - ); - - items_count = items.getLength(); - - for (int i = 0; i < items_count; ++i) - { - final String xml_id; - - xml_id = - XMLManager.get_attribute - ( - items.item(i), - "ref" - ); - - if (!Main.node_is_function_or_literal(xml_id)) - { - Predicates.add_entry - ( - "is_accessed_by", - Waveforms.get_associated_waveform_id - ( - IDs.get_id_from_xml_id - ( - xml_id, - null - ) - ), - local_id - ); - } - } - } - /***************************************************************************/ /** Children ***************************************************************/ /***************************************************************************/ diff --git a/ast-to-instr/src/VHDLSSASNode.java b/ast-to-instr/src/VHDLSSASNode.java index 944ad18..fd43f28 100644 --- a/ast-to-instr/src/VHDLSSASNode.java +++ b/ast-to-instr/src/VHDLSSASNode.java @@ -170,6 +170,7 @@ public class VHDLSSASNode extends VHDLNode ) throws XPathExpressionException { + final IDs target_id; Node target; target = @@ -221,11 +222,7 @@ public class VHDLSSASNode extends VHDLNode ); } - Predicates.add_entry - ( - output, - "expr_writes", - local_id, + target_id = Waveforms.get_associated_waveform_id ( IDs.get_id_from_xml_id @@ -233,7 +230,21 @@ public class VHDLSSASNode extends VHDLNode XMLManager.get_attribute(target, "id"), (String) null ) - ) + ); + + Predicates.add_entry + ( + output, + "expr_writes", + local_id, + target_id + ); + + Predicates.add_entry + ( + "is_accessed_by", + target_id, + parent_id ); } |


