Skip to content

Commit

Permalink
Subterms and Natural Numbers (#507)
Browse files Browse the repository at this point in the history
* adapt gitignore for Intellij

* remove old unused files

* Fixed Haddock errors

needed for the Haskell Intellij-plugin

* fix haddock errors

necessary for Intelliij Haskell plugin

* different way of fixing haddock

* Revert "Fixed Haddock errors"

This reverts commit 71d30f4.

* whole subterms squashed

* Contradictions.hs

* Goals.hs (void insertFormula)

* Guarded.hs

* LTerm.hs

* Pretty.hs

* Reduction.hs (insertFormula stuff)

* Signature.hs (unsure what stFunSyms is...)

* Simplify.hs (without freshOrdering)

* System.hs (hasSubtermCycle)

* Term.hs (elemNotBelowReducible)

* Token.hs (opSubterm << ⊏)

* Wellformedness.hs

* towards a compiling version

* reverting insertFormula change

* a compiling version!

* first subtermStore stuff

* partially integrated subtermStore

* add SubtermG

* solve SubtermGoal

* simpSubterms in Simplify.hs

* reducibleFormula

* somewhat finished
left todo's are:
- show a "trace found" (e.g. in SubtermTests --> WrongSplitSubterms)
- show a message "no further proof possible" if reducible operators are left

* removed todo

* replace plainOpenGoals by openGoals
and add minimal test file

* little fix regarding duplicate goals (one solved and one unsolved)

* advanced freshOrdering (using subterms)

* little fix

* Natural Number Cherry Picking

* Natural Number compiling version

* minor adaptions

* Term Parser: moving from "Parser (Term l)" to "Parser LNTerm"

* small tidy-up

* re-enabled NatSubtermD in splitSubterm

* proper usage of splitting subterms

* heuristics adapted

* implemented nat-cycle algorithm

* little parser fix

* Parser don't know fix

* maude parser fix

* removed debugging

* fixed sort of tone

* debugging output kills performance (400%)

* removing already false negative subterms

* fix such that non-splits do not appear in the goals

* arityOneDeduction

* enhanced freshOrdering rule   ##careful!!! this will impact the regression tests!!!

* fixed forgotten persistent fact exclusion

* fixed serious bug in the enhanced freshOrdering

* advanced partialAtomValuation for subterms

* Fix parser merge

* partial evaluation of CR-rule S_neg

* deduce KU(%nat) automatically like done with KU($pub)

* Better detection of injective facts

* detection of non-changing and monotonic positions

* monotonic injective facts!
(pairs are a todo)

* s vs t bugfix

* (decreasing, strict vs non-strict) rework of the injective fact monotonicity
TODO: properly test it

* uncomment non-increasing stuff as models diverge with it

* bugfix concerning detection of monotonicity with pairs

* fixed looping bug for non-strictly increasing stuff

**and: now, no subterms are introduced by monotonicity**

* sanity kill whenever right side of a subterm has reducible operator on top [just for the paper]

* Regression updates

* Parse proofs with subterm

* Move addition of less relation from injective fact as looping simplifier

* Docker fixes

* fix compiler error

* fixing parser errors but creating other ones

* parser sorting checks

* porting natCheck to diff

* fix maude merging error

* removing freshOrdering if it's a sapic file because that makes it slower
see opc_ua_secure_conversation.spthy

* Removing nat intruder rules as it is constructed directly in NatConstrRule

* fix download proof and reimport error and diff quantifier sort error

* change advanced fresh order to only insert `<` and never a disjunction (and check that the equalities are impossible)

* `System>safePartialAtomValuation` now uses `SubtermStore>isTrueFalse` as well

* comment changes

* removing outdated TODO's

* apply addNonInjectiveFactInstances non-looping

* updating the regression tests to be the ones from develop

* some variable renaming that killed the regression test performance

* re-enabled freshOrdering for sapic - including actions in detection

* added missing regression test to case-studies-regression which was produced by the makefile

* fixing bug in freshOrder

* added natural numbers to regression tests

* fixing heavy observational equivalence bug

* Yellow Color!

* yellow diff fixes

* update regression tests

* updated regression tests for merged changes from develop

* Remove remnant debug trace from Message Derivation checks.

* Remove unnecessary Debug.Trace include

* remove unnecessary Debug.Trace import.

* expand comment on DiffUnfinishable in code

* adding small tests for subterms and numbers

* make fst/snd by default Constructor again, instead of Destructor.

* minor cleanup changes, as discussed in PR

* remove unnecessary (commented) imports, typo fixes

* fixed runtime issue in diff mode

* trying to fix issue with nat vars

* fixing timeout for derivation checks

* Better messages for derivation checks

* fix timeout, again...

* fix output: don't show empty warning

* fix warnings

* fix more warnings

* missing regression test file

* Fixed Makefile to include xor-diff target.

* Update ALL regression targets.

---------

Co-authored-by: Charlie Jacomme <jacomme@crans.org>
Co-authored-by: Philip Lukert <c01phlu@colossus06.cispa.saarland>
Co-authored-by: Ralf Sasse <ralf.sasse@gmail.com>
Co-authored-by: Jannik Dreier <jannik.dreier@loria.fr>
  • Loading branch information
5 people committed Jul 31, 2023
1 parent a35488c commit c704b61
Show file tree
Hide file tree
Showing 373 changed files with 17,323 additions and 19,197 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -367,7 +367,7 @@ ake-bp-case-studies: $(AKE_BP_CS_TARGETS)
## Features
###########

FEATURES_CASE_STUDIES=cav13/DH_example.spthy features//multiset/counter.spthy features//private_function_symbols/NAXOS_eCK_PFS_private.spthy features//private_function_symbols/NAXOS_eCK_private.spthy features//injectivity/injectivity.spthy features//macros/MacroExample.spthy features//macros/MacroGlobalVarNSPK3.spthy features//macros/MacroWithRestrictionCRxor.spthy
FEATURES_CASE_STUDIES=cav13/DH_example.spthy features//multiset/counter.spthy features//multiset/NumberSubtermTests.spthy features//private_function_symbols/NAXOS_eCK_PFS_private.spthy features//private_function_symbols/NAXOS_eCK_private.spthy features//injectivity/injectivity.spthy features//macros/MacroExample.spthy features//macros/MacroGlobalVarNSPK3.spthy features//macros/MacroWithRestrictionCRxor.spthy

FEATURES_CS_TARGETS=$(subst .spthy,_analyzed.spthy,$(addprefix case-studies$(SUBDIR),$(FEATURES_CASE_STUDIES)))

Expand Down Expand Up @@ -465,7 +465,7 @@ case-studies: case-studies$(SUBDIR)system.info $(CS_TARGETS)
## Fast case studies
####################

FAST_CS_TARGETS = case-studies$(SUBDIR)Tutorial_analyzed.spthy $(CCS15_PCS_TARGETS) $(TESTOBSEQ_TARGETS) $(FEATURES_CS_TARGETS) $(REGRESSION_OBSEQ_TARGETS) $(CSF12_CS_TARGETS) $(IND_CS_TARGETS) $(CCS15_CS_TARGETS) $(XOR_TRACE_TARGETS) $(XOR_DIFF_OBSEQONLY_TARGETS) $(POST17_TRACE_TARGETS) $(CLASSIC_CS_TARGETS) $(AKE_BP_CS_TARGETS) $(SEQDFS_TARGETS)
FAST_CS_TARGETS = case-studies$(SUBDIR)Tutorial_analyzed.spthy $(CCS15_PCS_TARGETS) $(TESTOBSEQ_TARGETS) $(FEATURES_CS_TARGETS) $(REGRESSION_OBSEQ_TARGETS) $(CSF12_CS_TARGETS) $(IND_CS_TARGETS) $(CCS15_CS_TARGETS) $(XOR_TRACE_TARGETS) $(POST17_TRACE_TARGETS) $(CLASSIC_CS_TARGETS) $(AKE_BP_CS_TARGETS) $(SEQDFS_TARGETS) $(XOR_DIFF_OBSEQONLY_TARGETS)

fast-case-studies: case-studies$(SUBDIR)system.info $(FAST_CS_TARGETS)
mkdir -p case-studies$(SUBDIR)
Expand Down
6 changes: 3 additions & 3 deletions case-studies-regression/Tutorial_analyzed.spthy
Expand Up @@ -244,8 +244,8 @@ qed
Generated from:
Tamarin version 1.7.1
Maude version 3.2.1
Git revision: 4b299c253445d7bbc7fce41abf0b0d5659bb1d58, branch: develop
Compiled at: 2023-06-26 11:54:20.223793825 UTC
Git revision: af08d7fd0eaf723c6981fa57abca5c0b7e24a560, branch: subterm-new
Compiled at: 2023-07-31 09:45:04.338688526 UTC
*/

end
Expand All @@ -260,7 +260,7 @@ summary of summaries:
analyzed: examples/Tutorial.spthy

output: examples/Tutorial.spthy.tmp
processing time: 0.17s
processing time: 0.16s

Client_session_key_secrecy (all-traces): verified (5 steps)
Client_auth (all-traces): verified (11 steps)
Expand Down
24 changes: 14 additions & 10 deletions case-studies-regression/ake/bilinear/Chen_Kudla_analyzed.spthy
Expand Up @@ -2593,23 +2593,27 @@ qed
/*
WARNING: the following wellformedness checks failed!

The variables of the follwing rule(s) are not derivable from their premises, you may be performing unintended pattern matching
Reveal_session_key
Message Derivation Checks
=========================

The variables of the follwing rule(s) are not derivable from their premises, you may be performing unintended pattern matching.

Rule Reveal_session_key:
Failed to derive Variable(s): sek
Init_2

Rule Init_2:
Failed to derive Variable(s): ~s1, ~s2
Resp_1

Rule Resp_1:
Failed to derive Variable(s): ~msk
*/

/*
Generated from:
Tamarin version 1.7.1
Maude version 3.2.1
Git revision: 4b299c253445d7bbc7fce41abf0b0d5659bb1d58, branch: develop
Compiled at: 2023-06-26 11:54:20.223793825 UTC
Git revision: af08d7fd0eaf723c6981fa57abca5c0b7e24a560, branch: subterm-new
Compiled at: 2023-07-31 09:45:04.338688526 UTC
*/

end
Expand All @@ -2624,9 +2628,9 @@ summary of summaries:
analyzed: examples/ake/bilinear/Chen_Kudla.spthy

output: examples/ake/bilinear/Chen_Kudla.spthy.tmp
processing time: 29.07s
processing time: 35.44s

WARNING: 3 wellformedness check failed!
WARNING: 1 wellformedness check failed!
The analysis results might be wrong!

key_agreement_reachable (exists-trace): verified (13 steps)
Expand Down
24 changes: 14 additions & 10 deletions case-studies-regression/ake/bilinear/Chen_Kudla_eCK_analyzed.spthy
Expand Up @@ -522,23 +522,27 @@ qed
/*
WARNING: the following wellformedness checks failed!

The variables of the follwing rule(s) are not derivable from their premises, you may be performing unintended pattern matching
Reveal_session_key
Message Derivation Checks
=========================

The variables of the follwing rule(s) are not derivable from their premises, you may be performing unintended pattern matching.

Rule Reveal_session_key:
Failed to derive Variable(s): sek
Init_2

Rule Init_2:
Failed to derive Variable(s): ~s1, ~s2
Resp_1

Rule Resp_1:
Failed to derive Variable(s): ~msk
*/

/*
Generated from:
Tamarin version 1.7.1
Maude version 3.2.1
Git revision: 4b299c253445d7bbc7fce41abf0b0d5659bb1d58, branch: develop
Compiled at: 2023-06-26 11:54:20.223793825 UTC
Git revision: af08d7fd0eaf723c6981fa57abca5c0b7e24a560, branch: subterm-new
Compiled at: 2023-07-31 09:45:04.338688526 UTC
*/

end
Expand All @@ -553,9 +557,9 @@ summary of summaries:
analyzed: examples/ake/bilinear/Chen_Kudla_eCK.spthy

output: examples/ake/bilinear/Chen_Kudla_eCK.spthy.tmp
processing time: 19.03s
processing time: 22.66s

WARNING: 3 wellformedness check failed!
WARNING: 1 wellformedness check failed!
The analysis results might be wrong!

key_secrecy_eCK_like (all-traces): falsified - found trace (24 steps)
Expand Down

0 comments on commit c704b61

Please sign in to comment.