Admin/mira.py
author krauss
Sun Aug 12 21:48:58 2012 +0200 (2012-08-12)
changeset 48783 de617c904131
parent 48778 fd50596bf78b
child 48785 1e384f729045
permissions -rw-r--r--
fixed mira.py (cf. fd50596bf78b)
haftmann@41542
     1
"""
haftmann@41542
     2
    Test configuration descriptions for mira.
haftmann@41542
     3
"""
haftmann@41542
     4
haftmann@41542
     5
import os
haftmann@41542
     6
from os import path
haftmann@41542
     7
from glob import glob
haftmann@41542
     8
import subprocess
krauss@42392
     9
from datetime import datetime
haftmann@41542
    10
import re
haftmann@41542
    11
haftmann@41542
    12
import util
krauss@42392
    13
from util import Lazy
haftmann@41542
    14
krauss@42392
    15
from mira.report import Report, Report_Content
krauss@42392
    16
from mira.case import Case
krauss@42392
    17
from mira.tools import tool
krauss@42823
    18
from mira import schedule, misc
krauss@42192
    19
from mira.environment import scheduler
haftmann@46931
    20
from mira import repositories
krauss@42192
    21
haftmann@41542
    22
# build and evaluation tools
haftmann@41542
    23
krauss@42821
    24
def prepare_isabelle_repository(loc_isabelle, loc_contrib, loc_dependency_heaps,
krauss@48783
    25
  usedir_options='', more_settings=''):
krauss@42821
    26
krauss@42821
    27
    # prepare components
haftmann@41542
    28
    loc_contrib = path.expanduser(loc_contrib)
haftmann@41542
    29
    if not path.exists(loc_contrib):
haftmann@41542
    30
        raise IOError('Bad file: %s' % loc_contrib)
haftmann@41542
    31
    subprocess.check_call(['ln', '-s', loc_contrib, '%s/contrib' % loc_isabelle])
haftmann@41542
    32
krauss@42821
    33
    # patch settings
haftmann@41542
    34
    extra_settings = '''
haftmann@41542
    35
ISABELLE_HOME_USER="$ISABELLE_HOME/home_user"
krauss@42109
    36
Z3_NON_COMMERCIAL="yes"
haftmann@48182
    37
source "${ISABELLE_HOME}/Admin/init_components"
haftmann@48182
    38
krauss@48783
    39
''' + more_settings
haftmann@41542
    40
haftmann@41542
    41
    writer = open(path.join(loc_isabelle, 'etc', 'settings'), 'a')
haftmann@41542
    42
    writer.write(extra_settings)
haftmann@41542
    43
    writer.close()
haftmann@41542
    44
haftmann@41542
    45
krauss@45164
    46
def isabelle_getenv(isabelle_home, var):
krauss@45164
    47
krauss@45164
    48
    _, out = env.run_process('%s/bin/isabelle' % isabelle_home, 'getenv', var)
krauss@45164
    49
    return out.split('=', 1)[1].strip()
krauss@45164
    50
krauss@45164
    51
haftmann@41542
    52
def extract_isabelle_run_timing(logdata):
haftmann@41542
    53
haftmann@41542
    54
    def to_secs(h, m, s):
haftmann@41542
    55
        return (int(h) * 60 + int(m)) * 60 + int(s)
haftmann@41542
    56
    pat = r'Finished (\S+) \((\d+):(\d+):(\d+) elapsed time, (\d+):(\d+):(\d+) cpu time'
krauss@42186
    57
    pat2 = r'Timing (\S+) \((\d+) threads, (\d+\.\d+)s elapsed time, (\d+\.\d+)s cpu time, (\d+\.\d+)s GC time, factor (\d+\.\d+)\)'
haftmann@41542
    58
    t = dict((name, {'elapsed': to_secs(eh,em,es), 'cpu': to_secs(ch,cm,cs)})
haftmann@41542
    59
             for name, eh, em, es, ch, cm, cs in re.findall(pat, logdata))
krauss@42186
    60
    for name, threads, elapsed, cpu, gc, factor in re.findall(pat2, logdata):
haftmann@41542
    61
haftmann@41542
    62
        if name not in t:
haftmann@41542
    63
            t[name] = {}
haftmann@41542
    64
haftmann@41542
    65
        t[name]['threads'] = int(threads)
haftmann@41542
    66
        t[name]['elapsed_inner'] = elapsed
haftmann@41542
    67
        t[name]['cpu_inner'] = cpu
haftmann@41542
    68
        t[name]['gc'] = gc
krauss@42186
    69
        t[name]['factor'] = factor
haftmann@41542
    70
haftmann@41542
    71
    return t
haftmann@41542
    72
haftmann@41542
    73
haftmann@41542
    74
def extract_isabelle_run_summary(logdata):
haftmann@41542
    75
krauss@41894
    76
    re_error = re.compile(r'^(?:make: )?\*\*\* (.*)$', re.MULTILINE)
haftmann@41542
    77
    summary = '\n'.join(re_error.findall(logdata))
haftmann@41542
    78
    if summary == '':
haftmann@41542
    79
        summary = 'ok'
haftmann@41542
    80
haftmann@41542
    81
    return summary
haftmann@41542
    82
haftmann@41542
    83
krauss@45164
    84
def extract_image_size(isabelle_home):
krauss@45164
    85
    
krauss@45164
    86
    isabelle_output = isabelle_getenv(isabelle_home, 'ISABELLE_OUTPUT')
krauss@45164
    87
    return dict((p, path.getsize(path.join(isabelle_output, p))) for p in os.listdir(isabelle_output) if p != "log")
krauss@45164
    88
krauss@45164
    89
def extract_report_data(isabelle_home, logdata):
krauss@45164
    90
krauss@45164
    91
    return {
krauss@45164
    92
        'timing': extract_isabelle_run_timing(logdata),
krauss@45164
    93
        'image_size': extract_image_size(isabelle_home) }
krauss@45164
    94
krauss@45164
    95
krauss@42392
    96
@tool
krauss@42392
    97
def import_isatest_log(env, conf, logfile):
krauss@42392
    98
krauss@42392
    99
    """Imports isatest log file as a report."""
krauss@42392
   100
krauss@42392
   101
    def the_match(pat, text, name):
krauss@42392
   102
        match = re.search(pat, text)
krauss@42392
   103
        if not match: raise Exception('No match found for ' + name)
krauss@42392
   104
        return match.groups()
krauss@42392
   105
krauss@42392
   106
    def parse_date(d):
krauss@42392
   107
        return datetime.strptime(d, '%a %b %d %H:%M:%S %Z %Y')
krauss@42392
   108
krauss@42392
   109
    log = util.readfile(logfile)
krauss@42392
   110
krauss@42392
   111
    (begin_date, host) = the_match(r'-+ starting test -+ ([^-]*) -+ (\S*)', log, 'start tag')
krauss@42392
   112
    (isabelle_version,) = the_match(r'Isabelle version: ([a-f0-9]{12})', log, 'Isabelle version')
krauss@42392
   113
    (success, end_date) = the_match(r'-+ test (successful|FAILED) -+ ([^-]*) -', log, 'end tag')
krauss@42392
   114
    summary = extract_isabelle_run_summary(log)
krauss@42392
   115
    data = {'timing': extract_isabelle_run_timing(log)}
krauss@42392
   116
    atts = {'log': Lazy.simple(log)}
krauss@42392
   117
krauss@42392
   118
    content = Report_Content(summary, host, parse_date(begin_date),
krauss@42392
   119
      parse_date(end_date), Lazy.simple(data), atts)
krauss@42392
   120
    revision = ('Isabelle', env.repositories.get('Isabelle')[isabelle_version].hex())
krauss@42392
   121
    case = Case(conf, [revision])
krauss@42392
   122
krauss@42392
   123
    env.report_db.put(case, (success == 'successful'), content)
krauss@42392
   124
krauss@42392
   125
krauss@48686
   126
def isabelle_build(env, case, paths, dep_paths, playground, *cmdargs, **kwargs):
haftmann@41542
   127
krauss@48686
   128
    more_settings=kwargs.get('more_settings', '')
haftmann@41542
   129
krauss@42114
   130
    isabelle_home = paths[0]
haftmann@41542
   131
krauss@48686
   132
    # copy over build results from dependencies
krauss@48686
   133
    heap_dir = path.join(isabelle_home, 'heaps')
krauss@48686
   134
    classes_dir = path.join(heap_dir, 'classes')
krauss@48686
   135
    os.makedirs(classes_dir)
krauss@42115
   136
krauss@48686
   137
    for dep_path in dep_paths:
krauss@48686
   138
        subprocess.check_call(['cp', '-a'] + glob(dep_path + '/*') + [heap_dir])
krauss@45164
   139
krauss@48686
   140
    subprocess.check_call(['ln', '-s', classes_dir, path.join(isabelle_home, 'lib', 'classes')])
krauss@48686
   141
    jars = glob(path.join(classes_dir, 'ext', '*.jar'))
krauss@48686
   142
    if jars:
krauss@48686
   143
        subprocess.check_call(['touch'] + jars)
krauss@42115
   144
krauss@48686
   145
    # misc preparations
krauss@48686
   146
    if 'lxbroy10' in misc.hostnames():  # special settings for lxbroy10
krauss@42823
   147
        more_settings += '''
krauss@42823
   148
ML_PLATFORM="x86_64-linux"
krauss@45157
   149
ML_HOME="/home/polyml/polyml-5.4.1/x86_64-linux"
krauss@42823
   150
ML_SYSTEM="polyml-5.4.1"
wenzelm@46200
   151
ML_OPTIONS="-H 4000 --gcthreads 4"
bulwahn@43334
   152
bulwahn@43334
   153
ISABELLE_GHC="/usr/bin/ghc"
krauss@42823
   154
'''
krauss@42823
   155
krauss@48686
   156
    prepare_isabelle_repository(isabelle_home, env.settings.contrib, None,
krauss@48686
   157
      usedir_options="", more_settings=more_settings)
krauss@42114
   158
    os.chdir(isabelle_home)
haftmann@41542
   159
krauss@48686
   160
    # invoke build tool
krauss@48686
   161
    (return_code, log) = env.run_process('%s/bin/isabelle' % isabelle_home, 'build', '-s', '-v', *cmdargs)
haftmann@41542
   162
krauss@48686
   163
    # collect report
krauss@48686
   164
    return (return_code == 0, extract_isabelle_run_summary(log),
krauss@48686
   165
      extract_report_data(isabelle_home, log), {'log': log}, heap_dir)
haftmann@41542
   166
haftmann@41542
   167
krauss@43689
   168
krauss@43689
   169
# Isabelle configurations
krauss@43689
   170
krauss@43689
   171
@configuration(repos = [Isabelle], deps = [])
krauss@43689
   172
def Pure(*args):
krauss@48686
   173
    """Pure Image"""
krauss@48686
   174
    return isabelle_build(*(args + ("-b", "Pure")))
krauss@43689
   175
haftmann@41542
   176
@configuration(repos = [Isabelle], deps = [(Pure, [0])])
haftmann@41542
   177
def HOL(*args):
krauss@48686
   178
    """HOL Image"""
krauss@48686
   179
    return isabelle_build(*(args + ("-b", "HOL")))
haftmann@41542
   180
haftmann@46934
   181
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@46934
   182
def HOL_Library(*args):
krauss@48686
   183
    """HOL Library"""
krauss@48686
   184
    return isabelle_build(*(args + ("-b", "HOL-Library")))
krauss@48686
   185
krauss@48686
   186
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
krauss@48688
   187
def HOLCF(*args):
krauss@48686
   188
    """HOLCF"""
krauss@48688
   189
    return isabelle_build(*(args + ("-b", "HOLCF")))
haftmann@46934
   190
haftmann@46934
   191
@configuration(repos = [Isabelle], deps = [(Pure, [0])])
haftmann@46934
   192
def ZF(*args):
krauss@48686
   193
    """HOLCF"""
krauss@48686
   194
    return isabelle_build(*(args + ("-b", "ZF")))
haftmann@46934
   195
haftmann@46934
   196
bulwahn@47895
   197
settings64='''
bulwahn@47895
   198
ML_PLATFORM=x86_64-linux
bulwahn@47895
   199
ML_HOME="/home/polyml/polyml-5.4.1/x86_64-linux"
bulwahn@47895
   200
ML_SYSTEM="polyml-5.4.1"
bulwahn@47895
   201
'''
bulwahn@47895
   202
bulwahn@47897
   203
@configuration(repos = [Isabelle], deps = [])
haftmann@41542
   204
def Isabelle_makeall(*args):
krauss@48686
   205
    """Build all sessions"""
krauss@48686
   206
    return isabelle_build(*(args + ("-j", "6", "-o", "threads=4", "-a")), more_settings=settings64)
haftmann@46934
   207
haftmann@46931
   208
haftmann@41542
   209
# Mutabelle configurations
haftmann@41542
   210
haftmann@41542
   211
def invoke_mutabelle(theory, env, case, paths, dep_paths, playground):
haftmann@41542
   212
haftmann@41542
   213
    """Mutant testing for counterexample generators in Isabelle"""
haftmann@41542
   214
haftmann@41542
   215
    (loc_isabelle,) = paths
haftmann@41542
   216
    (dep_isabelle,) = dep_paths
bulwahn@43152
   217
    more_settings = '''
bulwahn@43153
   218
ISABELLE_GHC="/usr/bin/ghc"
bulwahn@43152
   219
'''
bulwahn@43152
   220
    prepare_isabelle_repository(loc_isabelle, env.settings.contrib, dep_isabelle,
bulwahn@43152
   221
      more_settings = more_settings)
haftmann@41542
   222
    os.chdir(loc_isabelle)
haftmann@41542
   223
    
haftmann@41542
   224
    (return_code, log) = env.run_process('bin/isabelle',
haftmann@41542
   225
      'mutabelle', '-O', playground, theory)
haftmann@41542
   226
    
haftmann@41542
   227
    try:
haftmann@41542
   228
        mutabelle_log = util.readfile(path.join(playground, 'log'))
haftmann@41542
   229
    except IOError:
haftmann@41542
   230
        mutabelle_log = ''
haftmann@41542
   231
krauss@42472
   232
    mutabelle_data = dict(
krauss@42472
   233
        (tool, {'counterexample': c, 'no_counterexample': n, 'timeout': t, 'error': e})
krauss@42472
   234
        for tool, c, n, t, e in re.findall(r'(\S+)\s+: C: (\d+) N: (\d+) T: (\d+) E: (\d+)', log))
krauss@42472
   235
haftmann@41542
   236
    return (return_code == 0 and mutabelle_log != '', extract_isabelle_run_summary(log),
krauss@42472
   237
      {'mutabelle_results': {theory: mutabelle_data}},
haftmann@41652
   238
      {'log': log, 'mutabelle_log': mutabelle_log}, None)
haftmann@41542
   239
krauss@42948
   240
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   241
def Mutabelle_Relation(*args):
haftmann@41542
   242
    """Mutabelle regression suite on Relation theory"""
haftmann@41542
   243
    return invoke_mutabelle('Relation', *args)
haftmann@41542
   244
krauss@42948
   245
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   246
def Mutabelle_List(*args):
haftmann@41542
   247
    """Mutabelle regression suite on List theory"""
haftmann@41542
   248
    return invoke_mutabelle('List', *args)
haftmann@41542
   249
krauss@42948
   250
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   251
def Mutabelle_Set(*args):
haftmann@41542
   252
    """Mutabelle regression suite on Set theory"""
haftmann@41542
   253
    return invoke_mutabelle('Set', *args)
haftmann@41542
   254
krauss@42948
   255
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   256
def Mutabelle_Map(*args):
haftmann@41542
   257
    """Mutabelle regression suite on Map theory"""
haftmann@41542
   258
    return invoke_mutabelle('Map', *args)
haftmann@41542
   259
krauss@42948
   260
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   261
def Mutabelle_Divides(*args):
haftmann@41542
   262
    """Mutabelle regression suite on Divides theory"""
haftmann@41542
   263
    return invoke_mutabelle('Divides', *args)
haftmann@41542
   264
krauss@42948
   265
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   266
def Mutabelle_MacLaurin(*args):
haftmann@41542
   267
    """Mutabelle regression suite on MacLaurin theory"""
haftmann@41542
   268
    return invoke_mutabelle('MacLaurin', *args)
haftmann@41542
   269
krauss@42948
   270
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
haftmann@41542
   271
def Mutabelle_Fun(*args):
haftmann@41542
   272
    """Mutabelle regression suite on Fun theory"""
