Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research:jtransformer:tutorial_old:error_tolerance [2011/12/17 00:34]
Günter Kniesel
research:jtransformer:tutorial_old:error_tolerance [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Handling Incomplete Programs ======
 +Since version 2.6.3 JTransformer creates [[..:​api:​java:​pefs:​2.9:​java_pef_overview|PEFs]] even 
 +if a project contains Java compilation errors because of unresolved imports. ​
 +Being able to analyse and transform source code with missing dependencies ​
 +is especially usefull when only parts of a large project are available to the user
 +or analysis of complete projects would be too time consuming because of their size. 
 +==== Turning Error-Tolerant Fact Creation On/Off ===
 +Error-tolerant fact creation is turned on by default. ​
 +To turn it off for a particular JTransformer project ​
 +right click on the project, select "​Properties"​ from 
 +the context menu and then select "​JTransformer"​. ​
 +Here you must first enable project-specific settings
 +and then (de)select "​Ignore unresolved dependencies"​.
 +==== Handling Unresolved Java elements ====
 +When ignoring of unresolved dependencies is turned on and
 +JTransformer encounters an unresolvable reference it: 
 +  - lets Eclipse report the respective compilation error
 +  - creates nevertheless the fact containing the unresolvable reference. ​
 +  - replaces the reference in the fact by a unary function term **''​unresolved(name)''​**. ​
 +Its ''​name''​ argument is the unresolvable name, as demonstrated by the following example:
 +|  {{unresolved_source.png|}} ​ |  {{unresolved_factbaseview.png|}} ​ |
 +| Source with unresolvable names  | Generated [[..:​api:​java:​pefs:​2.9:​java_pef_overview|PEFs]] viewed in the [[factbase_inspector|Factbase Inspector]] |
 +Because the //​com.nothere.*//​ package cannot be resolved, Eclipse adds an error
 +marker at the import command and at each place where the //NotHere// class from 
 +the unresolved package is referenced. ​
 +Although not illustated in the above screenshot, note that in spite of the error 
 +marker attached to the Java project in the Package Explorer the JT icon remains ​
 +green, signaling that the fact creation has completed succesfully.
 +The FBI view of the generated facts shows that unresolvable names
 +//​com.nothere.*//​ and  //NotHere// have been replaced by the dummy 
 +IDs ''​unresolved('​com.nothere.*'​)''​ and 
research/jtransformer/tutorial_old/error_tolerance.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019