pl-semantics icon indicating copy to clipboard operation
pl-semantics copied to clipboard

installation difficulties-- missing C&C model

Open summerstay opened this issue 9 years ago • 9 comments

I am trying to follow the steps you provided to run the system for the first time. When I type "bin/mlnsem download" it asks me to "please download C&C model manually from http://svn.ask.it.usyd.edu.au/trac/candc/wiki/Download" but that directory seems to no longer exist. Can you tell me where to find the C&C model?

summerstay avatar Aug 09 '16 16:08 summerstay

I found a copy here, I think: http://www.cl.cam.ac.uk/~sc609/candc-1.00.html Now I am getting an error make: Entering directory '/home/doug/pl-semantics-master/candc' src/scripts/version unix grep: directory: No such file or directory

The shell script "version" exists in that directory.

summerstay avatar Aug 09 '16 18:08 summerstay

You can download the models from here: https://www.cs.utexas.edu/~beltagy/candc-model.tar.gz Let me know if it still does not work

ibeltagy avatar Oct 12 '16 03:10 ibeltagy

I am having this error after putting in the models into candc/models directory and then running bin/mlnsem install :

make: Leaving directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/candc'
make: Entering directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/candc'
src/scripts/version unix
grep: directory: No such file or directory
swipl -g "['src/prolog/boxer/boxer'], qsave_program('bin/boxer',[global=128000,local=128000,goal=start,stand_alone=true]), halt."
/bin/sh: 1: swipl: not found
Makefile.targets:204: recipe for target 'bin/boxer' failed
make: *** [bin/boxer] Error 127
make: Leaving directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/candc'
error: pathspec 'candc/src/lib/version.cc' did not match any file(s) known to git.
error: pathspec 'candc/src/prolog/boxer/version.pl' did not match any file(s) known to git.

kgupta15 avatar Apr 04 '17 18:04 kgupta15

Looks like you don't have prolog installed: /bin/sh: 1: swipl: not found

Be sure to install prolog using brew install homebrew/x11/swi-prolog or brew install swi-prolog

elisaF avatar Apr 08 '17 11:04 elisaF

Thanks, that resolved my issue.

kgupta15 avatar Apr 09 '17 05:04 kgupta15

Now I am having error in the next step (bin/mlnsem compile) :/ This is the error :

[info] Loading project definition from /home/kapil/Documents/work/Library/experimental/pl-semantics-master/project
[info] Set current project to mln-semantics (in build file:/home/kapil/Documents/work/Library/experimental/pl-semantics-master/)
[info] Aliasing start-script to start-script-for-classes in mln-semantics
[info] Aliasing start-script to start-script-for-classes in psl
[info] Aliasing start-script to start-script-for-classes in scala-logic
[info] Set current project to mln-semantics (in build file:/home/kapil/Documents/work/Library/experimental/pl-semantics-master/)
[info] Compiling 98 Scala sources and 4 Java sources to /home/kapil/Documents/work/Library/experimental/pl-semantics-master/target/scala-2.10/classes...
[error] error while loading <root>, zip file is empty
scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
	at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:172)
	at scala.reflect.internal.Mirrors$RootsBase.getRequiredPackage(Mirrors.scala:175)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage$lzycompute(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass$lzycompute(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr$lzycompute(Definitions.scala:1024)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr(Definitions.scala:1023)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1153)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1290)
	at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:68)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:67)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:95)
	at sbt.inc.Incremental$.compile(Incremental.scala:67)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:152)
	at sbt.Compiler$.compile(Compiler.scala:138)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:860)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:851)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:849)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] (mln-semantics/compile:compileIncremental) scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
[error] Total time: 1 s, completed 9 Apr, 2017 12:37:33 PM
make: Entering directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/alchemy/src'
../src/parser/replacefoly.pl ../src/parser/fol.y bison
flex -o../src/parser/follex.cpp ../src/parser/follex.y 
make: flex: Command not found
makefile:282: recipe for target '../bin/obj/fol.o' failed
make: *** [../bin/obj/fol.o] Error 127
make: Leaving directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/alchemy/src'

I checked that my SCALA_HOME was properly setup. scala-reflection.jar and all other scala's jar files are in classpath, as mentioned here.

This link says it might be because of a faulty .jar in my classpath. But I am able to run the scala interpreter in my terminal & am able to run scala code too. I don't know any other method to check the validity of my .jar files.

kgupta15 avatar Apr 09 '17 07:04 kgupta15

Looks like you're still missing some setup: flex: Command not found

Per the README: - Alchemy also needs Bison 2.3 (already installed), Flex 2.5.4 (already installed) and Perl 5.8.8 (already installed)

elisaF avatar Apr 09 '17 13:04 elisaF

I am sorry, I hadn't read the README and the errors properly. How much do the versions of the installed dependencies affect the compilation? There is a conflict in the README. In here, it says Alchemy needs bison 2.7 (it being a hard requirement) while here it says bison 2.3 is required. This is the error I have :

[info] Loading project definition from /home/kapil/Documents/work/Library/experimental/pl-semantics-master/project
[info] Set current project to mln-semantics (in build file:/home/kapil/Documents/work/Library/experimental/pl-semantics-master/)
[info] Aliasing start-script to start-script-for-classes in mln-semantics
[info] Aliasing start-script to start-script-for-classes in psl
[info] Aliasing start-script to start-script-for-classes in scala-logic
[info] Set current project to mln-semantics (in build file:/home/kapil/Documents/work/Library/experimental/pl-semantics-master/)
[info] Compiling 98 Scala sources and 4 Java sources to /home/kapil/Documents/work/Library/experimental/pl-semantics-master/target/scala-2.10/classes...
[error] error while loading <root>, zip file is empty
scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
	at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:172)
	at scala.reflect.internal.Mirrors$RootsBase.getRequiredPackage(Mirrors.scala:175)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage$lzycompute(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass$lzycompute(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr$lzycompute(Definitions.scala:1024)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr(Definitions.scala:1023)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1153)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1290)
	at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:68)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:67)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:95)
	at sbt.inc.Incremental$.compile(Incremental.scala:67)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:152)
	at sbt.Compiler$.compile(Compiler.scala:138)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:860)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:851)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:849)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] (mln-semantics/compile:compileIncremental) scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
[error] Total time: 1 s, completed 9 Apr, 2017 8:57:09 PM
make: Entering directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/alchemy/src'
cp ../bin/obj/infer.oo ../bin/infer
make: Leaving directory '/home/kapil/Documents/work/Library/experimental/pl-semantics-master/alchemy/src'

The code compiles but there is a scala error in here. bison : v2.7.1 flex : v2.6.0 perl : v5.22.1 gcc : v4.9 prolog : v7.4

kgupta15 avatar Apr 09 '17 15:04 kgupta15

As long as it is bison v2.x not v3.x, you should be fine

ibeltagy avatar Apr 09 '17 22:04 ibeltagy