haftmann@41542
   273
    return invoke_mutabelle('Fun', *args)
krauss@42040
   274
krauss@42393
   275
mutabelle_confs = 'Mutabelle_Relation Mutabelle_List Mutabelle_Set Mutabelle_Map Mutabelle_Divides Mutabelle_MacLaurin Mutabelle_Fun'.split(' ')
krauss@42393
   276
krauss@42393
   277
@scheduler()
krauss@42393
   278
def mutabelle_scheduler(env):
krauss@42393
   279
    """Scheduler for Mutabelle."""
krauss@42393
   280
    return schedule.age_scheduler(env, 'Isabelle', mutabelle_confs)
krauss@42040
   281
bulwahn@47896
   282
krauss@42040
   283
# Judgement Day configurations
krauss@42040
   284
krauss@42095
   285
judgement_day_provers = ('e', 'spass', 'vampire', 'z3', 'cvc3', 'yices')
krauss@42040
   286
krauss@42040
   287
def judgement_day(base_path, theory, opts, env, case, paths, dep_paths, playground):
krauss@42040
   288
    """Judgement Day regression suite"""
krauss@42040
   289
krauss@42040
   290
    isa = paths[0]
krauss@42040
   291
    dep_path = dep_paths[0]
krauss@42040
   292
krauss@42040
   293
    os.chdir(path.join(playground, '..', base_path)) # Mirabelle requires specific cwd
krauss@42040
   294
    prepare_isabelle_repository(isa, env.settings.contrib, dep_path)
krauss@42040
   295
krauss@42040
   296
    output = {}
krauss@42040
   297
    success_rates = {}
krauss@42040
   298
    some_success = False
krauss@42040
   299
krauss@42040
   300
    for atp in judgement_day_provers:
krauss@42040
   301
krauss@42040
   302
        log_dir = path.join(playground, 'mirabelle_log_' + atp)
krauss@42040
   303
        os.makedirs(log_dir)
krauss@42040
   304
krauss@42040
   305
        cmd = ('%s/bin/isabelle mirabelle -q -O %s sledgehammer[prover=%s,%s] %s.thy'
krauss@42040
   306
               % (isa, log_dir, atp, opts, theory))
krauss@42040
   307
krauss@42040
   308
        os.system(cmd)
krauss@42040
   309
        output[atp] = util.readfile(path.join(log_dir, theory + '.log'))
krauss@42040
   310
krauss@42040
   311
        percentages = list(re.findall(r'Success rate: (\d+)%', output[atp]))
krauss@42040
   312
        if len(percentages) == 2:
krauss@42040
   313
            success_rates[atp] = {
krauss@42040
   314
                'sledgehammer': int(percentages[0]),
krauss@42040
   315
                'metis': int(percentages[1])}
krauss@42040
   316
            if success_rates[atp]['sledgehammer'] > 0:
krauss@42040
   317
                some_success = True
krauss@42040
   318
        else:
krauss@42040
   319
            success_rates[atp] = {}
krauss@42040
   320
krauss@42040
   321
krauss@42040
   322
    data = {'success_rates': success_rates}
krauss@42040
   323
    raw_attachments = dict((atp + "_output", output[atp]) for atp in judgement_day_provers)
krauss@42040
   324
    # FIXME: summary?
krauss@42040
   325
    return (some_success, '', data, raw_attachments, None)
krauss@42040
   326
krauss@42040
   327
krauss@42948
   328
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
krauss@42040
   329
def JD_NS(*args):
krauss@42040
   330
    """Judgement Day regression suite NS"""
krauss@42040
   331
    return judgement_day('Isabelle/src/HOL/Auth', 'NS_Shared', 'prover_timeout=10', *args)
krauss@42040
   332
krauss@42948
   333
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
krauss@42040
   334
def JD_FTA(*args):
krauss@42040
   335
    """Judgement Day regression suite FTA"""
krauss@42040
   336
    return judgement_day('Isabelle/src/HOL/Library', 'Fundamental_Theorem_Algebra', 'prover_timeout=10', *args)
krauss@42040
   337
krauss@42948
   338
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
krauss@42040
   339
def JD_Hoare(*args):
krauss@42040
   340
    """Judgement Day regression suite Hoare"""
