object Theory extends OperationCollection
- Source
- Theory.scala
- Alphabetic
- By Inheritance
- Theory
- OperationCollection
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
Ops(implicit isabelle: Isabelle, ec: ExecutionContext): Ops
Returns an instance of type Ops.
Returns an instance of type Ops. It is guaranteed that for each instance
isabelle, exactly one instance ofObsis created (using theecfrom the first such invocation). (If you see this doc string in a class different from OperationCollection but no definition of the class Ops, treat this function as if it was private.)- Definition Classes
- OperationCollection
-
def
apply(path: Path)(implicit isabelle: Isabelle, ec: ExecutionContext): Theory
Retrieves a theory located at the path
path.Retrieves a theory located at the path
path.The
pathis interpreted relative to the Isabelle working directory (Isabelle.Setup.workingDirectory).If
pathends inX.thy, the theory will have the fully qualified nameDraft.X.Unqualified imports of the theory
Xare searched for in the same directory. Qualified imports must be findable according to the rules specified in apply(String).The note about thread-safety from apply(String) applies for this function, too.
-
def
apply(name: String)(implicit isabelle: Isabelle, ec: ExecutionContext): Theory
Retrieves a theory by its name.
Retrieves a theory by its name. E.g.,
Theory("HOL-Analysis.Inner_Product").namemust be the fully qualified name of the theory (with exception of "global theories" which have no qualifier, e.g.,Pure,Main,Complex_Main, ...).For a theory to be found, it needs to be included in the current session image (specified via the logic parameter in Isabelle.Setup), or the directory containing its that theory's session must be configured via registerSessionDirectoriesNow. The same requirements apply to all theories imported by the theory
name. (I.e., all theories required to executenamemust be either in the session image or registered via registerSessionDirectoriesNow.)ROOTandROOTSare not taken into account for finding the theories.Note: This function invokes
Thy_Info.use_thyin the Isabelle process. That function is not thread-safe. Therefore separate invocations ofapplywill not be executed in parallel. (Locking happens on Isabelle side, thus this function returns immediately anyway.) If you want to invokeThy_Info.use_thyor related functions yourself, please use Theory.mutex to avoid concurrent execution with this function. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
init()(implicit isabelle: Isabelle, executionContext: ExecutionContext): Unit
Makes sure an Ops instance for the instance
isabelleis initialized.Makes sure an Ops instance for the instance
isabelleis initialized. This is useful when code needs to be sure that the global initialization inside the Ops class has happened (e.g., declarations of ML types via Isabelle.executeMLCodeNow) even if it does not access any of the fields in the Ops class.Can safely be called several times with the same
isabelleand/orexecutionContext.- Definition Classes
- OperationCollection
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mergeTheories(theories: Theory*)(implicit isabelle: Isabelle, executionContext: ExecutionContext): Theory
Same as mergeTheories(theories = theories).
-
def
mergeTheories(mergedName: String = null, endTheory: Boolean = true, theories: Seq[Theory])(implicit isabelle: Isabelle, executionContext: ExecutionContext): Theory
Creates a new theory that imports several other theories.
Creates a new theory that imports several other theories. (Equivalent to
theory MergedTheoryName import Theory1 Theory2 Theory3 ... beginin Isabelle/Isar.)A typical use case would be to create a context that inherits from several theories at once, E.g., Context
(Theory.mergeTheories(theories=List(theory1, theory2, theory3))). (Or shorter: Context(mergeTheories(theory1, theory2, theory3)).)- mergedName
The unqualified name of the new theory. The default is an autogenerated unique (randomized) name.
- endTheory
Whether to the returned theory should be "finished" (analogue to the "end" command in Isabelle/Isar).
- theories
The theories to import
- returns
a theories inheriting from all theories
theories
-
def
mutex(implicit isabelle: Isabelle, executionContext: ExecutionContext): Mutex
A mutex (in the Isabelle process) for synchronizing non-threadsafe theory operations (e.g.,
Thy_Info.use_thy).A mutex (in the Isabelle process) for synchronizing non-threadsafe theory operations (e.g.,
Thy_Info.use_thy). This mutex is internally by operations in Theory. Use this mutex to avoid concurrent execution with the functions in Theory.- See also
Mutex.wrapWithMutex for a helper function to do locking with an Isabelle Mutex
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newOps(implicit isabelle: Isabelle, ec: ExecutionContext): Ops
Should construct an instance of type Ops
Should construct an instance of type Ops
- Attributes
- protected
- Definition Classes
- Theory → OperationCollection
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
registerSessionDirectories(paths: (String, Path)*)(implicit isabelle: Isabelle, ec: ExecutionContext): Future[Unit]
Like registerSessionDirectoriesNow but returns a Future.
Like registerSessionDirectoriesNow but returns a Future. Only once the future completes successfully, the session directories are guaranteed to have been registered.
-
def
registerSessionDirectoriesNow(paths: (String, Path)*)(implicit isabelle: Isabelle, ec: ExecutionContext): Unit
Registers session directories.
Registers session directories.
Each Isabelle session (such as
HOL,HOL-Library,FOL, ...) has one (or several) associated session directories that contain the theory files. (E.g., the session directory ofHOLis.../src/HOL, and thus the theoryHOL.Listis found in.../src/HOL/List.thy.) The session directories are configured in Isabelle via theROOTandROOTSfiles. Currently, however, scala-isabelle cannot read theROOT(S)files. Instead, session directories need to be registered with this function.More specifically:
- When Isabelle loads a theory
X.Y, andX.Yis in contained the session image (configured with Isabelle.Setup.logic), then the theory contained in the session image is used. (Conflicting session directory specifications will be ignored.) - Otherwise, the session directory
DforXis looked up, and the fileD/Y.thyis read. - Otherwise
Y.thyin the current directory is opened. - When a theory file is read, resolution of the imports of that theory is done the same way.
- One session can have several session directories, but one session directory must not be shared by several sessions
- paths
Pairs
(session, dir). Meaning thatdiris a session directory forsession.
- See also
- When Isabelle loads a theory
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
TheoryConverter extends Converter[Theory]
Representation of theories in ML.
Representation of theories in ML. (See the general discussion of Context, the same things apply to Theory.)
- ML type:
theory - Representation of theory
thyas an exception:E_Theory thy
Available as an implicit value by importing de.unruh.isabelle.pure.Implicits
._ - ML type: