[ClavaLaraApi] Adds ScgNodeData.hasImplementation()
laraImport("lara.graphs.NodeData");
class ScgNodeData extends NodeData {
-
// The function represented by this node
#function;
constructor($function) {
super();
- this.#function = $function;
+
+ // Should use only canonical functions
+ this.#function = $function.canonical;
}
get function() {
@@ -17,4 +18,11 @@ class ScgNodeData extends NodeData {
toString() {
return this.#function.signature;
}
+
+ /**
+ * @returns true, if the function represented by this node has an available implementation, false otherwise
+ */
+ hasImplementation() {
+ return this.#function.isImplementation;
+ }
}