krauss@42058
   341
    return judgement_day('Isabelle/src/HOL/IMPP', 'Hoare', 'prover_timeout=10', *args)
krauss@42040
   342
krauss@42948
   343
@configuration(repos = [Isabelle], deps = [(HOL, [0])])
krauss@42040
   344
def JD_SN(*args):
krauss@42040
   345
    """Judgement Day regression suite SN"""
krauss@42058
   346
    return judgement_day('Isabelle/src/HOL/Proofs/Lambda', 'StrongNorm', 'prover_timeout=10', *args)
krauss@42040
   347
krauss@42116
   348
krauss@42192
   349
JD_confs = 'JD_NS JD_FTA JD_Hoare JD_SN JD_Arrow JD_FFT JD_Jinja JD_QE JD_S2S'.split(' ')
krauss@42192
   350
krauss@42192
   351
@scheduler()
krauss@42197
   352
def judgement_day_scheduler(env):
krauss@42192
   353
    """Scheduler for Judgement Day."""
krauss@42192
   354
    return schedule.age_scheduler(env, 'Isabelle', JD_confs)
krauss@42192
   355
krauss@42192
   356
krauss@42116
   357
# SML/NJ
krauss@42116
   358
krauss@42116
   359
smlnj_settings = '''
krauss@42116
   360
ML_SYSTEM=smlnj
wenzelm@48443
   361
ML_HOME="/home/smlnj/110.74/bin"
wenzelm@48443
   362
ML_OPTIONS="@SMLdebug=/dev/null @SMLalloc=1024"
krauss@42116
   363
ML_PLATFORM=$(eval $("$ML_HOME/.arch-n-opsys" 2>/dev/null); echo "$HEAP_SUFFIX")
krauss@42116
   364
'''
krauss@42116
   365
krauss@48686
   366
@configuration(repos = [Isabelle], deps = [(Pure, [0])])
krauss@42116
   367
def SML_HOL(*args):
krauss@42116
   368
    """HOL image built with SML/NJ"""
krauss@48686
   369
    return isabelle_build(*(args + ("-b", "HOL")), more_settings=smlnj_settings)
krauss@42116
   370
krauss@42116
   371
@configuration(repos = [Isabelle], deps = [])
krauss@42116
   372
def SML_makeall(*args):
krauss@48686
   373
    """SML/NJ build of all possible sessions"""
krauss@48686
   374
    return isabelle_build(*(args + ("-j", "3", "-a")), more_settings=smlnj_settings)
krauss@48686
   375
krauss@48686
   376
krauss@48686
   377
# Legacy Isabelle configurations
krauss@48686
   378
krauss@48686
   379
# distribution and documentation Build
krauss@48686
   380
krauss@48686
   381
@configuration(repos = [Isabelle], deps = [])
krauss@48686
   382
def Distribution(env, case, paths, dep_paths, playground):
krauss@48686
   383
    """Build of distribution"""
krauss@48686
   384
    ## FIXME This is rudimentary; study Admin/CHECKLIST to complete this configuration accordingly
krauss@48686
   385
    isabelle_home = paths[0]
krauss@48686
   386
    (return_code, log) = env.run_process(path.join(isabelle_home, 'Admin', 'Release', 'makedist'),
krauss@48686
   387
      REPOS = repositories.get(Isabelle).local_path, DISTPREFIX = os.getcwd())
krauss@48686
   388
    return (return_code == 0, '', ## FIXME might add summary here
krauss@48686
   389
      {}, {'log': log}, None) ## FIXME might add proper result here
krauss@48686
   390
krauss@48686
   391
krauss@48686
   392
def isabelle_dependency_only(env, case, paths, dep_paths, playground):
krauss@43894
   393
krauss@48686
   394
    isabelle_home = paths[0]
krauss@48686
   395
    result = path.join(isabelle_home, 'heaps')
krauss@48686
   396
    os.makedirs(result)
krauss@48686
   397
    for dep_path in dep_paths:
krauss@48686
   398
        subprocess.check_call(['cp', '-R'] + glob(dep_path + '/*') + [result])
krauss@48686
   399
krauss@48686
   400
    return (True, 'ok', {}, {}, result)
krauss@48686
   401