diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-04 11:11:57 +0100 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-04 11:11:57 +0100 |
commit | e8518528a77edf6a28449a57bd96048a6232a5db (patch) | |
tree | 1dca0e5f8cb1b465e85096f4e5699dd75e77b0f0 /src/main/scala/rsacomb/SkolemStrategy.scala | |
parent | 88597503975804e3cb83d116f3cc9a3f12c57461 (diff) | |
download | RSAComb-e8518528a77edf6a28449a57bd96048a6232a5db.tar.gz RSAComb-e8518528a77edf6a28449a57bd96048a6232a5db.zip |
Adapt LP conversion to RSA check
Part of the process involves the search of unsafe roles in the input
ontology. This is still to be implemented and for now the set of unsafe
roles for the testing example is hardcoded.
Diffstat (limited to 'src/main/scala/rsacomb/SkolemStrategy.scala')
-rw-r--r-- | src/main/scala/rsacomb/SkolemStrategy.scala | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main/scala/rsacomb/SkolemStrategy.scala b/src/main/scala/rsacomb/SkolemStrategy.scala index 9df167f..bcf6828 100644 --- a/src/main/scala/rsacomb/SkolemStrategy.scala +++ b/src/main/scala/rsacomb/SkolemStrategy.scala | |||
@@ -29,7 +29,7 @@ object SkolemStrategy { | |||
29 | def genFunctionString(str : String) = "f_" ++ str.hashCode.toString | 29 | def genFunctionString(str : String) = "f_" ++ str.hashCode.toString |
30 | } | 30 | } |
31 | 31 | ||
32 | /* Functional skolemization | 32 | /* Constant skolemization |
33 | * | 33 | * |
34 | * From | 34 | * From |
35 | * A ⊑ ∃R.B | 35 | * A ⊑ ∃R.B |
@@ -42,5 +42,21 @@ object SkolemStrategy { | |||
42 | def apply(axiom : String) = new Constant(genConstantString(axiom)) | 42 | def apply(axiom : String) = new Constant(genConstantString(axiom)) |
43 | def genConstantString(str : String) = "internal:c_" ++ str.hashCode.toString | 43 | def genConstantString(str : String) = "internal:c_" ++ str.hashCode.toString |
44 | } | 44 | } |
45 | |||
46 | /* (RSA) Constant skolemization | ||
47 | * This is a special skolemization option to introduce additional atoms for RSA | ||
48 | * checking algorithm. | ||
49 | * | ||
50 | * From | ||
51 | * A ⊑ ∃R.B | ||
52 | * to | ||
53 | * A(y) -> R(x,c), PE(x,c), B(c) | ||
54 | * for c, fresh constant associated with the input axiom and PE an internal predicate. | ||
55 | */ | ||
56 | case class ConstantRSA(const : String) extends SkolemStrategy | ||
57 | object ConstantRSA { | ||
58 | def apply(axiom : String) = new ConstantRSA(genConstantString(axiom)) | ||
59 | def genConstantString(str : String) = "internal:c_" ++ str.hashCode.toString | ||
60 | } | ||
45 | } | 61 | } |
46 | 62 | ||