-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # sadl3/com.ge.research.sadl.parent/com.ge.research.jena/lib/reasoner-api.jar # sadl3/com.ge.research.sadl.parent/com.ge.research.jena/lib/reasoner-impl.jar
- Loading branch information
Showing
189 changed files
with
15,853 additions
and
12 deletions.
There are no files selected for viewing
Binary file modified
BIN
-39 Bytes
(100%)
sadl3/com.ge.research.sadl.parent/com.ge.research.jena/lib/reasoner-api.jar
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
sadl3/com.ge.research.sadl.parent/com.ge.research.jena/lib/reasoner-impl.jar
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
...arch.sadl.parent/com.ge.research.sadl.documentation/Design/ArchitectureProcessErrors.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
<title>Insert title here</title> | ||
</head> | ||
<body> | ||
|
||
<h1>SADL Architecture, Translation, Execution, and Error Handling</h1> | ||
<h2>Architecture</h2> | ||
<h2>Translation, Execution, and Error Handling</h2> | ||
<p>The process of translating a SADL model into an OWL model happens in several | ||
distinct phases. </p> | ||
<ol> | ||
<li>When a model is loaded from a SADL file or when the modeler edits a model, | ||
the SADL expressions are parsed by the Xtext (ANTLR) parser. This may result | ||
in errors because the model statements do not comply with the grammar of the | ||
language. If the SADL file is open, these errors are reported by putting error | ||
markers in the Xtext editor. </li> | ||
<li>The parse tree created by the parser is processed by calls to the | ||
SadlModelManager. SadlModelManager translates parse tree nodes into instances | ||
of the classes belonging to the Intermediate Form (IF). The IF classes are | ||
generally found in the com.ge.research.sadl.model and | ||
com.ge.research.sadl.model.gp packages. Some additional errors may be | ||
discovered during this translation to IF.</li> | ||
<li>SadlModelManager passes the IF structures in calls to ModelManager. | ||
ModelManager uses this information to generate an OWL model defining classes, | ||
properties, instances, and triple statements. ModelManager also organizes | ||
certain IF structures to store rules and lists of queries, tests, and other | ||
SADL commands. At this point the OWL model, IF rules, etc. are only in memory. | ||
Calls to ModelManager may detect important errors as this is the first step at | ||
which semantics and not just syntax is checked. For example, it might be | ||
detected that an instance is given two values for a functional property.</li> | ||
<li>When the saved, the OWL model and the IF rules are passed to the IF | ||
Translator (implementation of ITranslator). The Translator saves the model and | ||
rules in the appropriate form for the target Reasoner. For example, if the | ||
target Reasoner (implementation of IReasoner) is Jena, the OWL model is simply | ||
written as an OWL model and the rules are translated to Jena rules and saved | ||
in a rule file with the same base name as the OWL model file but with ".rules" | ||
instead of ".owl" as the file extension. Errors generated at this phase will | ||
normally relate to the translation to the target representation. For example, | ||
an error would be generated if a built-in function is used in a rule but is | ||
not known to Jena reasoner (not in the configuration).</li> | ||
<li>A model may contain test and/or queries which can be executed via the Test | ||
Model command or a modeler may query the model interactively through the Run | ||
Query command. In either case, the target reasoner is instantiated via the | ||
ConfigurationManager and and the inferred model is used to evaluate the tests | ||
and queries. Additional errors may occur and be reported. The results of | ||
executing tests and queries, along with any errors encountered, are generally | ||
reported with messages to the console window. Where appropriate, these | ||
messages are hyperlinked to the SADL model file statement containing the test | ||
or query. Errors at this stage are not generally related to translation but to | ||
model content.</li> | ||
</ol> | ||
|
||
</body> | ||
</html> |
100 changes: 100 additions & 0 deletions
100
...esearch.sadl.parent/com.ge.research.sadl.documentation/Design/BuildConfigMgrSSMAndMM.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<h1>SadlBuilder, ConfigurationManager, SadlModelManager, and ModelManager</h1> | ||
<h2>Working with SadlBuilder</h2> | ||
<p>The title classes must work together efficiently and with Jena's OntModel to | ||
allow the IDE to achieve it's functional objectives. This has proven to be a | ||
difficult part of the SADL-IDE to get right in version 2, and moving to Eclipse | ||
3.7, Xtext 2.1 has not made the issues go away.</p> | ||
<p>SadlBuilder appears to be multi-threaded (?). Editors appear to each have | ||
their own thread(?).</p> | ||
<p>There appears to be only one instance of SadlModelManager(SMM) used by all. | ||
However, we need a ModelManager (MM) for each model being edited/built. Hence | ||
the SMM keeps track of MMs by thread (SMM.getModel()).</p> | ||
<p>It was discovered that cleaning a Jena OntModel and reusing it leads to all | ||
kinds of leftover baggage such as prefix mappings. Therefore, when a MM is | ||
initialized if the Resource is not the same as the last Resource, a new Jena | ||
OntModel is created. Should the old OntModel be forcibly removed?</p> | ||
<p>If an instance of MM keeps all the model-specific stuff, then only a single | ||
ConfigurationManager should be needed per project. Note that Xtext will | ||
sometimes call JavaValidator, which uses ConfigurationManager, without any | ||
context. However, I think we can assume that the project is the same as the last | ||
call.</p> | ||
<p>Getting the names in a namespace for Xtext (resolver, validator, etc.) has | ||
been partially moved to ConfigurationManagerForIDE as many calls will happen for | ||
models for which there is no MM but there is an OWL model in the Jena model | ||
cache. This seems to work well.</p> | ||
<p>A big issue seems to be whether to create a new Jena OntModel on each | ||
initialization of MM or clean up the existing one by removing all content. Doing | ||
the former may cause a lot of memory to be waiting for garbage collection? But | ||
would the latter be much better? Just saving the OntModel structure itself? And | ||
besides, it may be the case that the former OntModel is useful to have in the | ||
cache as other models may import it... When to clear a model from the cache is a | ||
separate and somewhat independent issue I think. Perhaps what is needed is, | ||
after a build or when an editor window closes, to call "close()" on any OntModel | ||
not in the dependency list of an open editor window's model.</p> | ||
<p>Cleaning model, now that I can do it (ConfigurationManagerForIDE.clearJenaModelContent(model)) | ||
results in errors.</p> | ||
<h2>Working with Editors</h2> | ||
<p>Threads do not appear to be the reliable way to associate a MM with a URI.</p> | ||
<p>SMM gets called from these places:</p> | ||
<ol> | ||
<li>getConfigurationMgr(modelFolder) -- there is a ConfigurationManger for | ||
each URI (model folder). Called from SadlJavaValidator.checkImport, | ||
SadlResourceNameTemplateVariableResolver.resolveValues(),</li> | ||
<li>build-dependency -- this doesn't need to build a complete model, just get | ||
the imports; calls SMM.init, then doSwitch until all imports are found..</li> | ||
<li>build-resource -- this needs to build a complete OntModel as this model is | ||
then written to disk as the OWL file; call is to SMM.processModel (complete).</li> | ||
<li>semantic highlighting -- this is called each time a change is made to the | ||
model in the editor so the complete OntModel should be built so that errors | ||
will be detected and marked. Call is to SMM.processModel.</li> | ||
<li>getNamedConceptsInNamedModel -- call is from JeanResource.doLoad (SadlGlobalScopeProvider); | ||
first a call to get the names and then a call to validateConceptName for each | ||
name to get its type.</li> | ||
<li>getModelImportMappings -- call is from SadlGlobalScopeProvider.getScope, | ||
which calls createJenaScope, which results in the call above for each model? | ||
</li> | ||
<li>getAltUrl -- call is from SadlImportUriResolver.resolve, | ||
SadlJavaValidator.checkModelName, </li> | ||
<li>getPendingError(name) -- call from SadlJavaValidator to get and report | ||
errors</li> | ||
<li>getNamedConceptsOfType(type) -- called from | ||
SadlProposalProvider.completeResourceByName_Name to give a list of possible | ||
names for the context, called by SadlResourceNameTemplate after processing | ||
parser results</li> | ||
<li>getModelResource() -- to help find the appropriate preferences, from | ||
multiple locations</li> | ||
<li>setImportListType() -- to say whether import suggestions will be files or | ||
URIs</li> | ||
<li>called from RunQuery, TestModel, TestSuite</li> | ||
</ol> | ||
<h3>Modifications</h3> | ||
<ol> | ||
<li>build-dependency does not need to call SMM--it can just get dependencies | ||
from the parse tree and then stop iterating</li> | ||
<li>validateStatement was taking a huge amount of time so added preference | ||
deepValidationOnBuild, deepValidation field in MM (<b><font color="#FF0000">not | ||
yet connected</font></b>)</li> | ||
<li><b><font color="#FF0000">TODO</font></b>: only import defaults.owl if it | ||
is used in the model.</li> | ||
<li>Once the imports section of a model is past, the imports will be | ||
unchanging and can be cached (importsAndPrefixes in MM).</li> | ||
<li>Efficiency at finding names would be improved by keeping an ordered list | ||
of namespaces with the most fruitful first</li> | ||
<li>Is it ever the case that we want the MM retained in SMM after the call to | ||
end()?</li> | ||
<li><b><font color="#FF0000">ToDo:</font> </b>Need to replace model on editor | ||
close without save on changed model and unload so that any unsaved changes | ||
will be gone.</li> | ||
<li>Circular imports (TestSadlIde) seem to have gone awry. The idea is to | ||
remove the submodel of the imported model loaded from OWL so that the current | ||
model created from the SADL can be used instead ??</li> | ||
</ol> | ||
<p>At the end of the day, a single run with and without deep validation ran a | ||
complete build on InScope in 159,591 ms and 158,669 ms, respectively. So I think | ||
things are better...</p> | ||
<font SIZE="2"></font> | ||
<h3>1/4/2011: Ready for 2.0.0 Release?</h3> | ||
<p>Found out how to determine if an editor is open on a Resource, which lead to | ||
adding a listener for when it closed to SHC. </p> | ||
<p>OWL to SADL fails on manufacturability files in known area of problems--any | ||
restrictions that are compound or complex.</p> |
5 changes: 5 additions & 0 deletions
5
sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.documentation/Design/CVS/Entries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/ArchitectureProcessErrors.html/1.1/Sat Dec 18 12:46:05 2010// | ||
/BuildConfigMgrSSMAndMM.html/1.1/Wed Jan 4 19:24:11 2012// | ||
/Imports.html/1.1/Fri Jun 3 20:11:51 2011// | ||
/TowardAnEnglish-likeRepresentationV5.doc/1.1/Thu May 19 19:32:36 2011/-kb/ | ||
/configuration.rdf/1.1/Fri Dec 10 21:25:05 2010// |
1 change: 1 addition & 0 deletions
1
sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.documentation/Design/CVS/Repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SADL_OS/Design |
1 change: 1 addition & 0 deletions
1
sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.documentation/Design/CVS/Root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:extssh:[email protected]:/cvsroot/sadlos |
97 changes: 97 additions & 0 deletions
97
sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.documentation/Design/Imports.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<html> | ||
<body> | ||
<h1> | ||
Imports in SADL Version 2</h1> | ||
<h6> | ||
Last revised | ||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%m/%d/%Y" startspan -->06/03/2011<!--webbot bot="Timestamp" endspan i-checksum="12539" -->.</h6> | ||
<h2> | ||
Aliases</h2> | ||
<p> | ||
An OWL model can import other OWL models, which can import other OWL models, | ||
etc. This owl:imports functionality is critical to modularity and model reuse. | ||
In SADL we will assume that each separate SADL model will have its own unique | ||
XML namespace, which is specified as the first non-comment line in a SADL | ||
file--the "uri" statement.<p> | ||
One of the benefits of using XML namespaces is the non-uniqueness of names; the | ||
same name in different namespaces is unambiguously different. However, for names | ||
which appear in different namespaces to be specified unambiguously in SADL they | ||
must be referred to in some way that disambiguates the namespace. This is done | ||
through the use of namespace prefixes or aliases as we will call them in SADL. | ||
|
||
<p> | ||
There are two ways of specifying the alias that corresponds to a particular | ||
namespace. The prefix may be specified for the entire project by including it as | ||
part of the declaration of the model name on the first statement in the model. | ||
For example:<blockquote> | ||
<u><font SIZE="2" COLOR="#800080"> | ||
<p>uri</font><font SIZE="2"> <b>"http://com.ge.research.sadl/decl1"</b> </font> | ||
<font SIZE="2" COLOR="#800080">alias</font><font SIZE="2"> decl1. </p> | ||
</font></u> | ||
</blockquote> | ||
<p> | ||
The other way specifies a local alias for use only in the importing model. | ||
(Since SADL doesn't support multiple namespaces in a single model file an alias | ||
is only needed if a model imports multiple models with the same XML name | ||
fragment or local name.) This is done as part of the import statement:<blockquote> | ||
<font SIZE="2" COLOR="#800080"> | ||
<p ALIGN="LEFT">import</font><font SIZE="2"> <b>"http://com.ge.research.sadl/decl1"</b> | ||
</font><font SIZE="2" COLOR="#800080">as</font><font SIZE="2"> d1. </p> | ||
</font> | ||
</blockquote> | ||
<h2> | ||
Import Management</h2> | ||
<p> | ||
Imports in the development (IDE) environment will use Jena to actually do the imports and | ||
will create an "ont-policy.rdf" file in the OwlModels folder which will contain an RDF | ||
model of imports. This file will contain the mapping between a model name (publicURI) and the actual location | ||
(altURL) of the model. Mappings are project-specific. The SadlModelManager will | ||
keep track of the mappings for each open project using a project-specific Jena | ||
LocationMapper. | ||
|
||
<p> | ||
In a new project or in a SADL Version 1 project loaded for the first time into | ||
Version 2, a template "ont-policy.rdf" file is copied to the project's OwlModels | ||
folder when it is found not to exist. At this time all SADL files in the project | ||
are scanned to determine their model name (publicURI) and their altURL is | ||
determined from the SADL file name and the OwlModels folder location. A project | ||
clean will also update all mappings of SADL models in the project in the | ||
ont-policy.rdf file. This establishes an initial valid condition for all | ||
mappings of SADL models and this information is used for all imports of models | ||
by other models in the project. When a valid SADL model is saved, the OWL model | ||
equivalent of the SADL model is saved to the OwlModels folder. Unless the model | ||
is without a name, which is an error condition, the mapping information for the | ||
OWL model is known at save time. This mapping information is passed to the | ||
ConfigurationManagaerForIDE instance for the current project. The | ||
ConfigurationManagerForIDE does two things: 1) updates the project's | ||
LocationMapper with the new information, and 2) updates the ont-policy.rdf file. | ||
The new information could be an entirely new mapping or it could be the change | ||
in a model's name (publicURI) or a change in a model's file name (altURL). If | ||
both are changed before a model is saved an old mapping may be left in the | ||
LocationMapper and in the ont-policy.rdf file, which will be removed on the next | ||
project clean. Entries in the ont-policy.rdf file for OWL files generated from | ||
SADL models will contain the "createdBy" property with value "SADL". This allows | ||
us to clean up obsolete SADL model mappings as we will be able to detect a | ||
mapping for which there is no longer a valid file.<p> | ||
One important difference between the SADL use of | ||
the ont-policy.rdf mapping file and normal Jena use is that the actual file URLs of SADL-generated OWL | ||
models will be used by ConfigurationManager only to determine the name of the OWL file. The | ||
path to the file will be the same as the actual location of the ont-policy.rdf file itself. | ||
This allows the OwlModels folder to be moved from one location to another without the need | ||
to edit the ont-policy.rdf file. Of course the "altURL" values of other OWL models used but not | ||
created by the SADL-IDE will need to be edited if the resources are moved. | ||
Consequently, the Jena document manager's setMetadataSearchPath method is never | ||
used as it would load the mappings directly from the ont-pollicy.rdf file to a | ||
LocationMapper without correcting the altURL entries for the current location of | ||
the OwlModels folder. Instead, the ConfigurationManager loads the mappings from | ||
the ont-policy.rdf file into the project's LocationMapper and subsequent calls | ||
to the ConfigurationManagerForIDE keep the mappings up-to-date.<p> | ||
In a SADL-IDE environment, a SADL model may be edited and saved, creating a new OWL model | ||
while an importing SADL model file is open. To manage updating of imported models, a timestamp | ||
will be created and remembered when an import is processed. The next time the import is | ||
processed, e.g., at the re-parsing of the open SADL file, the last-modified date of an | ||
imported model will be compared to this timestamp and if necessary the imported file will | ||
be removed from the Jena model cache and reloaded. | ||
|
||
</body> | ||
</html> |
Binary file added
BIN
+89 KB
...parent/com.ge.research.sadl.documentation/Design/TowardAnEnglish-likeRepresentationV5.doc
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
...3/com.ge.research.sadl.parent/com.ge.research.sadl.documentation/Design/configuration.rdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<rdf:RDF | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns="http://com.ge.research.sadl.configuration#" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> | ||
<Category rdf:about="http://com.ge.research.sadl.configuration#Builtins"> | ||
<noValue>com.ge.research.sadl.geonly.jena.builtin.NoValue</noValue> | ||
</Category> | ||
</rdf:RDF> |
1 change: 1 addition & 0 deletions
1
....research.sadl.parent/com.ge.research.sadl.documentation/PresentationsAndMisc/CVS/Entries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/SemanticModeling.ppt/1.2/Tue Jan 28 13:19:18 2014/-kb/ |
1 change: 1 addition & 0 deletions
1
...search.sadl.parent/com.ge.research.sadl.documentation/PresentationsAndMisc/CVS/Repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SADL_OS/PresentationsAndMisc |
1 change: 1 addition & 0 deletions
1
....ge.research.sadl.parent/com.ge.research.sadl.documentation/PresentationsAndMisc/CVS/Root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:extssh:[email protected]:/cvsroot/sadlos |
Binary file added
BIN
+429 KB
....sadl.parent/com.ge.research.sadl.documentation/PresentationsAndMisc/SemanticModeling.ppt
Binary file not shown.
Oops, something went wrong.