Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LATIN2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MMT
LATIN2
Commits
d7f284fb
Unverified
Commit
d7f284fb
authored
1 year ago
by
ColinRothgang
Browse files
Options
Downloads
Patches
Plain Diff
Add flag to TPTPExporters controlling definition expansion behaviour
parent
89c98c71
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scala/latin2/tptp/TPTPExporter.scala
+12
-2
12 additions, 2 deletions
scala/latin2/tptp/TPTPExporter.scala
with
12 additions
and
2 deletions
scala/latin2/tptp/TPTPExporter.scala
+
12
−
2
View file @
d7f284fb
...
...
@@ -214,6 +214,9 @@ class TPTPExporter extends StructurePresenter with AutomatedProver { //TODO: doe
}
trait
logicExporter
extends
Extension
{
val
translateDefinitions
:
Boolean
=
true
val
expandDefinitions
:
Boolean
=
true
var
comments
=
Map
[
String
,
Seq
[
Comment
]]()
var
currentFormulaComments
=
Seq
[
Comment
]()
...
...
@@ -222,8 +225,15 @@ trait logicExporter extends Extension {
// used for a definition expansions before the translation
var
definitionSubstituents
:
List
[(
GlobalName
,
Term
)]
=
Nil
// the following line causes definition expansion, replace with trivial replacer to disable
def
replacer
:
OMSReplacer
=
OMSReplacer
.
apply
(
listmap
(
definitionSubstituents
,
_
))
// this treats definition expansion/translation of references to definitions
def
replacer
:
OMSReplacer
=
if
(
expandDefinitions
||
!
translateDefinitions
)
{
OMSReplacer
.
apply
(
listmap
(
definitionSubstituents
,
_
))
}
else
{
val
definitionSubstitution
=
definitionSubstituents
.
map
{
case
(
p
,
_
)
=>
(
p
,
THFExporterUtil
.
translated_defn_path
(
p
))
}
OMSReplacer
.
apply
(
listmap
(
definitionSubstitution
,
_
))
}
val
theoryPath
:
MPath
// to ensure the correct exporter is applied at the right time
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment