spechub / Hets

The Heterogeneous Tool Set
http://hets.eu
GNU General Public License v2.0
57 stars 19 forks source link

URL catalog #1177

Closed sternk closed 10 years ago

sternk commented 10 years ago

Reported by till and assigned to maeder Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177


implement a command line option

hets -C source_url1=target_url1,...,source_urln=target_urln

or

hets -C file

where file contains

source_url1=target_url1
...
source_urln=target_urln

such that before each url download, each source url (also as a prefix) is substituted by the corresponding target url. See spechub/Hets:Driver/Options.hs and spechub/Hets:Static/AnalysisLibrary.hs

sternk commented 10 years ago

Comment by till Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:1


Dear Christian, we need this urgently, and the student has not provided any code. Could you implement this? Many thanks, Till

sternk commented 10 years ago

Comment by maeder Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:2


With my recent changes it is now possible to call hets like:

hets -C http://Hets-lib=http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/src-distribution/libraries/Hets-lib -v2 -g http://Hets-lib/Basic/Numbers.casl

Redirected URLs do not work (i.e. http://dfki.de/cps/hets) and (some) imports do not work! (http://Hets-lib/Basic/RelationsAndOrders.casl would fail to find the proper Basic/Numbers library.) It is not possible (currently) to add "http://Hets-lib" as library directory (since colons are used to separate multiple directories). However absolute import references would work. Instead of "-C" also "--url-catalog=" can be used as long option (although multiple "=" signs may be confusing). I've not added support for reading a catalog from a file.

sternk commented 10 years ago

Comment by till Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:3


many thanks indeed! I have one problem though:

 till@HEGEL ~/CASL/Hets> hets -C http://colore.oor.net=http://colore.googlecode.com/svn/trunk/ontologies http://colore.googlecode.com/svn/trunk/ontologies/algebra/module.clif
hets: Could not find Common Logic Library abelian_group.clif

Have you implemented the substitution also for URLs that occur inside e.g. Common Logic files?

sternk commented 10 years ago

Comment by maeder Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:4


It should work for other logics, but CLIF tries to resolve imports not via hets but by itself:

CommonLogic/ParseCLAsLibDefn.hs:findLibFileAux [] f = error $ "Could not find Common Logic Library " ++ f
sternk commented 10 years ago

Comment by maeder Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:5


I will fix this case, too.

sternk commented 10 years ago

Comment by maeder Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:6


hets -C http://colore.oor.net=http://colore.googlecode.com/svn/trunk/ontologies http://colore.oor.net/algebra/module.clif -g

works now after spechub/Hets@57ca51af92c915b622ff023bd94b7392620466c4

sternk commented 10 years ago

Comment by till Migrated from http://trac.informatik.uni-bremen.de:8080/hets/ticket/1177#comment:7


very good! many thanks.