loadTheoryFromFile

expect fun loadTheoryFromFile(path: String): Theory

Reads the file at path and parses its content as a Prolog Theory, using the default operator set and :parser-theory's clause parser (see it.unibo.tuprolog.theory.parsing.ClausesParser).

Called by TuPrologCmd for every -T/--theory file that isReadableFile deemed loadable.

Throws

if the file's content is not a syntactically valid theory.

Implemented per-platform: the JVM implementation reads the file via java.io.File and parses it with Theory.parse; the JS implementation currently throws NotImplementedError (TODO) and is not yet functional.

actual fun loadTheoryFromFile(path: String): Theory

JS implementation: not yet provided.

Throws

actual fun loadTheoryFromFile(path: String): Theory

JVM implementation: reads path's full content with File.readText and parses it via :parser-theory's Theory.parse extension.

Throws

if the file's content is not a syntactically valid theory.