diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-19 17:05:46 +0100 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-19 17:05:46 +0100 |
commit | 05205b0954b4b7ee3667f7c17bbb7d37b4040404 (patch) | |
tree | c147c5f03bfa8adc89807ceeb55257f5658d3ac4 | |
parent | 3513f271816618fc453738581889e677861473de (diff) | |
download | ACQuA-05205b0954b4b7ee3667f7c17bbb7d37b4040404.tar.gz ACQuA-05205b0954b4b7ee3667f7c17bbb7d37b4040404.zip |
fix(cli): pass data path to PAGOdA's properties
This is not the ideal way to deal with this an a more general
integration solution should be used. Regardless, it works for now.
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/acqua/Main.scala | 7 | ||||
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/acqua/util/AcquaConfig.scala | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/acqua/Main.scala b/src/main/scala/uk/ac/ox/cs/acqua/Main.scala index e4bdc87..b16f03a 100644 --- a/src/main/scala/uk/ac/ox/cs/acqua/Main.scala +++ b/src/main/scala/uk/ac/ox/cs/acqua/Main.scala | |||
@@ -40,6 +40,13 @@ object Acqua extends App { | |||
40 | val ontology = Ontology(ontopath, datapath).normalize(new Normalizer) | 40 | val ontology = Ontology(ontopath, datapath).normalize(new Normalizer) |
41 | 41 | ||
42 | val properties = new PagodaProperties() | 42 | val properties = new PagodaProperties() |
43 | /* TODO: find a better way to integrate CLI options from different | ||
44 | * tools. A good idea would be to have [[util.AcquaConfig]] handle the | ||
45 | * CLI and have methods to convert it into other "config" classes to | ||
46 | * use with tool-specific interfaces. | ||
47 | */ | ||
48 | if (config contains 'pagodata) | ||
49 | properties setDataPath config('pagodata).get[String] | ||
43 | 50 | ||
44 | val performMultiStages = true | 51 | val performMultiStages = true |
45 | val considerEqualities = true | 52 | val considerEqualities = true |
diff --git a/src/main/scala/uk/ac/ox/cs/acqua/util/AcquaConfig.scala b/src/main/scala/uk/ac/ox/cs/acqua/util/AcquaConfig.scala index ec550c2..5417b77 100644 --- a/src/main/scala/uk/ac/ox/cs/acqua/util/AcquaConfig.scala +++ b/src/main/scala/uk/ac/ox/cs/acqua/util/AcquaConfig.scala | |||
@@ -163,7 +163,7 @@ object AcquaConfig { | |||
163 | os.walk(data).filter(os.isFile).toList | 163 | os.walk(data).filter(os.isFile).toList |
164 | }else | 164 | }else |
165 | exit(s"'${_data}' is not a valid path.") | 165 | exit(s"'${_data}' is not a valid path.") |
166 | parse(tail, config += ('data -> files)) | 166 | parse(tail, config += ('data -> files) += ('pagodata -> _data)) |
167 | } | 167 | } |
168 | case a => exit(s"Invalid sequence of arguments '${a.mkString(" ")}'.") | 168 | case a => exit(s"Invalid sequence of arguments '${a.mkString(" ")}'.") |
169 | } | 169 | } |
@@ -201,6 +201,7 @@ object AcquaConfig { | |||
201 | } | 201 | } |
202 | case 'answers => Logger print s"Path to answers: ${v.get[os.Path]}" | 202 | case 'answers => Logger print s"Path to answers: ${v.get[os.Path]}" |
203 | case 'transitive => Logger print s"Include property chain axioms: ${v.get[Boolean]}" | 203 | case 'transitive => Logger print s"Include property chain axioms: ${v.get[Boolean]}" |
204 | case _ => { } | ||
204 | }} | 205 | }} |
205 | } | 206 | } |
206 | } | 207 | } |