summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-05-29 15:11:29 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-05-29 15:11:29 +0200
commit7633ea659a37ee06c80076f32505b0b584a89c7e (patch)
tree5290ead54cba0227a36b35ce3b0e5c2b459b5826
parent2354098a6d9120852eaad36fa520bab4569dfc81 (diff)
downloadhastabel-7633ea659a37ee06c80076f32505b0b584a89c7e.zip
hastabel-7633ea659a37ee06c80076f32505b0b584a89c7e.tar.bz2
Should fix missing relevant signatures.
-rw-r--r--src/hastabel/GraphToFirstOrder.java4
-rw-r--r--src/hastabel/PropertyParser.g416
-rw-r--r--src/hastabel/lang/Predicate.java18
3 files changed, 33 insertions, 5 deletions
diff --git a/src/hastabel/GraphToFirstOrder.java b/src/hastabel/GraphToFirstOrder.java
index 71144fc..a2db1b9 100644
--- a/src/hastabel/GraphToFirstOrder.java
+++ b/src/hastabel/GraphToFirstOrder.java
@@ -123,9 +123,9 @@ public class GraphToFirstOrder
{
is_before.add_member_
(
+ path_e,
path.nodes.get(j).get_element(),
- n_i,
- path_e
+ n_i
);
}
}
diff --git a/src/hastabel/PropertyParser.g4 b/src/hastabel/PropertyParser.g4
index 051ba1a..a495135 100644
--- a/src/hastabel/PropertyParser.g4
+++ b/src/hastabel/PropertyParser.g4
@@ -115,13 +115,19 @@ id_or_string_or_fun [Variable current_node]
|
STRING
{
+ final Type string_type;
+
$value =
WORLD.get_strings_manager().get_string_as_element(($STRING.text));
- if (($value) == null)
+ string_type = WORLD.get_types_manager().get("string");
+
+ if ((($value) == null) || (string_type == null))
{
WORLD.invalidate();
}
+
+ string_type.mark_as_used();
}
|
@@ -155,13 +161,19 @@ id_or_string_or_fun_or_joker [Variable current_node]
|
STRING
{
+ final Type string_type;
+
$value =
WORLD.get_strings_manager().get_string_as_element(($STRING.text));
- if (($value) == null)
+ string_type = WORLD.get_types_manager().get("string");
+
+ if ((($value) == null) || (string_type == null))
{
WORLD.invalidate();
}
+
+ string_type.mark_as_used();
}
|
diff --git a/src/hastabel/lang/Predicate.java b/src/hastabel/lang/Predicate.java
index fceed3c..2cdafb0 100644
--- a/src/hastabel/lang/Predicate.java
+++ b/src/hastabel/lang/Predicate.java
@@ -67,6 +67,22 @@ public class Predicate
{
members.add(elements);
}
+ else
+ {
+ System.err.print
+ (
+ "[E] The predicate "
+ + name
+ + " has no signatures accepting ("
+ );
+
+ for (final Element elt: elements)
+ {
+ System.err.print(" " + elt.get_name());
+ }
+
+ System.err.println(").");
+ }
}
public Type get_function_type ()
@@ -585,7 +601,7 @@ public class Predicate
public boolean is_used ()
{
- return is_used_as_predicate || is_used_as_function;
+ return (is_used_as_predicate || is_used_as_function);
}
public boolean is_used_as_predicate ()