Information Technology Reference
In-Depth Information
Hereafter we will focus on that model. Consider a user's system containing the files
HelloWorld.java
,
HelloWorld.cc
and the software components
javac,
NotePad, VI
and
JVM
, and suppose that we want to preserve the ability to edit,
read, compile and run these files. We will model these modules and their dependen-
cies using facts and rules. The digital files are modelled using facts while rules are
employed to represent tasks and dependencies. Moreover rules are used for defining
module and dependency type hierarchies (i.e.
JavaSourceCode
TextFile,
_edit
_read
). Below we provide the set of facts and rules that hold for the
above example in a human readable form.
1.
HelloWorld.java
is a
JavaSourceFile
2.
HelloWorld.cc
is a
C++SourceFile
3.
NotePad
is a
TextEditor
4.
VI
is a
TextEditor
5.
javac
is a
JavaCompiler
6.
JVM
is a
JavaVirtualMachine
7. Every
JavaSourceFile
is also a
TextFile
8. Every
C++SourceFile
is also a
TextFile
9. A
TextFile
is Editable if there is a
TextEditor
10. A
JavaSourceFile
is
JavaCompilable
if there is a
JavaCompiler
11. A
C++SourceFile
is
C++Compilable
if there is a
C++Compiler
12. A file is Readable if it is Editable
13. A file is Compilable if it is JavaCompilable
14. A file is Compilable if it is C++Compilable
Lines 1-6 are facts describing the digital objects while lines 7-14 are
rules denoting various tasks and how they can be carried out. In particular,
rules 7 and 8 define a hierarchy of module types (
JavaSourceFile
TextFile
and
C++SourceFile
TextFile
), while rules 12-14 define
a hierarchy of tasks (
Editable
Readable, JavaCompilable
Compilable
and
C++Compilable
Compilable
). Finally, rules
9-11 express which are the tasks that can be performed and which the dependencies
of these tasks are (i.e. the readability of a
TextFile
depends on the availability
of a
TextEditor
).
Using such facts and rules we model the modules and their dependencies based
on the tasks that can be performed. For example in order to determine the compi-
lability of
HelloWorld.java
we must use the rules 1,5,10,13. In order to read
the content of the same files we must use the rules 1,3,7,9,12. Alternatively (since
there are 2 text editors) we can perform the same task using the rules 1,4,7,9,12.
Using the terminology and syntax of Datalog [
118
] below we define in more
detail the modules and dependencies of this example.
Modules - Module Type Hierarchies
Modules are expressed as facts. Since we allow a very general interpretation of what
a module can be, there is no distinction between exchange objects and software